Houdini 21.0 Nodes APEX nodes

rig::SplineOffsets

Converts multiple spline offsets between their various representations.

On this page
Since 21.0

Each connection to an offset subport generates a full set of converted offsets whose results are accessible at the corresponding subport of 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.

Usage example

In the following image, there are two offset subports: offset0 and offset1. offset0 has a “parametric” interpretation and offset1 has an “arclength” interpretation. This is the case since offset0 and interp0 are the first pair of connected subports, and offset1 and interp1 are the second pair of connected subports. To convert offset0 into a “unit parametric” interpretation, a connection must be made to the first unitparm subport (since offset0 is the first subport of offset). To convert offset1 into a “unit arclength” interpretation, a connection must be made to the second unitarclen subport (since offset1 is the second subport of offset). As such, an extra unused connection is needed to connect to the first unitarclen subport since its value would actually represent the unit arclength of offset0 and not offset1. A Null<T> node works well for this purpose.

Inputs

geo: Geometry

The geometry containing the spline.

primnum: Int

The primitive number of the spline to sample.

offset: VariadicArg<Float>

Each subport represents an offset to convert.

interp: VariadicArg<Int>

Each subport represents the interpretation of the corresponding offset subport. If there are fewer connections to interp than there are connections to offset, then the last set interpretation is repeated. Therefore, it’s only necessary to make one connection to this port if all offset subports share the same interpretation. If no connections are made to this port, then a default interpretation of 0 (Unit Parametric) is used for all offsets.

Outputs

unitparm: VariadicArg<Float>

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

unitarclen: VariadicArg<Float>

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

parm: VariadicArg<Float>

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

arclen: VariadicArg<Float>

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

See also

APEX nodes