Character Rigging can be categorized into 3 general sections. Skeleton Creation, Animation Control Setup, and Weight Painting. When you are done with these, you will test your rig before you give it to an animator.
The whole skeleton can be created with the Maya Joint tool. Under the Animation Menu Group, click on Skeleton >> Joint Tool Options.
In the side view, create the Root Joint at the pelvis of the body and then the first Spine joint directly above it. Continue to create as many joints as necessary until you reach the end of the top of the head.
If you need to readjust joints, ONLY USE TranslateX channel to move and the Joint Orient Attribute for rotation. This will ensure a clean skeleton without unncessary channel information. To get to the Joint Orient boxes, hit Control-A for the joint you want to modify. To ensure that you are doing this correctly, the Transform Attributes for Rotation should all say 0.0, as should the Translation for y and z.
Be sure to name your joints!! This will be important later (Step 7).
We will be building the left half of the skeleton first. The Knee is bent just a little so that the IK Handle control, that we add later, will know which way to bend (when we create the IK Handle later on).
Make the skeleton for the leg starting in the side view. If you make the skeleton in this view, it will ensure that the entire skeleton for the leg is in the same plane (which also helps the IK Handle know which way to bend). Never create joints in the persp view! Start from the hip and keep creating joints down to the toes as shown.
When you are done creating the leg skeleton in the side view, go to the front view and move the hip joint so that it is centered in the left leg. (Make sure you are following the joint naming convention as you go... the names are displayed in the images below).
From the top view create the skeleton for the arm starting with the Clavicle. Make sure the elbow is bent just a tad so that the IK handles will know which way to bend. (Although, you can manually set a Preferred Angle for the joint and it will do the same thing.)
A preffered angle tells maya which way the joints should rotate or bend. When this this is set and we create a IK handle talked about later, maya will know which way we want that chain to rotate and make our lifes easier. When it isn't set maya will guess which way it should bend and this can lead to having a elbow or knee bend in the wrong direction and look broken. When we have a joint bend just a little bit maya can make a correct guess and make the elbow bend correctly, only when the joints are perfectly straight is there a problem.
Here is where you should check that the joint axes are in the correct direction. Note that the positive y direction for the elbow is pointing forward whereas the positive y direction for the wrist is pointing downward. To change an axes that is pointing in the wrong direction, use the joint orient box in the attributes editor for the joint.
When you have all of the axes pointing in the correct direction, you should angle the wrist downward just a touch so that the palm will be at the correct height to attach to the fingers. You can angle the wrist downward by clicking on the wrist joint and changing the joint orient. DO NOT use translate y on the palm to achieve this angle! Remember, you want to keep translation and rotation off of the joints themselves. The root of each joint chain should be the only joint that has translation other than x. Look at the front view image to see what the angled down wrist should look like.
First go to the top view and create the middle finger joint chain (as straight as possible! You may use grid snapping - press x when you are placing each joint - and then adjust the length of the finger aftwerwards - by changing the x translation - to ensure that you will get a perfectly straight finger). Then duplicate the middle finger for the index, ring, and pinky fingers. You will have to rotate the fingers horizontally, make sure you are using the joint orient rotation in the Joints, and NOT the rotation under the Transform Attributes tab in the attribute editor.
Now make the thumb in the top view. Make sure that you rotate it after you create the joint chain so that it matches the side view picture of the thumb skeleton (below). Make sure that the finger skeletons are in the correct placement in the side view (by creating the finger joints in the top view, they will show up on the top plane of the grid - which will be near the feet of the model).
The positive y axis should be pointing downward for all of the fingers, but inward towards the hand for the thumb.
With all the joints created, now you have to piece them all together into one single skeleton. When parenting joints together you want to choose the child first then the parent and press "p". Click on the Clavicle joint, shift-click the Neck_1 joint, and then press the "p" key to parent the arms to the spine. Next click on the Hip joint, shift-click the root/pelvis joint, and press "p".
(Extra Credit) Parent all of the fingers to the palm joint by first clicking on all of the children, (index_LFT_01, middle_LFT_01, ring_LFT_01, pinky_LFT_01, and thumb_LFT_01) and then the parent (palm_LFT_01) and then hitting "p" on the keyboard.
Now we need to create the right side. This process is easy. Before we start make sure every joint created so far is named correctly. Then click on the Clavicle (collar) Joint and then go to the Skeleton >> Mirror Joint Option menu. It should be mirrored across the YZ, Behavior Function, and if you used my naming scheme (which you should have done throughout this process - if not, do it now), Search for: LFT and Replace with RGT. Do the same for the Leg chain by clicking on the hip.
Expand the Skeleton Hierachy in the Outliner and select all the joints except for the end joints (having a good naming scheme will make the end joints easy to spot). Then select the model and, in the Animation Menu Group, go to the Skin>>Bind Skin>>smooth bind options. Choose the options from the image below and then click bind. Now your rig will be a pretty rainbow color (hooray!) if not, something is wrong and you should ask a TA for help.
Before going any further, set the neutral pose for the character by clicking on the top level Joint (Root/Pelvis) and select Skeleton>>Retargeting>>Set Neutral Pose. This will let you get back to the original pose of the character by selecting the root and then clicking Skeleton>>Retargeting>>Go To Neutral Pose.
DO NOT DELETE HISTORY AFTER THIS POINT! Deleting your history will destroy the skin, so you may wish to save your work now (honestly, save your work right now).
Now we will set up the controls that the animator will use to animate the characters with. So it's important that they are easy to understand and follows a set standard. For this tutorial, we will use the following standards.
Add the controls to the layers that already exist in the maya file (called Left, Right, and Center). All the controls must also have TranslateXYZ and RotateXYZ values of 0 and you should lock and hide all channels that will not be used for the specific Control. These will be pointed out in the tutorial.
You will find the controls inside a group node called "controls" in the maya file. Unhide them and duplicate as needed for your rig. For the Root/Pelvis Joint we will use the Square. Snap the square to the root (by pressing v when you are moving the square, the yellow square around the local pivot should turn into a circle to indicate that you are going to snap to a point).
Freeze its transformations (Modify >> Free Transformation) and then point and orient constrain the root to the control. To make any type of constraint you think which object needs to control/constrain the other. When you make a constraint you need to select the controller first then the controlee(or object being controlled). To Point and Orient constrain, select the square first, then the root, and then go to the Constrain>>Point and then Constrain>>Orient. If your model rotates or changes at all, UNDO and then go to the options menu for either the Point or Orient constraints and check the box labeled "Maintain Offset". YOUR MODEL SHOULD NOT MOVE WHILE APPLYING ANY OF THE CONTROLS TO IT!!!!!!. If it does, you need to fix it right away, so please ask for help if you are having any trouble.
To make sure this control is green, add them to the Center Display Layer by selecting the square and then right-clicking on Center>>Add Selected Objects in the Layers section of the channel box. Name your square "root_CON_CEN" in the outliner.
'To check that your root_CON is working correctly, select only the square and move it (initially all of the trasnlation and rotation in the control box should be 0). Rotate the square as well. When you do this, your model should follow the box. Don't worry that the eyes don't follow the model, this will be fixed later in the tutorial.
Duplicate the circle controler enough times so you have one for each spine. Snap the Circle controls to each spine joint. You may change the shape of some of the circles to fit around the body (don't do this unless you have to, too many different shapes can confuse the animators later). To do this, right click on the circle and select "control vertex", move the vertices so that the shape resembles the picture below (most notable the spine_CEN_04 joint and neck_CEN_02 joint). Now freeze its transformation and do an orient constraint on it (NO point constraint, we only want the spine joints to rotate so that the model moves realistically). Select the Control first, then the joint, and then the orient constraint command.
Place only one neck control and connect it to neck_CEN_02. Call this control neck_CON_CEN_01.
Next, we point constraint the newly created spine and neck controls to their respective joints. So, while the Controls will determine how the joints will rotate, the joints themselves will be telling the controls where to translate. Click the joint and then the control, and then point contraint command.
Finally, we parent all the spine and neck controls to the Root Control we had set up before. The spine joints should each be parented to the joint beneath them so that the top portion of the spine rotates with the lower portion. As an example, select spine_CON_CEN_04 and then spine_CON_CEN_03 and press "p". Your outliner should look like it does below (after creating only the spine joints, the neck joints should be parented under the spine in the same fashion.
Since these are spine and neck controls, we do not want the animator to translate them. If there is something that you don't want an animator to play with, LOCK and HIDE it! Otherwise they WILL touch it and get mad at you and tell you to fix your rig. Select each spine and neck control, in the Channels box control-click on the
labels called Translate X, Translate Y, Translate Z, Scale X, Scale Y, and Scale Z. Now those attributes should be highlighted. Right-click on one of the selected labels and select "Lock Selected". Now the values in these attributes should be grey. Right-click on one of the selected labels and select "Hide Selected".
Now you should only see Rotate and Visibility in the Channel box. Say you mess up something and want the other attributes back: right-click in the channel box and select Editors>>Channel Control. There will be a list of Nonkeyable Hidden names, search for the name of the attribute that you want back, select it, and hit the "
< While you are at it, lock and hide the scale options for the root_CON_CEN. Test that your rig is working by clicking on each spine control and rotating it. Your model is not weight painted yet, so it will be a bit (or a lot) choppy, but we will fix that later. When you play with your rig, always make sure to put it back in the neutral position. Also, save an iteration of your rig periodically.
It is really important that you don't save over the same file for this, you will definitely want to go back at some point - you do not want to have to do this over again.
Now to take care of the eyes. Select the eyes group in the outliner (under the rigged_OldMan group) and parent them underneath the head_CEN_01 joint. Now when you rotate the neck_CON_CEN_01 control, the eyes will move with the head
For the head tilt motion, we will be using Set Driven Keys instead of constraints (aka the controls that we have been setting up).
Select the neck_CON_CEN_01 control, right click on it's channel box, and choose Add Attribute. Give the attribute a name (headtilt_FB) and use the settings in the image below and then press okay. This will be our forward and backwards head motion attribute. For the side to side head tilt, create a second attribute (headtilt_SS) with the same settings.
Next we pull up the Set Driven Key by going to Animate>>Set Driven Key>>Set Options. Click on the neck_CON_CEN_01 control and load that as driver. Click on the neck_CEN_03 joint and load that as Driven. For the Driver Attribute (in the right box), select the newly created Headtilt_FB attribute. For the driven, find out what rotation direction makes the head tilt forward and backwards and select that as the Driven. With both the driver and driven channel box values at 0, press Key to hook them up together. So now, when the Headtilt_FB attribute is at 0, the head joint rotation(X,Y,or Z depending on your rig) will also be 0.
Next we have to set the max forward tilt and the max backwards tilt. Select the neck_CON_CEN_01 control, and change the Headtilt_F attribute to +10. Then Select the neck_CEN_03 joint and then rotate it until it reaches the max forward tilt that a human head should have (this will most likely be around 20 degrees - this is where you may want to do some rough weight painting to make sure that the chin is controlled by the neck_CEN_03 joint). In the Set Driven Key dialogue box, with all the same selections as before, click key. Now change the Headtilt_F to -10, tilt the neck_CEN_03 joint back to a reasonable amount (about 50 degrees), and click key in the Set Driven dialogue box.
If you were to change the values of Headtilt_F from -10 through to +10, you will now see the head tilt forward and backwards. Create the side to side head tilt in the same manner but with the Headtilt_SS instead. The side to side movement should be the model bringing his ear towards his shoulder (not turning his head left and right).
Preiodically go back to the neutral pose by selecting the root joint then clicking Skeleton>>Retargeting>>Go To Neutral Pose. If you get an error trying to do this, you have created something incorrectly in a previous step which you should redo or ask a TA for help. (Another note - save in iterations! This will save you a lot of time if you mess up).
Select the IK handle tool, Skeleton>>IKHandle, click on the hip_LFT_01 joint, and then the ankle_LFT_01 joint. An IK handle should have been created to let you maneuver the legs. To control the knee rotation we will need a pole vector constraint for the IK Handle. Create a new square control and place it in front of the knee (use vertex snapping by holding "v" while you move the square into place. If you don't line the square up correctly, your model will be forced into strange positions). Name the control knee_CON_LFT_01, name the IK handle leg_IKH_LFT_01, name the effector (which will show up underneath the hip joint in the outliner) leg_EFF_LFT_01. Select the control first, then the IK Handle, and finally go to Constrain>>Pole Vector. Lock and hide the rotate and scale attributes in the channel box.
Go back to the neutral pose by selecting the root joint then clicking Skeleton>>Retargeting>>Go To Neutral Pose. If you get an error trying to do this (and the knee control has not been moved from its origonal position) then the knee control was not placed correctly. Undo to right before you placed the pole constraint and position the knee con very carefully over the knee joint! These need to line up! Please ask a TA if you are not able to achieve the neutral pose at this point (Do not just move on and think you will fix it later).
A reverse foot lets us keep the foot flat while still being able to move the legs. First we duplicate the whole foot chain from the ankle on down. Select the ankle joint, and then go into the Edit >> Duplicate Special Options panel. Be sure to have "World" instead of "Parent" selected. This will ensure that the new foot is not attached to the main skeleton. Move it a little bit to the side so that we can see both feet joints at the same time. Rename the joints in the joint chain with reverse at the front (e.g. reverseankle_LFT_01). Next, point constrain the IK handle to the ankle of the Reverse Foot (click on the reverseankle_LFT_01 joint and then the IK Handle). Again, if your model moves, make sure that you have the "maintain offset" check box activated in the point constraint options. The reverse foot ankle now controls the IK Handle, which in turns controls the leg. To keep the feet from rotating, we Orient constrain each foot joint to the respective joint on the Reverse foot. So, Ankle to reverseankle, Heel to reverseheel, Toe to reversetoe.
Then we put a new Square Con under the foot, freeze its transformation and Point and Orient constrain the Reverse foot ankle to the Con, so the con is the controller of the reverse foot. Rename this square "leg_CON_LFT_01". Now when you move the con, the reverse foot (and in turn the foot) will move. Lock and Hide the scale attributes in the channel box.
To make the toes roll up and down, we will need another Set Driven Key setup. Create a new attribute on the foot con and hook it up to the toe joints just like the way we did with the head tilt setup. The attribute should be called "toeCurl". When the attribute is at 0, the toes should be normal, when the attribute is at 10, the toes should be up, when the attribute is at -10, the toes should curl downward. The driver will be the leg_CON_LFT_01 and the driven will be the reverseball_LFT_01 joint. When you are done hooking this up, hide the reverse foot!
Select the IK Handle tool and click from the shoulder_LFT_01 joint to the wrist_LFT_01 joint. Put a new square con behind the elbow (use the snap to vertex option while moving), freeze it's transformation, shift select the new Ik Handle and use the Pole vector constraint. CHECK YOUR NEUTRAL POSE HERE. If you cannot acheive the neural pose, go back to before you created the pole constraint and try positioning the elbow more carefully. Name the control elbow_CON_LFT_01, name the IK handle arm_IKH_LFT_01, name the effector (which will show up underneath the shoulder joint in the outliner) arm_EFF_LFT_01. Lock and hide the rotation and scale attributes in the channl box of the elbow_CON_LFT_01 control.
Put put a circle control near on the wrist, freeze transformations, and point constrain the IK Handle to it, name the con "arm_CON_LFT_01". Now constrain the rotation of the wrist to the arm con by placing an orient constraint on the wrist joint. Lock and hide the scales attribute for the wrist con. That should do it for general movement of the arm.
Controlling the fingers require a lot more work and even more attributes (hooray!). For each finger, we will need a finger curl and a finger spread attribute. For the finger spread attribute first add an attribute titled "indexSpread". Load the arm_CON_LFT_01 as the driver, load the index_LFT_01 joint as the driven. Use set driven keys to make the finger spread control the side to side movement of the finger. The fingers should spread outward when the spread is at its maximum, and inward when the spread is at its minimum. Go through the same process for the middleSpread, ringSpread, pinkySpread, and thumbSpread. YOU MUST ADD THE ATTRIBUTES IN THIS ORDER! This will make it much easier for the animator in the long run, so it is important that the channel box looks like the one shown below. For the thumb spread, the thumb should move up (maximum) and down (minimum).
Now add an attribute for the indexCurl. You will have to hook up the all 3 joints in a finger to the same Attribute. Select the arm_CON_LFT_01 and use indexCurl as a driver. Shift-click on the index_LFT_01, index_LFT_02, and index_LFT_03 joints and load them as driven. Select all three of the joints in the driven window and the correct axis of rotation for the finger curl (correct shown below). Key at 0, 10 and -10 where 10 will curl the fingers towards the palm and -10 will flex the finger upward. Do the same for the middleCurl, ringCurl, and pinkyCurl. The thumbCurl should be hooked up so that the thumb comes towards the palm, so this may be a different axis of rotation than the fingers (double check, if you set up the skeleton correctly, then you will be able to use the same axis).
Before you move everything around in your hierarchy, go through and create all of the controls for the other side of the body (sorry, there is no mirror control option - though feel free to script one if you are so inclined)
Rigging is all about hierarchies. The skeleton itself is just one big hierarchy and all the controls and IK Handles have to be parented and grouped accurately for the rig to work. What you need to do is create a new control shape and place it underneath the model in the viewport. This will be our Top_Con, the control that will let us move and rotate all the joints, ik's, objects, and controls. Group the IK Handles into one big node, joints into a single node, and the controls into a node. Now parent them to the Top Con. The actual model itself needs to be on the same lvl as the Top Con in order for it to work.
Weight painting is probably the longest part of the rigging process and very important in order to get good deformations from the model.
Note: You only need to paint half the model because you can just mirror the skin weights to the other side. SAVE BEFORE YOU MIRROR! If you don't and you mess up, there is no way to go back. Bad times if you copy the wrong side.
Bring up the painting interface by selecting the model and then going to Skin>>Edit Smooth Skin>>Paint Weight Tools. From here, select each joint in the paint tool and paint the right amount of influence it should have on the model by using the various brush options. Make sure to test the deformations as you paint by rotating the joints into different positions. You can do this by, Middle mouse clicking on the model while in painting mode, Middle Mouse click the rotation tool, and then left clicking the model to get back to the painting interface. Another option is to set up simple animations for the character and scrub back and forth with the timeline.
Once weight painting is done for one half of the model, we will need to mirror all the weights over to the other half. Select the model and then go to Skin>>Edit Smooth Skin>>Mirror Skin Weights Options. Use the options shown below. Be sure to check all the joints to make sure the mirroring worked okay. You might have to do some minor tweaks to the weights , especially since the model is not 100% even on both sides.
Now you must test the rig before you give it to the animator. Here is a general outline for this rig:
We will be looking for: