|
Home : Animating : How do I? : Work with constraints :
How to apply a restriction to a DAG node.
![]() | Previous: Work with constraints |
The term constraint describes a generalized restriction that can apply to any DAG node. A point constraint modifies the translations of an object to match the position of the object it is constrained to. Orientation and aim constraints modify the rotations of the constrained object so that its local axes match those of the constraint object (orientation), or the selected aim axis points at the constraint object (aim).
Create constraint translates or rotates the object that is being constrained to the position and orientation of the constraint. You can create any combination and number of point and orientation constraints on an object. You can also copy and mirror existing constraints onto a skeleton.
1 Choose an object using
Pick > Object, or pick an object DAG node in the SBD window.
2 Choose
Animation > Tools > Create constraint from the menu bar.
Depending on the Constraint Type you have set in the Create Constraint Options window. You are prompted to pick either a joint or a node.
For example, the system prompts:
Pick a joint or node to constrain.![]()
3 Pick an object in the modeling or SBD window. You will see a selection handle or a jack (or both) appear next to the object, allowing you to use the new constraint.
Note
You can later change the values of a constraint (but not its type or target) in the Constraint Information section of the Information window (choose
Windows > Information > Information window).
In general it is not useful to apply a constraint directly to a skeleton joint. For example, if a point constraint is applied to a joint, moving the constrain object would cause the bone to stretch. Normally, you should create IK handles (using
Animation > IK > Add IK handle) and then constrain the IK handle to an object. To make it easier, if
Animation > Tools > Create constraint is applied to a skeleton joint, an IK handle is created and a null node is added in the SDB window.
1 Create a cone using
Surfaces > Primitives > Cone.
2 Choose
Animation > Tools > Create constraint
and turn on orientation constraint and create selection handle. Click Go.
A selection handle is created on the new constraint.
3 Choose
Animation > Pick > Selection handle and click the handle.
4 Choose
Animation > Tools > Move selection handle.
5 Drag the handle away from the cone.
6 With the handle still picked (the cone will also stay active as it is under the influence of the constraint), choose
Transform > Rotate.
7 Click-drag the selection handle to change its orientation. As the handle rotates, the cone will follow it.
There will be times when you will want to generate animation curves from the constraint animation. Bake creates animation curves with keyframes at regularly specified intervals. You can view theses curves and edit them by hand.
Constraint animation is limited to a -180/+180 degree range. If the constraint jumps from -180 to +180, the object doesn't actually move. However, the motion blur sampling reads a value between those degree ranges, and the object appears to flip. With Bake, extra keyframes are created with the Motion Blur compensation at the motion blur sample times, wherever this flipping problem is detected. The sample points are at the frame, plus/minus the following value:
(RenderByFrame * ShutterAngle) / 720
This means that if you edit the start/end frames in that SDL file, you won't have the constraint/IK animation outside the original start/end range.
You must re-save the SDL to get any missing constraint/IK animation.
Use
Animation > Edit > Constraints On/Off to enable/disable constraint updates instead of visibility.
![]() | Next: Constrain one object to another object |