Connect one rigid to another.
From the Ragdoll menu, select one of the constraint options.
All constraint types share the same underlying Maya node, the
rdConstraint, but start their life with slightly different attribute values.
This constraint prevents the translate values of one rigid to change, relative another rigid. The result is a freely rotating rigid, pinned at a point somewhere on the other rigid.
When you want to match the orientation between two rigids, whilst letting them translate freely.
Make one rigid appear as the child of another, by locking both rotation and translation values. Counter-intuitively, this constraint is the most expensive to compute. But, sometimes you have have no choice, such as when you want to create a more complex collision shape by parenting multiple rigids together.
translation and partially locked
This constraint is very handy for knees and elbows, and anything that should only be allowed to rotate around a single axis.
translation and limited
For more complex joints, such as hips and shoulders, that should be allowed to rotate around all 3 axes in a very specific way. It includes a pre-defined limit on all axes, along with a default guide to drive a rigid towards its starting orientation.
Ignore Contact Constraint
A special constraint with both
Guide turned off, leaves only its ability to tell the solver to ignore contacts between the two constrained rigid bodies.
The above types mostly vary the "limit" attribute of a constraint, but what is a "limit"? A limit prevents the motion of one rigid relative another.
You can think of a limit as a inverted collider, in that a rigid body is allowed to move only within this collider; as opposed to outside of it. Under the hood, this is very much like how it actually works!
Degrees of Freedom
The axes of a limit are called "degrees of freedom" (or DOF) and comes in 6 flavours.
One or more of these can be used simultaneously to express almost any relationship between two rigids.
Twist and Swing
YZ axes of rotation have nicknames -
"swing". Twist is rendered like a pie whereas swing is rendered as a cone.
Twistis well suited for motion with only one degree of freedom, like elbows and knees
Swingcovers the rest; like shoulders, hips and wrists
Each axis can be in one of 3 possible states.
||A value less than 0 means "locked", it cannot change at all|
||A value of exactly 0 means "free", it is free to change|
||A value greater than 0 means "limited", it is free to move within this range|
When an axis is "limited", the value represents the amount it is limited, which is centimeters and degrees. The same as the
Rotate values of a regular control, as per the Maya preferences.
When an axis is
Limited it will respond to the
Limit Stiffness and
Limit Damping attributes. A limit can be made "soft" by reducing these values.
Soft Rotate Limit
Human "limits" are quite pliable. They flex, they give way to a strong-enough force being applied. Mechanical limits however are typically very hard, like the maximum permitted height of vehicle suspension.
Soft Translate Limit
Notice how the rigid is allowed to move outside of the limit, but is being gently pulled back. The strength and elastiticy of this effect is governed by the
Translate Limit Stiffness and
Translate Limit Damping.
Every constraint has 2 pivots called
Parent Frame and
The most finnicky part of pivots is editing rotations. For example, to make knees and elbows, you'll want to align the
Twist axis with the knee and this process has 2 steps.
- Rotate both
Child Framealign with the knee
- Rotate only the
Parent Frameto align the current pose of the knee with how far it should bend.
Make one rigid reach a given target pose.
Drawn as a transparent red/green pie between two rigid bodies, the Guide enables one rigid to reach a translation and/or rotation relative another rigid.
This represents the difference between where a rigid is, and where it wants to go. It is the target angle, your animation and how far away it currently is from the simulation.
Translation is drawn as a dotted line between a rigid and the animation.
When rigids have multiple constraints, it can be hard to tell them apart visually given they all share the same red/green colours. And if you're amongst the colour-blind things are even more challenging.
Give some extra flare to your constraints, by editing the
Constraint Outliner Style
Choose how constraints appear in the outliner.
||At the root of the outliner, as its own transform|
||As a child transform|
||As a shape|
rRigid node appears as a shape of any node you apply physics to, and normally constraints appear alongside them. But normal Maya constraints do not, and neither does the constraints you get with nCloth and nHair. So which do you prefer?
As a shape, alongside the
Maya Constraint Style
As a child, similar to native Maya constraints.
As a new transform at the root of the scene, similar to nCloth and nHair constraints. Group them, hide them; if you can imagine it, you can achieve it!
Whichever you prefer, it has no effect on the simulation and is strictly related to the Outliner only. They can also be re-parented after being created, it really doesn't matter where they are. So organise away!