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.
Unlike most of what you've done in Maya so far, many of the results of rigging can't be seen in the viewport. You'll have to use a combination
of the Outliner and the Hypergraph editor to see what is really going on. So here are a couple of tips:
Follow the directions carefully. With rigging, the order you do things, and even the order you select things matters. You may even want to check off the steps on a printout as you go.
Test, test, test. These are going to be the control setups that animators are going to be using for hours on end, so keep checking to make sure they work as they are supposed to. Oh yeah, and test.
You will have the choice of rigging one of two characters:
The Mouse. This tutorial was originally designed around rigging this character.
The Cat. A new character to rig with a similar build to the mouse. The joint layout will be slightly different and
the weight painting will be a bit trickier so rigging this character will be extra credit.
For reference, the final joint layout on the cat should look something like this front view and side view (similar to the results of steps 3-7 on the mouse).
You will occasionally be using a rigging shelf with scripts created by Jason Scheifer, a superstar of rigging, throughout the assignment. It already comes pre-packaged in
the production workspace.
The different scripts will be explained as you need them.
First, we have to design the skeleton that will move the mouse. We will start with the spine.
Open up the mouse file.
Make sure joints are visible in the Viewport (Show → Joints).
In the Side view, use the Skeleton → Joint Tool to create a joint chain along the spine. Start at the base of the mouse and work up, following the picture below. If the joints appear too big or small, you can adjust their size by going to Display → Animation → Joint Size... (this only affects how they are displayed, and not any internal structure).
While in the joint tool:
Backspace will undo the last joint.
Enter will complete the joint chain and exit the joint tool.
From the bottom up, name these four joints: root_joint, spine_1_joint, spine_2_joint, and head_joint. They will appear in the outliner grouped under each other, so use the + symbol to expand. Having a clear and consistent naming scheme is a great help in rigging since it allows you to automatically handle certain tasks with scripts.
Now we will set up the skeleton for the tail.
Create a three joint chain (3 clicks, 3 joints, 2 bones) from the base of the tail to the tip.
We will now split the chain into 8 segments.
Make sure the first two joints of the chain are selected
Use the "Split selected joint" script from the Rigging shelf () to split both joints into 4 segments, which will split the chain into a total of 8 segments.
Rename the joints tail_1_joint, tail_2_joint, tail_3_joint, etc. This can be done manually, or the "Hash Rename" script () can help with this:
Select the joints in the order you want them to be numbered
Press the "Hash Rename" script () button on your rigging shelf.
Type tail_#_joint into the box and press Enter. The script will replace the hash mark with a number in the order the joints were selected.
Parent tail_1_joint under the root_joint once you are done.
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 and another at the tip.
Name these joints mouth_1_joint and mouth_2_joint
Repeat for the nose, naming the joints nose_1_joint and nose_2_joint.
Parent these chains under the head_joint.
Now we will create the ear joint chains.
Create a simple joint chain in the Side view from the base of the ear to the tip (2 joints, 1 bone).
In the perspective view, use translate in the negative X direction to move the base joint to the base of the left ear. The joint chain will still not be completely inside the ear, so rotate the base joint until the tip is inside. Do not move the end joint, only rotate the base.
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
Now mirror the chain. Selecting the base joint and go to Skeleton → Mirror Joint (Options). Miror across YZ, miror behavior, and have it replace left with right in the joints. Click Apply and you have a pair of right ear joints that are properly named.
Parent these chains under the head_joint.
Our last set of joints will be for controlling the eyes.
Create a single joint for each eye. To place the joint exactly in the middle of the eye, we are going to create and then remove a constraint.
Select the eye, then the joint (it may be easiest to select them in the outliner using Ctrl-click to select multiple objects). Then go to Constrain → Point(Options). Un-check Maintain offset and click Add.
Delete the constraint that is created under the joint in the Outliner. The constraint will should be created under the joint. If it was created under the eye, you selected the eye and the joint in the wrong order and you will need to use Undo to get the eye back where it should be. Once the constraint is deleted, 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.
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. First, we create the curve that the tail will try to follow:
To start, use the CV Curve Tool (found in Create → CV Curve Tool) to create a curve passing through the tail. Make sure the Curve degree is set to "3 Cubic" in the Tool Settings. Snap each new CV to a joint in the tail chain using vertex snapping (the v key). It may be helpful to temporarily hide the body geometry so you don't snap to verticies on either side of the tail.
Check that your curve is straight from the top view (and un-hide the body if you hid it).
Name this curve tail_curve.
Now we will create the actual IK Spline to control the joints.
Go to Skeleton → IK Spline Handle Tool (Options) and disable Auto create curve.
Using the tool, select tail_9_joint, then tail_1_joint, then tail_curve. The IK handle will be created as soon as you select the curve.
Name the newly created IK Handle tail_ik_handle. You will not be able to control the tail just yet.
Create an empty group (Ctrl+g with nothing selected) and name it tail_grp.
Directly parent the tail_curve to the tail_grp.
Place the tail_ik_handle into this group. Eventually we will place other things associated with controlling the tail in this group.
Create three single joints, snapping them to tail_1_joint, tail_5_joint, and tail_9_joint respectively. Holding the v key and clicking will not work, because the joint tool will just try to start a chain from the joint you clicked on. Instead, use point constraint creation/deletion to do the snapping.
Name these joints curve_control_1_joint, curve_control_2_joint, and curve_control_3_joint.
It would be annoying if the animator had to select these control joints and so we will make some animation controls for them to work with instead.
Create three NURBS circles. These will serve as the animation controls, or "anims" for short. Name the anims tail_base_anim, tail_mid_anim, and tail_end_anim.
Position these anims over the control joints they will be affecting. We will use a point constraint to do this.
Point constrain (maintain offset un-checked) each of these anims to their respective control joints and delete the constraint.
Note that another way to delete constraints is to select the object[s] being constrained then go to Edit → Delete By Type → Constraints.
Rotate the anims exactly 90 degrees so they point down the tail. Be sure to do this consistently, using the same axis of rotation for each anim.
The next step is to define the default position and orientation of the anims. However the anim moves, we want to be able to set its translation and
rotation to zero and have it snap back to its original location. We will use "zero groups" to accomplish this behavior.
At high level:
Each anim will be parented to a group that shares the same starting position and orientation. The translation and rotation values
you see in the Channel Box are always relative to an object's parent space. Since both the anim and its parent group are aligned with the same
transformations, this causes the anim's translate and rotate to be zero.
Time to make zero groups for the tail anims.
Start by creating three empty groups. Name them tail_base_anim_zero_grp, tail_mid_anim_zero_grp, and tail_end_anim_zero_grp.
Position these zero groups over the anims. We will use a parent constraint to do this for us, similar to how we used the point constraint before.
Parent constrain (maintain offset un-checked) each of the groups to the anims and delete the constraint.
Parent the anims to their respective zero groups. Select each anim and check the Channel Box. Their translate and rotate values should be 0,
and their scale values 1.
If the scale values are something different, go to Modify → Freeze Transformations (Options) and uncheck Translate and Rotate. Make sure
Scale is checked. Then click Apply.
Parent the tail anim zero groups into the tail_grp.
Parent each control joint directly under its corresponding anim (not in the zero groups!)
We will now set up the anims to control the IK spline curve we created earlier.
Select the three control joints and then the tail_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.
Test -- Try moving the control anims and see how the tail joints react.
More testing -- try rotating the tail_grp. Here we see a problem known as double rotation. The tail curve and the tail anims are both children of the tail group, so they both see the rotation. The tail curve also sees the rotation through the binding of the tail control joints to the tail curve.
To fix this, we need to break one of these rotation paths. Go to the attributes of the tail_curve and turn off Inherits Transform.
Test -- Now when you rotate the tail_grp, everything should work as expected.
Now we need to reduce the clutter an animator has to deal with.
Lock and hide all the channels on each anim zero group. This prevents animators from accidentally moving the zero groups and thus redefining what zero is for their anims.
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.
Let's move to the body and create anims for it. This process will be similar to what we did for the tail.
Create 4 NURBS circles for the spine anims.
Manipulate them so that they fit around the body near the four spine joints.
If you scaled the NURBS circles while positioning them, freeze transformations on the scale and ONLY the scale.
Go to Modify → Freeze Transformations (Options) and uncheck Translate and Rotate.
Not doing so will set the orientation of the the spine anims to world space, and since we want them to point along the direction of the spine we definitely do
not want that.
Name the anims root_anim, spine_1_anim, spine_2_anim, and head_anim.
Create an empty group for each of the anims.
Name the groups root_anim_zero_grp, spine_1_anim_zero_grp, spine_2_anim_zero_grp, and head_anim_zero_grp
Parent constrain (maintain offset un-checked) each of the groups to the anims and delete the constraint.
Parent the anims to their corresponding zero groups.
Parent head_anim_zero_grp under spine_2_anim.
Parent spine_2_anim_zero_grp under spine_1_anim.
Parent spine_1_anim_zero_grp under root_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.
We will have these anims control the spine through a set of constraints.
Select the root_anim, then the root_joint and use Constrain → Parent(Options) and make sure to create the constriant with Maintain offset checked.
For the other three spine joints, Constrain → Orient(Options) 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.
Test -- move the root anim, the whole skeleton and tail anims should move with it.
We will deal with the mouth, nose, and ears in a similar manner.
Place a NURBS circle near the nose, mouth, and the ears.
Create one group for each of the anims.
Name the groups mouth_anim_zero_grp, nose_anim_zero_grp, left_ear_anim_zero_grp, and right_ear_anim_zero_grp.
Name the anims mouth_anim, nose_anim, left_ear_anim, and right_ear_anim.
Parent constrain (maintain offset un-checked) each of the groups to the anims and delete the constraint.
Parent the anims to their groups.
Lock and hide all the channels on each anim zero group.
Lock and hide all channels except rotate for these anims.
Use Orient constraints (maintain offset checked) 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 (maintain offset checked).
Test - the head anims should follow when you turn the head, each head anim should control the expected joint.
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.
Test -- ensure that moving the joint moves the eye -- don't forget to set it back to 0 rotation.
Now when you rotate the eye joints, the eye geometry should follow.
Go to the front view and create two NURBS circles.
Create one group for each of the anims.
Name the groups left_eye_anim_zero_grp, and right_eye_anim_zero_grp.
Name the anims left_eye_anim, and right_eye_anim.
Parent constrain (maintain offset un-checked) each of the groups to the anims and delete the constraint.
Parent the anims to their groups.
Point constrain (maintain offset un-checked) the groups to the eyes, and delete the constraints.
Move the eye anim zero groups forward so that the circles are out in front of the face.
Create another NURBS circle that surrounds the other two. Name the circle both_eyes_anim.
Create a group for this anim. Name the group both_eyes_anim_zero_grp.
Parent constrain the group to the anim and delete the constraint.
Parent both_eyes_anim to its zero group.
Parent left_eye_anim_zero_grp and right_eye_anim_zero_grp under both_eyes_anim.
Lock and hide all channels on each of the three eye anim zero groups.
Next up is making the anim controls for 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 directly parent both_eyes_anim_zero_grp to the head_anims group.
Lock and hide all channels on all three eye anims except translate.
Test -- make sure the eyes follow when both_eyes_anim is moved, and that each eye anim controls the eyes individually.
Now for some clean up and organization.
Download circleArrow.ma and import it. Use File → Import (Options), uncheck Group and Use namespaces, and finally press Import.
Scale it until it covers the base of the mouse.
Freeze All Transformations on it (Translate, Rotate, and Scale) 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_joint, and root_anim_zero_grp under the mouse_top_con.
The mouse_top_con should now be the only top level object besides the cameras and default sets.
Test -- move the top con around. You may notice that when you move the top con that the eyes fly out of the head. Let's fix that.
Like with the tail, 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.
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. First we need to create a new shape to blend to.
Duplicate the body geometry and move it to the side.
Now move the geometry (verticies) around to get the shape you want. In this case, we will be making the left eye blink.
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.
Starting with making another duplicate of the body geometry, 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.
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 Normalize Weights to Interactive, Max influences to 1, turn off Maintain max influences and create. (NOTE: If you are experiencing issues using the "Flood" operation, try rebinding with max influences set to 2. To unbind an old skin select the bound mesh and go to Skin -> Detach Skin.)
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.
Selecting the mesh and going to Skin → Edit Smooth Skin → Paint Skin Weights Tool.
In the Tool Settings, double check that Normalize Weights is set to Interactive.
In the Tool Settings, you can select a joint and then you can paint what that joint affects on the mesh. IMPORTANT: For the Painter operation, you should use Add or Smooth. The Replace operation can give some strange results and so should be avoided. (Explanation: Basically every vertex needs weights from different joints totaling up to one. So if Replace causes the total joint weights to fall below that value, Maya will attempt to distribute those unnassigned weight values to what it believes are the correct joints. In this, Maya is usually wrong.)
Hold b and click and drag to adjust the brush size.
It's best to paint get the weights perfect on one side. These can be mirrored to the other side by going to Skin → Edit Smooth Skin → Mirror Skin Weights(Options). Make sure Mirror Across YZ and Closest point on surface are selected. Choose positive to negative if you weight painted the left side of the mouse, leave unchecked if you painted the right.
Try flooding the Smooth operation several times on the tail joints to quickly get decently blended weights. Make sure the Smooth radio button is selected, then push the Flood button. This will apply smooth to the entire mouse for that joint's weights. Don't use flood with the Add operation, otherwise the joint you have selected will start affecting ALL of your geometry. )
Next, you may want to give each joint maximum weight over the area it is located. This means setting the value to 1.
Once each joint has maximum weight, you can start keying the anims so that they move the character. As you find problem areas, you can adjust them so that the character deforms well. (At this point it's best to use a value less than 1.)
When you think that the weights look good for a certain area, it is a good idea to mirror and then lock that joint. This will make it so the work you've done cannot be changed. It locks the weights so that nothing else can change it.
Continue this process until the end, testing as you go and locking and unlocking as you see problem areas that need to be fixed.
The last step is to test the rig. Make sure everything works correctly and touch up any weight painting that needs work.