Animation > 
Constraints
 
 
 

A constraint is a restriction of the behavior of one object (the constrained object) based on the behavior of another object (the source object). In the real world, we are surrounded by constraints; for example gravity constrains us to the ground, or a dog is constrained by the length of his leash. In MotionBuilder, we use constraints to simulate these relationships between objects. For example, the constraint on a dog attached to a five-foot leash is X<5, meaning the dog’s motion, must be less than 5, the length of the leash. This simple constraint ensures that your dog behaves like it is on a leash. A control rig is actually a series of many constraints. The rig’s hand is constrained by the motion of the arm, which is constrained by the elbow joint, which in turn is constrained by the upper arm, and so on.

Constraints can be expressed in a number of forms, including formulae, positional information, hierarchal relationships.

Constraints are managed with the FBConstraint class.

The FBConstraint class gives you the ability to add a custom constraint to the Constraints list in MotionBuilder. This constraint can be a simple relation between models, or can have a more complex interface based on the FBConstraintLayout class. All of the configurability of MotionBuilder constraints is also available in the MotionBuilder version.

A constraint is linked to a model via a reference. A reference is a handle for an element in a scene that is stored in a list of items inside the constraint data structure. References may be grouped into logical ReferenceGroups. Reference manipulation is done using functions like FBConstraint::ReferenceGroupAdd, FBConstraint::ReferenceGet, FBConstraint::ReferenceRemove.

Constraints can be regular or deformer. This property is accessed with FBConstraint::Deformer.

The constraint layout class FBConstraintLayout is manipulated in exactly the same way as a traditional layout, with one added feature (similar to manipulators and devices).