Constraints (Alpha)

 

A constraint is an entity that binds several objects in the scene, allowing one of them to control the positions of the other. Such a feature can be especially useful when you are creating animations that involve additional objects such as tools or weapons.

Warning

Currently, all constraints except for the Points and Points with Spherical Position constraints, can only be applied to one object

There are the following types of constraints:

Constrain points attaches selected Point Controllers to a transform object (i.e. an object that has position, rotation and scale parameters): a joint, a mesh, a locator, or a group.
Constrain transform binds one transform object to another.
Constrain additional is used for binding several Additional Point Controllers to each other.
Look At constraint binds two transform objects so one object’s rotation is determined by the other’s position (as if one object is ‘looking’ at another).
Points with Spherical Positions works similarly to Constrain points, but it also takes into account the radius (distance between the constrained Point and the center of the transform object) of the transform object.

Many of these constraints work with transform objects.
A transform object is an object that has all of the following parameters:

  • Position (coordinates in the scene space)
  • Rotation
  • Scale

For example, a Joint is a transform object, as is a mesh or a locator.
A Point Controller is not a transform object, because it only has position with no rotation or scale.

Here, we’ll be taking a look at each one of these constraints, how they are applied and purposes they are used for.
 

Constrain Points

If you’d like to attach one or more Point Controllers to a transform object, use this option.

1. Select Point Controller(s)
2. Select a transform object.
A transform object is an object that has transform parameters - coordinates, rotations and scale - attached to it. A Mesh, for example, is a transform object, while a Point Controller is not (as it lacks both rotations and scale).
3. Select ConstrainPoints from the Commands menu:

Now, the constraint should be created. However, it won’t have any effect by default. To use the newly created constraint, you’ll have to enable it.
See the Activating Constraints section to learn how this is done.
 

Constrain Transform

For the cases when you need to associate objects that are not Point Controllers, you should use this option:

1. Select both objects

2. Select ConstrainTransform from the Commands menu:

3. The Transform window will appear:

4. In this window, set the ‘main’ object. it will control the other object.

Now, each one of the objects should have a Constraint behavior attached to it. This one is a little different from the behavior used with Point Controllers:

Constraint active
Same as in the behavior for Point Controllers (see above).

Constraint enabled on frame
Same as in the behavior for Point Controllers (see above).

Constraint rotation
This option defines how the rotation of the constrained object is affected when the object it is constrained to is rotated.

There are three possible values.

Compensate means the position of the constrained object is affected by the rotation of the object it is constrained to, but its global rotation is not affected:

Full means rotation is copied completely:

Off means rotation is not taken into account:

Constrain position
If this is enabled, the constrained object’s position is affected when the object it is constrained to is moving.

Just like in the previous case, these constraints can be switched on and off individually for each frame and interval.
 

Constrain Additional

This constraint is used to link one part of the rig to another.
It can be useful for constraining long body parts: spines, tails and such.

1. Select several Additional Controllers.
You’ll need at least 3 consecutive Additional Points (the Rigid Bodies associated with these points should form a chain).

2. Select ConstrainAdditionals from the Commands menu:

3. After this, the constraint should be created. Enable it the usual way, and everything should work as intended.
 

Look At Constraint

This constraint binds two transform objects in a way that makes one of the objects follow the other's direction, as if it is 'looking' at it.

1. Select two Transform objects.

2. Select ConstrainLook at from the Commands menu:

3. In the dialog that will appear, set one of the objects as a target:

4. Enable the constraint.

Now, the other object will be following its direction:

This constraint can be adjusted using a group of settings attached to the second (non-target) object. They can be found on the Object Properties panel, under the Constraint tab:

Constrain active
If this is on, the constraint is taken into account when the target object moves.
Enabled by default.

Up axis
These three values (X, Y and Z) set up the vector that’s used for calculating rotation.
Default values are 0.0, 1.0 and 0.0, meaning that the Y axis is used.
 

Points with Spherical Positions

This constraint is similar to Constrain Points, but with a major difference: it takes into account the distance between the points and the transform object’s center. Constrained points move across this center as if the transform object is a sphere.

1. Select the transform object.

2. Select the Point Controllers you’d like to constrain to it.

