Work with constraints
 
 
 

Create any combination and number of point and orientation constraints on an object.

Create a constraint on an object

How to apply a restriction to a DAG node.

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.

Create a constraint

  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.
    NoteYou 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 ).

Hints and Tips

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 SBD window.

Simple orientation example

  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.

Baking animation and using Motion Blur compensation

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

Notes and tips

Constrain one object to another object

Create UV point, orientation or aiming constraints on an object.

Constrain to creates constraints that translates or rotates the constrained objects to the position. You can create any combination and number of UV point, orientation, or aiming constraints on an object.

Constraining an object to another object

  1. Select an object using Pick > Object , or pick an object DAG node in the SBD window.
  2. Choose Animation > Tools > Constrain To .

    The system prompts depend on the constraint type that you have set in the Constrain To Options window.

    • If the Constraint Type is Point (the default), the system prompts:
      	Pick the DAG node whose rotate pivot will be a POINT constraint for the selected node. 
    • If the Constraint Type is Aim, the system prompts:
      	Pick the DAG node which the node’s local x axis will AIM at.
    • If the Constraint Type is Orientation, the system prompts:
      	Pick the DAG node whose local axis will be an ORIENTATION constraint for the selected node.
  3. Pick an object in the modeling or SBD window that meets the criteria outlined in the prompt.
    NoteIn the modeling view, a line may be shown to indicate the constraint. This line is only shown if the constraint is not met.

Point example

  1. Create two primitive spheres and a jack using Surfaces > Primitives > Sphere and Animation > Tools > Jack .

  2. In the Constrain To Options window (Animation > Tools > Constrain To ), make sure the Point option is clicked ON.
  3. With the jack active, choose Animation > Tools > Constrain To and pick the sphere at the left.

    Notice how the jack moves to the sphere that it is constrained to:

  4. With the jack still active, choose Constrain to and pick the sphere at the right.

    Notice that the jack moves between the two spheres.

    NoteThe jack is equidistant from the spheres because the weight of the constraints is equal. If the weight of one constraint was greater, the jack would be closer to the sphere with the greater weighted constraint. To change the weight, use Windows > Information > Information Window .
  5. Pick nothing, then pick the sphere at the right.

    The jack changes color to show it is constrained to the selected sphere:

  6. Move the active sphere and then pick and move the sphere to the left.

    The jack moves in relation to the two objects it is constrained to:

Orientation example

  1. Create a sphere and a cone with Surfaces > Primitives > Sphere and Surfaces > Primitives > Cone .
  2. With the cone picked, choose Animation > Tools > Constrain To and make sure Orientation is ON. Click Go then click the sphere.

  3. With nothing picked, pick the sphere, choose Transform > Rotate and rotate the sphere.

    Notice that the cone rotates along with the sphere.

    NoteYou can see the orientation of an object by turning the local axes of the object on. To do this, choose WindowDisplay > Toggles > Pivots and in the option box turn the Local Axes Display setting ON.

This example illustrates how to make an object always aim toward another object.

Aim example

  1. Create a primitive sphere and a cone with Surfaces > Primitives > Sphere and Surfaces > Primitives > Cone .
  2. Pick the cone and choose Transform > Local > Set Local Axes to view its local axes.

    NoteThe point of the cone, the part you want to aim, is pointed up toward Z. To get from the cone to the ball, you have to move along the X axis.
  3. With the cone picked, choose Animation > Tools > Constrain To . An option box appears.
  4. In the option box, make sure that the Aim option is ON.

    Extra controls appear: set the Aim axis to Z and the Up axis to X.

  5. Click Go, then click the sphere. The cone now points toward the sphere.

  6. With nothing picked, pick the sphere, choose Transform > Move and move the sphere.

    Notice that the cone continues to point at the sphere.

Hints and tips

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 constraint object stretches the bone.

Normally, you should create IK handles for a skeleton joint (using Animation > IK > Add IK Handle ) and then constrain the IK handle to an object. To make this easier, if Animation > Tools > Constrain To is applied to a skeleton joint, an IK handle is created and constrained to the selected object.

Edit UV constraints

How to pick and modify any UV constraint assigned to a constraint target object.

Edit UV constraints

  1. Choose Animation > Tools > Edit UV Constraint .
  2. Pick the UV constraint target object or constrained object.

    All of the UV constraints related to the picked object will be displayed as markers.

  3. Pick a UV marker or -select an object. The marker is picked when it turns red.
  4. Click the UV marker and move it or enter the UV coordinates in the prompt line.
    NoteYou can also edit a UV constraint from the Information window by opening the Constraint Info section.

Turn constraints on or off

Use Animation > Edit > Constraints On/Off to enable or disable constraints.

When a constraint is OFF, it behaves as if it does not exist.

This function makes it easier to turn on or turn off a group of constraints. For example, you can toggle states of all existing constraints without picking any of them; set constraints of a group of active objects to be the same state; make changes only on the selected types of constraints (say, only change point constraint); or make changes only to the constraints of your picked hierarchies. You can choose to use the constraints either on the constrained side, or the constraining side of the objects.

To turn constraints on or off

An individual constraint can be turned ON or OFF from the Information Window when the constrained object is picked.

  1. If the Active option is on, pick the objects whose constraints you wish to affect.
  2. Choose Animation > Edit > Constraints On/Off to set their states (ON or OFF according to the options’ setup.)

Turn constraint display on and off

Use Animation > Show > Constraints to display the constraints on your model while you are working on animation improvements.

To turn constraint display on or off

  1. Create a constraint using Animation > Tools > Constrain To or Animation > Tools > Create Constraint .
  2. Choose Animation > Show > Constraints to turn the display of constraints off. To turn the display back on, select the function again.

Delete Constraints

Use Delete > Animation > Delete Constraints to remove constraints from your animation.

To delete constraints

  1. Create a skeleton using Animation > IK > New Skeleton , and add one or more constraints to the skeleton’s joint nodes using Animation > Tools > Create Constraint .
  2. Choose Delete > Animation > Delete Constraints to delete the constraints on one of the joint nodes. A confirmation box appears, asking you if you want to delete constraints on selected DAG nodes.
  3. Click YES or type the letter y to remove the constraints on the selected joint. No action is taken if you click NO or type the letter n.