Controls and Constraints

Maya: Rigging Fundamentals

 

NOTE BEFORE BEGINNING

My method for teaching curve controls on fk joints has changed since I created this tutorial. However this method is still a valid one to understand, especially regarding getting to know the power of constraints. Using a lot of constraints can slow down rigs so it’s a little frowned upon to use constraints for every control when technically you don’t have to. For fk chains I now use the method called “parenting curves as shape nodes”. But in many situations constraints are still the prefered method.

To see a better tutorial on creating pure fk controls on joints see the custom control page under autorigging. I’ll update this page in the future.

 

CURVE CONTROL CONSTRAINTS

Controls make your rig pretty and make it easier to select animatable objects. Curves have become a bit of a standard in Maya as you can draw out any shape as a control, you can easily switch off their visibility under the show menu and you can prioritise their selection order giving them selection priority over other objects.

Prioritising Curve Selection Order
In maya we can prioritise our curves so they have priority selection importance instead of other objects such as joints.

By default nurbs curves have a low priority so we can change this manually in

window>settings/preferences>preferences>Settings/Selection>Priority>Presets (drop down)

Change Presets “custom”

And under priority scroll down to “Nurbs Curve” and set the priority to 10

YouTube / andrew silke - via Iframely

Parenting with Curves VS Constraints
The easiest way to make a curve a control is to parent the animatable objects beneath it.

*Unfortunately while selecting a parented curve control Maya displays all children as well. This makes selecting objects difficult as we don’t know which controls are active.

*A feature called “selection child highlighting” under prefs now allows users to change this, so this tutorial is dated.

YouTube / andrew silke - via Iframely

 

CONSTRAINTS PRIORITY OVER PARENTING

We want to be clear about how constraints have priority over parenting. This can be demo’d clearly and has many ramifications for both animators and riggers in a variety of situations.

YouTube / andrew silke - via Iframely

 

MAINTAIN OFFSET ON CONSTRAINTS

“Maintain Offset” is a checkbox under in most of our contraint options. If on it will keep the constrained object in it’s current position. If off it will snap the center of the object to the center of the object it is being constrained to.

http://www.youtube.com/watch?v=strongU9KUOLgNQ<title>none</title>

 

MAKING A CURVE CONTROL

1. Creating, Positioning and Zeroing Out Controls.
A curve control needs to be grouped to make sure it is zero’d out in rotation when placed on a rig.

We’ll group the curve object and move and rotate the group into position leaving the curve zero’d.

A. Create a curve.
B. Group it (ctrl g)
C. Match the rotation and translation of the group to the joint. For the elbow match the group to the position and rotation of the elbow joint.

To match position and rotation we can use a parent constraint then delete it. In the case of an elbow we select the elbow joint and then the group and create a Parent Constraint with and “maintain offset” off. That will match the group to the elbow joint. Once completed simply delete the constraint, that’ll leave the group in the same rotation and translation as the elbow joint.

D. Now rotate and scale the curve as desired and Freeze transforms on rotation scale and translation. Keep in mind this will reset the local rotation manipulator.

YouTube / andrew silke - via Iframely

2. Parent the control into the hierachy using constraints

Now that our curve control is positioned and oriented correctly. We need to have it move with the joints above in the chain. In the case of the elbow group and control curve.

– Parent Constrain the Group to the Shoulder joint with maintain offset on, this will parent the Group but keep it in the same position.

– Shift Select the Shoulder joint then the Group, go Parent Constrain Options (maintain offset off)
– This will Parent Constrain the Group to the Shoulder whilst maintaining its position.

Now when the shoulder rotates the elbow control will move with it.

YouTube / andrew silke - via Iframely

3. The Curve Takes Control
Now we want the Elbow Curve Control to drive the Elbow Joint, Again we can use a parent constraint this time constraining the Elbow Joint to the Curve Control.

– Shift Select the Control Curve then the Elbow Joint go Parent Constrain Options (maintain offset off)
– This will Parent Constrain the Elbow Joint to the Curve Control keep it in the same position.

YouTube / andrew silke - via Iframely

 

BUILDING A CONTROL IN ONE STEP

This video we’ll build a control all in one step to see how quickly building from scratch can be. In this case we’ll build the wrist.

YouTube / andrew silke - via Iframely

Checking Gimbal on the Wrist
The following video is a demo of checking gimbal rotation on the wrist. We should check gimbal order on all controls that have multi axis rotation abilities.

YouTube / andrew silke - via Iframely

 

BREAKING UP ROT AND POS ON A CONTROL

So far we’ve created Control Curves which work exactly like a parenting structure. Now we’ll be creative and choose more specifically how a control inherits rotation and translation individually and then passes it on. this is shown in the example of a shoulder control.

A handy setup for a shoulder is that it moves with the clavicle but does not rotate with it. This allows the animator to rotate the spine and clavical whilst keeping an fk arm from orienting with it.

Setting up a control with translation and orientation separated.

Instead of parent constraining the Shoulder Curve Control Group to the joint above we only Point (position) constrain it leaving the rotation free. We can then Orient constrain the group to a control much lower in the hierarchy such as the hips.

YouTube / andrew silke - via Iframely

 

SWITCHABLE PARENT SPACE ON A CONTROL

An advanced option is having the animator choose which object his control is oriented or point constrained to. We can make a drop down attribute or slider options in the channel box of the control.

This is achieved in the step 2. Orient or Point constraining the Group of the Curve Control to the rig. Instead of constraining to one object you can constrain to multiple then let the animator decide via an attribute in the channel box.

**You’ll need to know how to use driven keys and add attributes which we’ll cover in later lessons.

YouTube / andrew silke - via Iframely

 

MAKING COOL CURVE CONTROL SHAPES

There’s a limitation with maya’s curves that makes it hard to create curve objects with multiple splines. This would make it difficult to create an object such as a smiley face because each eye, the head and mouth would all be individual objects. The solution is to make sure all the curve shapes share the same transform node.

Here how to do it…

1. Select all the curves you want to have as one object
2. Run this script

global proc groupUnderTransform(){
string $selCurves[] = `ls -sl`;
makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;
select -deselect $selCurves[0];
pickWalk -d down;
select -add $selCurves[0];
parent -r -s;
select -r $selCurves[0];
}
groupUnderTransform;

3. Delete the empty groups.

YouTube / andrew silke - via Iframely

 
More information can be found on CG Tutes Plus with all the details about how it works and how to do it manually.
http://cg.tutsplus.com/tutorials/autodesk-maya/quick-tip-creating-compound-curve-icons-in-maya/

Instructor

Andrew Silke

Leave a reply