Houdini 20.5 Nodes APEX nodes

rig::SplineInterpolateTransformsArray 2.0

Generates and samples a spline.

On this page
Since 20.5

Generates a spline from a number of input control matrices. The position of the control matrices defines the shape of the generated spline, while the upper 3×3 transform of the control matrices defines the framing of the spline. The generated spline is then resampled numsamples times to produce output transforms that are made available on the xforms port. Additional twists can be applied to the output transforms via the twists port.

The output transforms are interpolated based on the sample’s neighboring input transforms, and then adjusted such that the tangent vector points toward the next sample. The default tangent vector is the -Z axis, which implies that, by default, the control matrices should also have their -Z axis pointing in the spline’s desired tangent direction. If the control matrices use a different local tangent vector to define their tangent direction, the tangent port should be updated accordingly. For example, if the control matrices use the +X axis as the tangent direction, then tangent should be updated to (1, 0, 0).

Internally, the spline generated from the control matrices is a bezier curve of the specified order. This means that the number of control matrices must satisfy the equation, <number_of_cvs> % (order-1) == 1. This constraint may be lifted in a future version of Houdini, but as a workaround, users can generate a NURBS curve with the desired number of control points (with a transform point attribute), and use rig::SampleSplineTransforms to sample the control curve.

Inputs

cvs: Matrix4Array

The control matrices used to generate and frame a control spline. The number of control matrices must satisfy the equation, <number_of_cvs> % (order-1) == 1.

twists: FloatArray

Additional twists (in radians) to add to the output transforms. There does NOT have to be a twist value per CV. Adding values 0 and 2*M_PI twists the output transforms a full rotation about the transforms' Z axes. Additional twist values are interpolated linearly between the values across the length of the spline.

numsamples: Int

The number of samples to take for the output spline.

order: Int

The order of the generated spline curve.

tangent: Vector3

The local space tangent vector of xforms that is aligned to the next point. The default value is the -Z axis (the -Z axis of xforms points toward the next point).

smooth: Bool

If set to True, adds smoothstep smoothing to the output transforms. The default value is False.

byedge: Bool

If set to True, samples each segment of the spline separately, with numsamples points sampled on each edge of the input geometry.

Outputs

outgeo: Geometry

Geometry containing the resampled spline. The output geometry has the following point attributes:

  • curveu: The parametric value of the sampled point on the input geometry geo.

  • transform: A 3×3 matrix with the resampled transform.

  • tangentu: A vector that points in the direction of the next point.

arclength: Float

The arc length of the control spline generated from the input cvs.

xforms: Matrix4Array

The output transforms.

Note

This port was renamed from resampled to xforms in this version of the node.

See also

APEX nodes