Houdini 21.0 Nodes APEX nodes

rig::SplineOffsetsToArray

Converts multiple spline offsets between their various representations.

On this page
Since 21.0

The conversion of each offset array element can be found at the same index of the output array with the desired interpretation (unitparm, unitarclen, parm, and arclen).

Spline offsets

A spline offset is the offset from the beginning of the spline to a specific point along the spline. Offsets are defined by a value and its unit. The unit of the offset is referred to as its “interpretation.”

interp

Interpretation

0

Unit Parametric

The offset value is interpreted as a normalized parametric value with 0 representing the beginning of the spline and 1 representing the end of the spline. Unit parametric offsets are useful for sampling in the parametric domain while remaining more invariant to changes to the spline’s parameterization (for example, adding or removing a CV from the control spline).

1

Unit Arclength

The offset value is interpreted as a normalized arclength. The offset represents the percentage of the arclength along the spline. A value of 0 represents the beginning of the curve and a value of 1 represents the end of the curve. Unit arclength offsets are convenient for maintaining a relative distance when the spline changes length.

2

Parametric

The offset value is interpreted as a parametric value. Parametric values precisely identify a position along a spline, and may remain more localized to changes to the spline’s length or shape.

3

Arclength

The offset value is interpreted as an arclength. Arclength offsets are useful for specifying an offset at a specific distance along the spline even when the length of the spline changes.

Inputs

geo: Geometry

The geometry containing the spline.

primnum: Int

The primitive number of the spline to sample.

offset: FloatArray

Each array element represents an offset to convert.

interp: IntArray

Each array element represents the interpretation of the corresponding index of offset. If there are fewer interp array elements than there are offset array elements, then the last set interpretation is repeated. Therefore, it’s only necessary to set one array element if all offset array elements share the same interpretation. When unset, a default interpretation of 0 (Unit Parametric) is used for all offsets.

Outputs

unitparm: FloatArray

The offset represented with a unit parametric interpretation. Each index represents the conversion of the offset with the same index.

unitarclen: FloatArray

The offset represented with a unit arclength interpretation. Each index represents the conversion of the offset with the same index.

parm: FloatArray

The offset represented with a parametric interpretation. Each index represents the conversion of the offset with the same index.

arclen: FloatArray

The offset represented with an arclength interpretation. Each index represents the conversion of the offset with the same index.

See also

APEX nodes