Constraints
Constraints are basically joints, affecting the movement of dynamic objects in a scene, restricting their motion in very specific ways dependent on the type of constraint applied. Dynamics offers a variety of constraint types, providing a means to produce very controlled dynamic simulations. Additionally, constraints can be combined together (by way of Locators) producing even more control to complex dynamic simulations.
Using Constraints
Constraints in dynamics are simply joints that connect two dynamic bodies together. Each constraint provides a different type of joint, limiting the motions of the dynamic objects in very specific ways. Typically, constraints are used to relate the dynamic motion of an active rigid body item to that of a static or animated passive rigid body item. For instance, if you wanted to animate a pair of dice swaying from the rearview mirror of a car, the car itself (including the mirror) would be defined as a passive rigid body, and the pair of dice within would be defined as an active rigid body. Next, you would assign a point constraint to the mirror and the pair of dice and position it near the mirror. If the car were animated to move as if it was traveling over rough terrain, running a subsequent dynamics simulation would then produce an incredibly realistic secondary swinging motion to the pair of dice without the need to add a single keyframe.
Constraints are also a powerful way to provide control of active dynamic objects, relating the motion of one to that of another. This is handled in the same way as the above example, but both items would be designated as active rigid bodies. Both objects would then move relative to the motions of the other, controlled by the constraint joint. Furthermore, series of constraints can be added to consecutive objects, providing linked motions for the entire length of items. This is applied by selecting the chain of items in order and then applying the constraint.
Applying Constraints
Constraints can be added to scenes like any other item: in the Items lists, click Add Item. First, select the target items you wish to join together, and select a constraint using the various constraint buttons found in the toolbox of the Setup interface.
When created, the constraint item automatically links to the selected items. To link two items together, follow these steps:
1. | First select the master or parent item. This is typically the keyframed or static passive dynamic object. |
2. | Next, select the child or auxiliary item, which is always an active dynamic object. |
3. | Choose from one of the constraint options available. Click the button to add the item to the scene. |
When a constraint is added this way, the constraint item automatically populates the Body A and Body B options within the constraint. It is also positioned at exactly the middle point between the centers of the two items. Depending on your intentions, this may not be the optimal position for the constraint. The motion of the child item (Body B) originates from the position of the constraint item itself, so it needs to be positioned appropriately.
Removing Constraints
Constraints can be removed from the scene like any other item. Simply select the target constraint and press Del, or in the menu bar, click Edit > Delete.
Breaking Joints
You can break a constraint once a certain force threshold is achieved. This essentially disables the constraint, allowing connected objects to fall away from each other. This is useful if, for instance, two objects were tethered together by a chain and when the chain is stressed to a specific point, the links would fall apart, each link then acting as an individual dynamic body, and the tethered item would no longer be under the influence of the constraint. Clever rigging types can also link a morph of the chain to the isBroken channel of the constraint, so that once it breaks, the link itself would appear broken. To activate this function, toggle the Stress Break option of the Constraint, and set a lower threshold. Once that value or greater is achieved through a combination of the forces applied to the item, including gravity, forces and any force imparted by the item's own movements, the link breaks apart.