Swing and Twist Overview
In the context of 3D rotation, swing and twist are two components of a rotation that together describe how a transform is oriented in space.
Twist is the rotation around a specified axis (twist axis). The twist does not change the direction of the axis itself, it only rotates around it. Swing is the remaining rotation after removing the twist component. It changes the direction of the twist axis in 3D space, but it does not rotate around that axis.
Together, swing and twist represent the full rotation of the transform. By decomposing rotation in this way, we can isolate and control each part independently, which is especially useful in corrective (secondary) deformation systems.
To work correctly with the DNA exporter, swing and twist setups must use joints from the bind skeleton as inputs/outputs.
Swing Twist Node
The swing and twist setups in Maya rig use SwingTwistEvaluator nodes. The node can be created in Maya just like any other node, by typing the name in the Node Editor.
Input Parameters
The node expects the rotation of one or two joints (transforms). It has two rotational inputs:
| Parameter Name | Description |
|---|---|
Start Joint (X,Y,Z) | Start transform rotation (joint rotation). |
End Joint (X,Y,Z) | End transform rotation (joint rotation). |
Settings Parameters
| Parameter Name | Description |
|---|---|
Swing Blend | Percentage of how much of the swing portion of the rotation should be “followed”.
|
Twist Blend | Add n number of twist blend values for n number of twist joints. Twist Blend [0]...Twist Blend [n] Values For each twist joint assign how much it will "follow the twist" - the blend between 0 and 100% twist. |
From End | The twist calculation can be performed from the assigned end joint. The default is from the start joint. Example: The lower arm will have the twist From End set to True while the upper arm/shoulder will have it set to False, because the forearm twist expects the wrist as a point of twist calculation. |
Output Parameters
| Parameter Name | Description |
|---|---|
Swing (X,Y,Z) | Output final swing rotation - connects to the rotation of the Swing Transform. |
Twists(X,Y,Z) | Output final twist rotation - connects to the rotation of the Twist Transform. |
Twists[n] | Output final twist rotation for each twist transform based on Twist Blend [n] value. |