Splines can be built and used in Control Rig in order to create dynamic and procedural motion regardless of skeletal hierarchy. With splines, you can create more complex poses with fewer necessary controls on limbs such as tentacles, spines, and snakes.
This document provides an overview of how to create and use splines in your rig.
Prerequisites
You have created a Control Rig Asset for a Skeletal Mesh that has a suitable joint structure for splines, such as a tail. See the Control Rig Quick Start page for information on how to do this.
You are familiar with how to create and position Controls.
Create Spline
Spline creation in Control Rig is done by specifying arbitrary translation points, which are used to construct the spline. In typical setups, these points are based on the transform information from Controls.
To start, create a Spline From Points node by right-clicking in the rig graph and selecting Spline From Points.
Next, create rig elements which are used to define the points in the spline. In this example, four controls are created and evenly distributed along the length of the tentacle. The number of controls does not need to correspond to the number of bones in the chain.
Next, reference your root rig element into the rig graph, and click the Add (+) button on the Spline From Points node to add the first spline point in the array. Expand the Transform pin on your element reference and connect the Translation pin to the input on the Points pin.
Continue to add additional spline points for all the rig elements you want to use to form the spline. You must ensure that the order in which you connect them to the Spline From Points node corresponds to the direction of the spline.
Splines in Control Rig require a minimum of four points in order to create the spline successfully.
You can now preview your spline by using the Draw Spline node, which provides a visual display for the spline. Create this node by right-clicking in the graph and selecting Draw Spline, then connect the Spline pin from Spline From Points, and the Execute event from Forwards Solve. Manipulating your controls in the viewport will preview the spline behavior.
Apply Spline to Bones
Once the spline has been created, you can apply it to your joint chain.
First, create a Fit Chain on Spline Curve node by right-clicking in the graph and selecting Fit Chain on Spline Curve.
Next, multi-select the bones you want to include in the spline from the Rig Hierarchy panel, drag them into the Rig Graph, and select Create Item Array. For this operation, selection order is important to ensure the resulting bone array matches the same order as the spline points.
Lastly, connect the Rig Element array to the Items pin, the Spline pin from Spline From Points, and ensure the Execute event is connected to your Control Rig logic chain.
Your spline should now affect the bone chain.
Spline Properties
The following properties are available on the Spline From Points node.
Name |
Description |
---|---|
Points |
The position information that will be used to construct the spline. Can be either an array or built using individual translation pins by clicking the Add (+) button. |
Spline Mode |
The type of spline to use. You can choose from either:
|
Samples Per Segment |
This property controls the approximation accuracy of the spline. Higher numbers will cause the spline to be more accurate and smooth. Lower numbers will cause the spline to appear more jagged and incorrect. Performance costs increase with the sample count, so it is a good idea to ensure this number is not set too high. |
Compression |
The amount the spline should compress when reducing its length. |
Stretch |
The amount the spline should stretch when increasing its length. |
Spline (Output) |
The resulting spline from this node. |
The following properties are available on the Fit Chain on Spline Curve node.
Name |
Description |
---|---|
Items |
An array of rig elements to align to the provided Spline. |
Spline |
The Spline curve to align to. |
Alignment |
Whether or not to stretch the aligned elements to the full spline length.
|
Minimum |
The Minimum U value to use on the curve. U is the normalized (0 - 1) percentage between all combined control points. |
Maximum |
The Maximum U value to use on the curve. U is the normalized (0 - 1) percentage between all combined control points. |
Sampling Precision |
This property controls the approximation accuracy of the spline. Higher numbers will cause the spline to be more accurate and smooth. Lower numbers will cause the spline to appear more jagged and incorrect. This overwrites the Samples Per Segment property from Spline From Points. Performance costs increase with the sample count, so it is a good idea to ensure this number is not set too high. |
Primary Axis |
The major axis being aligned in the chain. In simple setups this property can be ignored, but typically you will want to set this to be the direction your item chain is progressing in.
|
Secondary Axis |
The minor or "up" axis being aligned in the chain. In simple setups this property can be ignored, but typically you will want to set this to be in the direction of a pole vector if it is being used.
|
Pole Vector Position |
The position of an optional pole vector control. This only has an effect if the Secondary Axis is set. |
Rotations |
An array of rotations to apply additively to the overall spline. |
Rotation Ease Type |
The easing type to use between each rotation element. |
Weight |
The factor to apply the elements to the curve. |
Propagate to Children |
Whether or not the changes in the rig elements should apply recursively to all children. |
Spline Nodes
The following Spline nodes are available for use in your Control Rig Graph:
Name |
Image |
Description |
---|---|---|
Closest Parameter From Spline |
|
Retrieves the closest U value from a given spline and position. |
Draw Spline |
|
Displays the spline curve in the viewport for preview purposes. Includes properties for controlling the Color, Thickness, and sample Detail. |
Fit Chain on Spline Curve |
|
Fits a given spline along an array of items. This node typically is used when performing backwards solves that include splines. |
Fit Spline Curve on Chain |
|
Applies a chain of rig elements to a spline. |
Get Length Of Spline |
|
Gets the length of a spline. |
Parameter At Length Percentage |
|
Returns the U value of a spline given a length percentage. |
Position From Spline |
|
Returns the position along a spline given the U value. |
Set Spline Points |
|
Sets the currently existing points of a spline to new values, then outputs the resulting new spline. |
Spline From Points |
|
Builds a spline from an array of translation points. |
Tangent From Spline |
|
Returns the tangent angle of a point along the spline defined by U. |
Transform From Spline |
|
Returns a transform from a given Spline and U value based on the given Up and Roll. |