Skip to main content

vJSONFromPolylineMulti

Sample up to eight paths drawn in the viewer into one point list, with a group size for each path.

IntermediateMograph / JSONJSONArrayScriptVal
vJSONFromPolylineMulti node

vJSONFromPolylineMulti outputs one array of XYZ points that holds the sampled points of up to eight drawn paths, and a Groups output with the number of points taken from each path.

Parameters​

ParameterTypeDefaultDescription
Path CountInteger2Number of path controls that are shown and used. Range 1 to 8, default 2.
Point Count (Global)Integer64Number of points taken from each path, unless the path overrides it. Minimum 2, default 64.
Closed Loop (Global)Integer0.0When on, paths are treated as closed and the first point is not repeated. Default off.
Flip YInteger1.0Negates Y after sampling. Default on.
Flip XInteger1.0Negates X after sampling. Default on.
+6 more parameters
ParameterTypeDefaultDescription
Aspect CorrectInteger1.0Divides Y by 16 / 9. Default on.
Scale XFloat2.0Multiplier applied to X. Minimum 0, default 2.
Scale YFloat2.0Multiplier applied to Y. Minimum 0, default 2.
Canvas RFloat0.05Red level of the image the node creates. Range 0 to 1, default 0.05.
Canvas GFloat0.05Green level of the image the node creates. Range 0 to 1, default 0.05.
Canvas BFloat0.08Blue level of the image the node creates. Range 0 to 1, default 0.08.
Read the full description

Path Count sets how many of the eight path controls are shown and used. Each path is sampled at equal fractions of its length, with the global Point Count and Closed Loop, and the points of all paths are joined in path order. Without Closed Loop the first and last points of a path are at its ends. With it on, the spacing is divided by the count instead of the count - 1 and the first point is not repeated.

Every path has its own Reset Path button and an Override Count checkbox. When Override Count is on, the path uses its own Count and Closed values instead of the global ones. These per-path controls are built in a loop and are not listed in the parameter table.

After sampling, Flip X and Flip Y negate the values, Aspect Correct divides Y by 16 / 9, and Scale X and Scale Y multiply the values. Z is always 0. A path with fewer than two points adds nothing and does not appear in the groups.

The Groups output lists the number of points added by each path, in order. The node also creates an image filled with Canvas R, G and B so the paths can be drawn in the viewer. The image does not change the point output.

Example Connections​

vJSONFromPolylineMulti.Output -> vJSONCameraProjection.ArrayA
vJSONFromPolylineMulti.Groups -> vJSONCameraProjection.ArrayGroups
vJSONCameraProjection.Output -> vJSONShapeRender.ArrayPoint
vJSONCameraProjection.Groups -> vJSONShapeRender.ArrayGroups
Background.Output -> vJSONShapeRender.Input