Skip to main content

vJSONResamplePath

Resamples a path to an even number of points or an even spacing, with optional smoothing.

IntermediateMograph / JSONJSONArrayScriptVal
vJSONResamplePath node

vJSONResamplePath takes an ordered path and outputs points spaced evenly along its length. Mode picks a fixed point count or a fixed spacing, and Interpolation can smooth the path first.

Parameters​

ParameterTypeDefaultDescription
ModeDropdownTarget CountTarget Count (default) or Target Spacing.
Target CountInteger32Number of output points. Slider 2 to 2048, default 32. Shown in Target Count mode.
Target SpacingFloat0.05Distance between output points. Slider 0.001 to 2, default 0.05. Shown in Target Spacing mode.
Closed PathInteger0.0Treats the path as a closed loop when on. Default off.
InterpolationDropdownLinearLinear (default), Catmull-Rom, B-Spline or Cardinal.
+3 more parameters
ParameterTypeDefaultDescription
Interp StepsInteger8Subdivisions per segment for the three spline types. Slider 1 to 32, default 8.
TensionFloat0.0Tension of the Cardinal spline. Slider -2 to 2, default 0. Shown for Cardinal only.
PointsDATATYPE—Ordered path points.
Read the full description

The path is optionally closed (Closed Path adds a copy of the first point at the end) and smoothed with Linear, Catmull-Rom, B-Spline or Cardinal interpolation using Interp Steps subdivisions per segment. Then points are placed at equal distances along the result. Target Count (default 32) gives that many points, including both ends of an open path. Target Spacing (default 0.05) gives a point every that distance and ends on the last point.

A closed path does not repeat the first point at the end and has at least 3 points. Tension (default 0) is shown for Cardinal only. In Target Count mode, a path of zero length gives repeated copies of its first point. The output has 3 values per point.

Example Connections​

vJSONPointsOnArc.Output -> vJSONResamplePath.Points
vJSONResamplePath.Output -> vJSONCameraProjection.ArrayA
vJSONCameraProjection.Output -> vJSONShapeRender.ArrayPoint
Background.Output -> vJSONShapeRender.Input