3. Select ConstrainPoints with spherical position from the Command menu:

4. Enable the constraint.

Now, the constrained points will follow the transform object by a circular trajectory:

Left: no constraint; Right: Spherical position constraint.
Note the difference in the points’ trajectory.
 

Settings

Constraint Index
The index number of the constraint that is currently active. Used for switching between multiple constraints.

Constraint Enabled
If this is enabled, constraint would influence the constrained Point’s position.

(target object name) fk root i…
The index number for the transform object that’s currently used to drive the points. Can be used to switch between multiple ‘target’ objects.

Another group of settings is Constraint View:

Here, there’s only one parameter:

Active
If this is enabled, the constrained Point Controller is marked with a red circle in the Viewport window.
 

Removing Constraints

To remove a constraint from a Point Controller:

1. Select the Point.

2. Select Constrain → Delete Point Constraint from the Commands menu:

After this, the constraint will be deleted from the scene.

Note

The Remove Constraints command only works with the Points and Points with Spherical Position constraints. Other constraints create a dedicated constraint object that's parented to the constrained object, which the user needs to delete in the Outliner manually.
 

Using Constraints

Activating Constraints

Simply creating a constraint won’t affect the animation. For it to have an effect, a constraint should be activated:

1. Select the constrained Point Controller (or several controllers).

2. Go to the Object Properties panel.

3. Open the Constraint tab:

4. There, turn on the Constraint enabled option:

Now, when you move the ‘target’ object, constrained Points will follow it:

Active constraints are marked with red circles in the Viewport:

Keep in mind, however, that a constraint activated this way would only work for the current frame or interpolation interval (the one that is currently pointed by the Current Frame Indicator at the Timeline) on which the constraint is enabled.

In case you need to activate a constraint on several frames/intervals:

1. Select the frames.

2. At the top of the Object Properties panel, switch from Apply on current frame to Apply on selected interval:

3. Activate the constraint as described above.

After this, it should work for every frame you’ve selected.

Note

If you attempt to constrain the same objects to each other, you will encounter a cycle error. To prevent that, only one constraint has to be active for the object at any given moment.

 

How do Constraints work

By default, all objects move in either Global or Local space.

The Local space refers to the coordinate system that counts the Parent object as the 'center'. When you’re moving the Child object, its Local Position and Local Rotation values are being displayed relative to the Parent object.

The Global space refers to the global coordinate system of the scene, so you can say that the object is moving in the scene’s Local space.
When the constraint is activated, the controlled objects are put into the controller object’s Local space - that allows the controller object to manipulate the position and rotation of the objects constrained to it.
If you know how to use the constraints, you can find some creative ways to use them.

For example, you need to animate a scene with the character extracting the sword from the scabbard.

Instead of constraining the sword to the hand and animating the holding hand’s movement, you can first animate the sword being drawn out of the scabbard and then constrain the hand to it - that way, you won’t have to counter-animate the hand’s rotation to account for the sword’s blade being contained inside the scabbard
 

Root Controller

Using Constraints, you can easily create a Root Controller: a tool that can be used to easily position the character as a whole.
 

Creating a Root Controller

To create a Root Controller, follow these steps:

1. Create a cube or any other transform object.
If you are creating a cube, for example, use Add → Cube from the Commands menu.

It is recommended to put this object on a separate Animation Track to make working with it more convenient.
To do this:

2. Before you create the cube, enable the Add to new layer option in the Commands → Add menu:

Alternatively, if you've already added it to the scene. you can select the object and click the Add track button at the bottom left corner of the Timeline:

It is also recommended to give this Track an unique name (such as Root).

The next step is to bind the character to the root object.

3. Select all the points of the rig.

4. Add the root object to the selection.

5. Select Constrain points from the Commands → Rig additional menu to create a constraint:

And with this, a Root Controller is created.
 

Using a Root Controller

Like any other constraint, once the controller is ready, it should be activated so it could be used to adjust the character’s position.

If you select any of the Point Controllers, you’ll see that they now have a new Constraint behavior on the Object Properties panel:

To activate the constraint, we'll need to turn on the Constraint enabled parameter in this group:

And with this, everything is set. Now you should be able to move the character by moving the root object.

Example

Was this article useful to you?

4
1