Project 7b: Character Rigging

Goal To rig a simple character.
Prerequisite Exercises

Character rigging involves a lot of complexity and a certain amount of indirection. To allow a character to animate, you place a set of joints inside it, which will act similar to bones in a human skeleton. Eventually, when a joint rotates, it will deform the mesh around it like you might expect. However, animators will not be touching the joints directly. Instead they will animate cons (For "controls", also called "anims") that will control the bones that will deform the mesh. This may seem convoluted, but it allows a lot of flexibility to give the animator what they need. We will be using the Animation menu set for this project.

  1. The first task is to download several files. We will be rigging the Mouse character. You will also need these scripts, this shelf, and these icons. These scripts were created by Jason Scheifer, a superstar of rigging, and will occasionally useful for this assignment. You will also need the following anim files for setting up anim curves.

  2. From the Start menu, go to My Documents → maya → 2008. Extract the archive into the scripts folder. Navigate to the prefs folder. Place the shelf_Rigging.mel in shelves and extract the into the icons folder. If you already have Maya open, you will have to restart. When you do you should have a new Rigging shelf. We will explain the different scripts as we need them.

  3. In the Side view, use the Skeleton → Joint Tool to create a joint chain along the spine. From the bottom up, name these four joints: root_joint, spine_1_joint, spine_2_joint, and head_joint. Having a clear and consistent naming scheme is a great help in rigging since it allows you to automatically handle certain tasks with scripts.

  4. Create a two joint chain from the base of the tail to the tip. Use the "Split selected joint" script from the Rigging shelf to split the chain into 8 segments. Rename the joints tail_1_joint, tail_2_joint, tail_3_joint, etc. Parent tail_1_joint under the root_joint.

  5. We will need to create a number of joint chains to control the various parts of the head. The mouth and nose chains are the simplest and can be created in the Side view. Create one joint at the base of the jaw/nose and another at the tip. Name these joints mouth_1_joint, mouth_2_joint, nose_1_joint, and nose_2_joint. Parent these chains under the head_joint.

  6. To create the ear joint chains, create a simple joint chain in the Side view from the base of the ear to the tip. In the perspective view, move the base joint to the base of one of the ears. The joint chain will still not be completely inside the ear, so rotate the base joint until the tip is inside. After you have rotated the base joint, select it and go to Modify → Freeze Transformations. This will eliminate the rotate that you added. Name these joints left_ear_1_joint, left_ear_2_joint, right_ear_1_joint, and right_ear_2_joint. Parent these chains under the head_joint.

  7. For the last joints, create a single joint for each eye. To place the joint exactly in the middle of the eye, select the eye, then the joint and then go to Constrain → Point. Delete the constraint that is created under the joint in the Outliner. The joint should remain in the center of the eye. Name these joints left_eye_joint and right_eye_joint. Parent these joints under the head_joint.

  8. Now that we have our basic joints in place, we can start adding more sophisticated control over them. We'll start with the tail. It would be a hassle to control each individual joint in the tail and so we will use an IK Spline to control them instead. To start, use the CV Curve Tool to create a curve passing through the tail. Snap each new CV to a joint in the tail chain. Name this curve tail_curve.

    Go to Skeleton → IK Spline Tool (Options) and disable Auto create curve. To create the IK Spline, select tail_9_joint, then tail_1_joint, then tail_curve. Name the newly created IK Handle tail_ik_handle. You will not be able to control the tail just yet.

    Create three single joints, snapping them to tail_1_joint, tail_5_joint, and tail_9_joint respectively. Name these joints curve_control_1_joint, curve_control_2_joint, and curve_control_3_joint. Select these joints and then the curve and go to Skin → Bind Skin → Smooth Bind. This will make the curve control joints deform the curve, which will in turn deform the tail joint chain. Try moving the control joints and see how the tail joints react.

  9. It would be annoying if the animator had to select these control joints and so we will make some anims for them to animate instead. Create three NURBS circles and place them near the three curve control joints. Snap each of the pivots to the respective control joint. Name these anims tail_base_anim, tail_mid_anim, and tail_end_anim. Be sure to Freeze Transformations on these anims and then parent each control joint under its anim.

    Select the tail_curve and create a group (Edit → Group). Name this group tail_grp. Parent the tail anims and the tail_ik_handle under this group. Lock and hide all the channels but the rotate ones on the tail_base_anim. Lock and hide all the channels but the rotate and translate ones for tail_mid_anim and tail_end_anim. Hide tail_curve, tail_ik_handle, and curve control joints. Unparent the tail_grp.

    If you try rotating the tail_grp, you will notice that some objects rotate twice as much. To fix this we need to go the attributes of tail_curve (Not tail_curveShape) and deselect Inherits Transform. Unfortunately, if we do this now, the position of the tail will change, which is no good. First we must Freeze Transformations on the tail_grp, but before we can do that, we must unbind the tail_curve.

    So the correct proceedure goes as follows. Select the tail_curve and go to Skin → Detach Skin. Select the tail_grp and Freeze Transformations on it. Select the control joints and the tail_curve and rebind them. Go to the attributes of the tail_curve and turn off Inherits Transform. Now when you rotate the tail_grp, everything should work as expected.

  10. Create some NURBS circles for the spine anims. Manipulate them so that they fit around the body near the four spine joints. Freeze Transformations on the anims and name them root_anim, spine_1_anim, spine_2_anim, and head_anim. Lock and hide all channels except the rotation for the top three spine anims. Leave the rotate and translate unlocked and visible for the root_anim. Parent the head_anim under spine_2_anim. Parent spine_2_anim under spine_1_anim. Parent spine_1_anim under root_anim.

    We will have these anims control the spine through a set of constraints. Select the root_anim, then the root_joint and use Constrain &rarr Parent. For the other three spine joints, Orient constrain them to their respective anims with Maintain offset turned on. To make the tail follow the root_anim, select the root_anim then the tail_grp and go to Constrain → Parent.

  11. We will deal with the mouth, nose, and ears in a similar manner. Place a NURBS circle near the nose, mouth, and the ears. Freeze Transformations on these circles and name them mouth_anim, nose_anim, left_ear_anim, and right_ear_anim. Lock and hide all channels except rotate for these anims. Use Orient constraints to allow these anims to control the first joint of these chains. Move the pivot of each anim to the center of the joint it is rotating. Group all the head anims into a head_anims group. Select the head_anim, then the head_anims group and go to Constrain → Parent. This will make the head anims follow when you turn the head.

  12. To rig the eyes, first we will bind the eye geometry to the eye joints so that we can see if our eye rig is working. Select one of the eye joints and its respective geometry and go to Skin → Bind Skin → Smooth Bind (Options). In the options, set "Bind to" to Selected joints. Do the same for the other eye. Now when you rotate the eye joints, the eye geometry should follow.

    Go to the front view and create two NURBS circles, snapping their centers to the middle of the eyes. Move these circles out in front of the face. Freeze Transformations on them and name them left_eye_anim and right_eye_anim. Create another NURBS circle that surrounds the other two. Freeze Transformations on this and name it both_eyes_anim. Parent both eye anims under the both_eyes_anim.

    Now to make the anims control the eyes. Select either the left or right eye anim, then its respective eye joint and go to Constrain → Aim (Options). Turn on Maintain offset and change the Aim vector to (0, 0, 1). Do this for the other eye as well. We want the eyes to move with the head so select the head_anim and then both_eyes_anim and go to Constrain → Parent. Lock and hide all channels on all three eye anims except translate.

  13. Now for some clean up and organization. Import the file, which should be in the archive you downloaded. Scale it until it covers the base of the mouse. Freeze Transformations on it and name it mouse_top_con. Group all the geometry and name the group mesh_grp. Parent the mesh_grp, tail_grp, head_anims, root_anim, and both_eyes_anim under the mouse_top_con. The mouse_top_con should now be the only top level object besides the cameras and default sets.

    You may notice that when you move the top con that the eyes fly out of the head. This is a problem called double translation and is a common problem in rigging. It happens because the eyes are being translated by the eye joints, but are also a child of the top con and so receive a translation when it is moved. The solution to this is simple. Go to the attributes of the mesh_grp and turn off Inherits Transform. The eyes should now move correctly. The rest of the geometry won't move, but we will fix that soon.

    Create a new Display Layer called anims and add all of your anims except the top con to it. Create another layer called mesh and add the mesh_grp to it. Create another layer called joints and add root_joint to it.

  14. Before we bind the skeleton, first we are going to create a few Blend Shapes. Blend Shapes are customized deformations that can capture subtle and complex changes that would be difficult to control with joints. To create a Blend Shape, first duplicate the body geometry and move it to the side. Now move the geometry around to get the shape you want. In this case, we will be making the left eye blink.

    To create the Blend Shape, select the deformed geometry, then the original and go to Create Deformers → Blend Shape (Options). Call the BlendShape node eye_blinks. You can animate the Blend Shape by going to Window → Animation Editors → Blend Shape. Repeat the process for the right eye, but instead of going through Create Deformers, use Edit Deformers → Blend Shape → Add instead. If you want to modify your Blend Shapes later, rename the duplicated geometry to something meaningful and hide it. If you like the deformation you can delete the geometry and the Blend Shape will remain.

  15. The last step is to bind the geometry to the skeleton and then do some touch up. Select the body geometry and the root_joint and go to Skin → Bind Skin → Smooth Bind (Options). Reset the settings to the defaults and then set Max influences to 1 and turn off Maintain max influences. Now when you move your joints, the geometry should deform with them. You will probably notice that most of the deformations aren't that great.

    To make sure that the correct parts of the mesh deform when a joint is moved you must go through a process called weight painting. This is accomplished by selecting the mesh and going to Skin → Edit Smooth Skin → Paint Skin Weights Tool. In the Tool Settings, you can select a joint and then you can paint what that joint affects on the mesh. For the Painter operation, you will want to use Add or Smooth. The Replace operation can give some strange results and so should be avoided.

  16. The last step is to test the rig. Make sure everything works correctly and touch up any weight painting that needs work.

Turn In You will be graded on the following: Turn in the following: