Maya Character Skeleton Setup
Chapter 3: Character Skeleton Setup
This chapter shows you how to create complex controls for animating each of the main parts of your character model. Creating such controls involves many of the tasks that a character setup artist does on a daily basis, including such things as drawing skeletons, creating Inverse Kinematics (IK) handles, constraining objects, using control icons, and parenting objects into a complex hierarchy. After completing this chapter, you should have a good understanding of all the basic techniques that a character setup artist frequently uses to create good character controls.
The skeleton controls shown in this chapter create a good general-purpose character rig (see Figure 3.1). The basic hierarchy was based on a rig shown by a Blue Sky animator who taught at the School of Visual Arts back in 1996. (I have unfortunately forgotten that animator's name.) I've been developing and adding to the rig functionality since that time. Although nothing on this rig was taken directly from any other rig, ideas for controls have come from a variety of sources. I have gotten inspiration from colleagues, students, industry presentations, and Alias|Wavefront master classes by people such as Jason Schleifer at SIGGRAPH (who used controls similar to the ones shown for the advanced backbone on the Lord of the Rings characters). The complete rig presented in this chapter incorporates a sampling of all the basic kinds of controls that you would be required to create for a production-ready character.
Figure 3.1 In this chapter, you create a general-purpose rig with controls for each part of your character's body.
Keep in mind that there is no perfect all-purpose skeleton rig that will work well in all situations. In a real production, character setup artists create rigs for particular purposes. It is not uncommon for the main character in an animation to have a variety of rigs, with controls designed for particular actions in a scene. For instance, there might be separate rigs for walking, tumbling, lifting, and lip-syncing. However, an understanding of how to build all the controls in a general-purpose rig better prepares you to create more production-specific rigs.
Creating Basic Animation Controls
This section shows you how to create basic skeleton controls for your character. You learn to draw skeletons with precisely placed pivot points, so that the joints rotate accurately. Polygon reference bones are used as guides for drawing Maya skeletons, and are later parented to the skeletons to use as animation reference. Drawing, manipulating, and editing skeletons is covered in detail. Then, a rigging method that involves adding curve-based control icons is shown to make it easier to manipulate the skeletons. Finally, all skeletons and control icons are parented into a hierarchy used as a functional character control rig.
Understanding Skeletal Anatomy
Creating believable character motion requires that you create controls based on how real bodies work. Therefore, you need to place carefully the joints in your models so that the skin bends like it has a real skeleton inside of it. Your skeleton creates a 3D structure for your body, and enables you to move around. Without a skeleton, your body would be just a flat lump of muscle and skin. You wouldn't even be able to stand up! Skeletal joints are therefore very important for defining how your character moves.
Be aware, however, that some important differences exist between how a real organic body works and how a computer-generated 3D character is set up. In a real body, muscles contract and stretch to move the bones in a skeleton. Normally this process works in the reverse way for a 3D character, where the bones are the main movers, and the muscles deform in response. Because both work together very closely, the difference is hardly noticeable, but doing it this way makes setting up the character a lot easier.
Another important difference is that you can simplify some areas of the body in a 3D character. The backbone, for instance, doesn't usually require the number of bones in a real backbone. Because Maya smoothly blends the effects of the bones on the deformed skin, using fewer joints is usually desirable, because the use of fewer joints simplifies your setup tasks.
It is a good idea for anyone who wants to design, model, or set up 3D characters to have a good understanding of the skeletal anatomy of the human body (see Figure 3.2). Most characters are based on the same basic structure. Even other mammals, such as horses and dogs, have a similar structure. One of the best references a character artist can have is a variety of anatomy books to use when creating 3D characters.
Figure 3.2 Character setup artists must have a good understanding of skeletal anatomy.
One thing to notice carefully is how a particular joint moves. Although joints have a lot of subtleties in a real body, the joints in a 3D character can be simplified into two kinds: ball joints and hinge joints (see Figure 3.3). Ball joints can rotate in all three directions, whereas hinge joints can rotate in only one direction. Examples of ball joints can be found in the backbone, shoulder, and legs where they attach to the hips. Examples of hinge joints can be found in the elbows and knees.
Figure 3.3 The two main kinds of joints in the human body are ball joints and hinge joints.
Placing Polygon Reference Bones
One thing that many animators use today is a low-resolution reference skeletona 3D skeleton made from polygons or NURBS bonesas a guide for drawing Maya skeletons. The advantage to using a 3D skeleton as reference is that you can see exactly where the joints are, which makes it easier to place your pivot points correctly.
Toward the end of this chapter, you make the reference bones child to your Maya joints so that it is easier to see whether your skeleton controls work properly. You can then hide your deforming skin when you are ready to animate, to speed up your system, and show only the reference bones while animating. Traditionally, animators often used a nondeforming proxy of their skin to animate in real time. To do this, you duplicate your skin models, convert them to low-resolution polygons, and detach the skin at the skeletal joints. Then you make the skin pieces child to the appropriate Maya joints. More often today, however, animators use a low-resolution reference skeleton for the same purpose.
Exercise 3.1: Placing Polygon Reference Bones
Now that you have your model finished, it's time to start creating controls for animating your character. In this exercise, you create a polygon reference skeleton that fits correctly inside your character's skin.
Open the scene that contains your character model from the previous chapters. Make sure the scene contains only your final character models, and doesn't contain any creation curves, instances, or history connections. Your models don't need to be in any particular hierarchy, but you do want to organize them so that you can display or hide them easily. To do this, group your models under a node that you name MyModels. Then create a new layer by clicking the Create a New Layer icon in the Layer Editor and name the layer Models by double-clicking it to enter the new name in the layer options box. Select the MyModels group node, and place it on the layer by right-clicking the layer, and choose Add Selected Objects (see Figure 3.4). Finally, import into your scene the ReferenceBones.mb file from the download site.
After you import the file that contains the polygon reference bones, set the Models layer to Template by clicking the layer box until a T appears. Template enables you to use your models as a guide for placing the reference bones. You want to manipulate the transforms on the reference bones to make them fit inside your model (see Figure 3.5). To make the polygon bones fit well, you will probably have to manipulate their components to some degree. You can use all the tools you used in Chapter 2, "Modeling the Skin of a Biped Character," to refine your models, including lattice deformers. You may also want to create special features if your character model is more surreal. If your character is a devil, for instance, you can pull out horns on the skull bone. Or if it has wings and a tail, duplicate some of the bones from the backbone or arms and make wing and tail bones.
Figure 3.4 Create a new layer for your models.
Figure 3.5 Template your model, and use it as a guide for placing your polygon reference bones.
Skeletons are a special kind of deformer found in the Animation module (press F2) and are specifically designed for animating characters. Like other deformers, skeletons affect the component structure of your models. By assigning and animating the skeletons, vertices on the skin move, and your character models change shape over time. Skeletons usually have length, which you create by drawing a skeleton from point A to point B. Most skeletons have at least two joints: a root joint and an end joint. A bone connects each joint. Although you can create single-joint skeletons, multiple-joint skeletons are most common in characters.
The most basic way to manipulate skeletons is to rotate their joints, which is called Forward Kinematics (FK) (see Figure 3.6). It is not desirable to translate any joints other than the root joint. Translating a joint in the skeleton chain causes the previous joint's center to no longer be oriented down the length of the bone, which can cause rotation problems on your controls. By rotating the joints, you can avoid this problem. Rotating the joints also enables you to animate the skeletons to bend in any direction. As the name implies, you animate with FK by starting at the root joint, and progressively rotate each joint down the skeleton chain.
Figure 3.6 The most basic way to animate a skeleton, called Forward Kinematics, is to rotate the joints.
The other way to manipulate skeletons is to use Inverse Kinematics (IK), which constrains the skeleton to bend in a single direction by assigning it an IK solver. You manipulate the skeleton by translating an IK handle, which is created when you assign the solver. Translating the handle causes all the joints to rotate that are constrained by the solver. Usually the IK handle is on the last joint in the skeleton chain, so that translating it affects the joints higher up in the chainhence the name Inverse Kinematics.
Understanding skeletons is important if you want to create effective character controls. If you display the center on a skeleton joint by choosing Display, Component Display, Local Rotation, notice that the local center of a joint is not set to the global orientation. When using the default joint creation settings, the X-axis always points down the bone to the next joint (see Figure 3.7), enabling you to rotate easily around a joint's local center to twist a bone. You will want to do this in several parts of your character (to make a forearm twist, for example). Also notice that the Z-axis points toward you in the view in which you created the skeleton, because the Z-axis is the preferred rotation axis if IK is attached to the skeleton.
Figure 3.7 The default orientation of joints has the local X-axis pointing toward the next joint in the skeleton chain.
You can set the skeleton joint creation options to create IK automatically when you draw a skeleton, or you can add the IK manually after you have drawn the skeleton. In either case, draw your skeletons in a particular way when you know they will be constrained with an IK solver. IK bends in only one direction, which is based on the preferred angle of the joints. The preferred angle is the direction the joints are pointing when they are initially drawn. Draw your leg skeletons in the side view with a slight bend toward the front of the knees, for instance, to ensure that they have the correct preferred angle when their IK is activated (see Figure 3.8). Usually this requires you to draw the skeletons in a particular orthographic view, which is perpendicular to the axis that the joint should rotate in. The main axis of rotation on a normal IK skeleton is always the Z-axis.
Figure 3.8 Draw the IK leg skeletons with a slight bend toward the front of the knee to set the preferred angle.
There are some obvious advantages and disadvantages to using IK or FK on your skeletons. One advantage of IK is that it is faster to set and edit translation keys on a single IK handle, than to set and edit rotation keys on multiple joints. It also is easier to target the end of a limb in 3D space when you are animating (to make the feet target the floor, for instance). On the other hand, IK is constrained to bend in only one direction, whereas FK can bend in any direction. This makes IK more suitable for hinge joints, such as the elbows and knees. FK, on the other hand, is more suitable for joints that move more like ball joints, such as the backbone vertebrae.
Another limitation of IK is that all the joints in a solver move when the IK handle is animated, making it impossible to isolate the rotation of a single joint in the chain. You must be able to rotate a child joint without rotating the parent if you want to create a swinging-type motion on the arms or legs (see Figure 3.9). This motion type usually occurs only as an unconscious movement while walking, throwing, or kicking. Because many limb motions are conscious, however, it is still better to use IK on the arms and legs most of the time. For the times when you need to create a swinging motion, however, you must have controls for switching between IK and FK in the middle of your animation.
Figure 3.9 A swinging motion on the limb joints is not possible when IK is constraining a skeleton.
All the tools for drawing skeletons and creating IK are under the Skeleton menu in the Animation module. Before you create a skeleton, check the settings in the Joint Tool options box by choosing Skeleton, Joint Tool . Here you can constrain a skeleton to rotate in a specific way, by turning off the Degrees of Freedom for a particular axis. You also can change the way Maya orients the local centers on joints by setting the Auto Joint Orient to something other than XYZ. For most skeletons, however, it is best to use the default settings. The only setting you will frequently change is the Create IK Handle option (see Figure 3.10).
Figure 3.10 Open the Joint Tool options box to turn on or off the automatic creation of an IK handle on a skeleton.
You can add IK to your skeleton automatically when you draw it, or you can add it later after you draw the skeleton by choosing IK Handle Tool in the Skeletons menu. The available options are the same in either case. The main difference is that IK, if added automatically, always constrains the entire skeleton with the solver; if added manually, however, IK enables you to specify what joints will be constrained. You also can add more than one IK handle to different parts of the same skeleton if you add the IK manually. Like the joint options, you usually use the default IK handle option settings. Keep in mind that you also can adjust most of the joint and IK handle options in the Attribute Editor after you create a joint or IK handle.
One IK handle option you will occasionally change is whether the current solver is a Single Chain (SC) or a Rotate Plane (RP) solver. The difference between these two solvers is how they control the overall twist orientation of the skeleton. The SC solver forces the skeleton to twist when the IK handle is rotated. The RP solver, on the other hand, has a separate twist channel for twisting the skeleton, and the IK handle affects the skeleton only through translation (see Figure 3.11). You get more flexibility by separating the Twist attribute from the Rotation attributes of the IK handle, and the separation enables you to control the twist channel with a separate object by using a pole vector constraint. Because of this, you will be using an RP solver most of the time. The arms and leg skeletons of your character, for instance, will use RP solvers so that you can control where the elbows and knees point by using pole vector constraints.
Figure 3.11 When you create an IK handle with an RP solver, a separate twist channel controls the overall orientation of the skeleton.
When drawing skeletons, it is best to click and drag with the left mouse button held down. This action enables you to place joints precisely while drawing them. Correct placement is important, because modifying skeletons after they have been drawn creates values in the joint's rotation channels, which can be undesirable. If you place a joint in the wrong place while drawing the skeleton, you can press the Z key to undo, and proceed to redraw the joint. When all the joints are drawn, press the Enter key to set the skeleton.
One thing to consider when drawing skeletons is whether you want to attach multiple branches to a single joint. Do this by first clicking a joint within an already existing skeleton when drawing a new skeleton. When you finish drawing the new branch, notice that rotating the joint you clicked rotates both branches together (see Figure 3.12). This joint rotation occurs because the two joints have merged into one joint. Although you can create an entire character skeleton as one piece this way, this method provides limited flexibility for animation because it prevents you from being able to animate branches separately from each other.
Figure 3.12 Attaching two skeletons creates a single parent joint for two separate branches. You cannot rotate the two branches separately from one another.
Instead of attaching skeleton branches, draw the joints separately, and parent the branches to a single joint or control object. Doing this enables you to animate the branches together by animating the parent object, or separately by animating the child joints, giving you more flexibility when animating. To draw a skeleton branch so that it starts on a joint but is not attached to the joint, avoid directly clicking the already existing joint. Instead, after clicking, drag the new joint on top of the previously created joint, and continue drawing the branch. You can then parent the joints under a control object or group node.
When parenting joints, notice that a bone is always drawn between the parent joint and the root joint of the branch. Keep in mind this can sometimes clutter your interface with crisscrossing joints on a complex skeleton. To keep this from happening, you have to put two group nodes between the joints. Do this by parenting the two joints, and then select the child root joint and press Ctrl+G twice. After doing this, notice that the connecting bone disappears. Also be aware that this hasn't changed the functionality of the skeletons.
The Skeleton menu contains all the tools and commands for editing skeletons. Use the Insert Joint tool to add joints to a skeleton chain. Just click any parent joint, and drag to place the new joint. Delete joints in a skeleton chain by selecting any joint but the root joint, and choose Remove Joint. Some other useful commands are Disconnect Joint, Connect Joint, and Mirror Joint. Using the Mirror Joint tool speeds up your workflow by enabling you to more easily duplicate skeletons to the opposing side of your character's body (see Figure 3.13). This command is based on your character's position in global space, so make sure your character is centered on the global axis in a symmetrical manner. A new option in Maya 5 is the ability to replace naming conventions on the mirrored joints. For instance, you can specify that all joints that begin with Lt to begin with Rt.
Figure 3.13 Mirroring a skeleton in a particular plane is one of the most useful commands for editing skeletons.
Ideally, you want to draw your skeletons with the correct preferred angle. Sometimes, however, that won't be possible, and you will have to reset the preferred angle on a skeleton. Do this by removing any IK that may be on the skeleton, rotate the joints to their new preferred angle, and with the joints still selected, choose Skeleton, Set Preferred Angle. You can also set this by right-clicking the skeleton. You then have to reassign the IK to the skeleton. If you ever have any question what the preferred angle of a joint is, select the joint and choose Assume Preferred Angle. Finally, in the Skeleton menu you can disable or enable all IK solvers in your scene, or specific IK handles as needed.
Exercise 3.2: Drawing and Editing Your Skeletons
Using the polygon reference bones as a guide, you now draw the basic Maya skeletons for your character. Before you start to draw the joints, however, place all the polygon reference bones on a layer, and set the layer to Template. Because the skin models are not needed at this time, hide them by turning off their layer's visibility. In addition, if you need to adjust the display size of the joints, because your model is too large or too small, do so in the Display menu under Joint Size.
Begin by drawing an IK leg skeleton in the side view. Do this by choosing Skeleton, Joint Tool q, and turn on the Create IK Handle option. Make sure the Current Solver is set to IKRP Solver, and close the options box. Starting at the hips and ending at the ankle, click four times to create the joints. In the knee area, create a small joint that will mimic the flat of the knee. This will make the knee bend nicely when the character is bound to the skin. Make sure the skeleton is bent slightly toward the front of the knee so that you get the correct preferred angle, and then click Enter.
Open a floating hypergraph view by choosing Window, Hypergraph on the top menu bar. You will use the Hypergraph view to name and organize your skeletons. Size the Hypergraph window so that you can still see your character in the perspective view. Then place your curser in the Hypergraph window, and click the A key to Frame All. Notice that you have a four-joint skeleton displayed as a hierarchy of graphical nodes, with a hidden effector node, and a separate IK handle node. The IK handle is forced to stick to the effector, which is usually placed on the last joint of an IK skeleton. This changes as soon as you parent the IK handle under an object. Try selecting the IK handle in the hypergraph view, and translate it in the perspective view. You should see your leg skeleton bend. Press Z to undo the movement, and then name each of the leg joints LtLegRoot, LtLegKnee, LtLegLow, and LtLegEnd. Name the IK handle LtLegIK (see Figure 3.14). It is not necessary to name the effector.
Draw a three-joint skeleton for the left foot in the side view. This time, however, turn off the Create IK Handle option in the Joint Tool options box. Start the skeleton at the ankle pivot, going down to the ball of the foot, and then out to the end of the toe. When you are drawing the foot root, make sure you don't click the end of the leg skeleton, because doing so would attach the two skeletons. You will be parenting the foot skeletons to control objects, so they don't need to be attached. After drawing, adjust the skeleton as needed, and name the joints LtFootRoot, LtFootBall, and LtFootEnd. When you are done with the left foot, mirror it to create the right foot with the appropriate name changes.
Even though the hips move as a single unit, you create two separate hip skeletons for skin-weighting purposes. Again, these skeletons should not be attached, but will later be parented to give you more flexibility when animating them. Begin by drawing a skeleton from the center of the hips out to the edge of the pelvis, and down to the top of the left-leg skeleton. Be careful not to place the pivot for your character's hip skeletons too low. Each hip skeleton should have the pivot point for the root joint in the middle of the pelvis slightly below the belt line. Name the joints for the left-hip skeleton LtHipRoot, LtHipSide, and LtHipEnd. When your left-hip skeleton is complete, mirror and rename it appropriately to create the right-hip skeleton. This completes your lower-body skeletons (see Figure 3.15).
The part of the body that connects the lower- and upper-body skeletons is the backbone, which begins at the center of the hip and ends at the base of the neck. The backbone should be a separate skeleton from the hips, because you want to be able to animate the spine without moving the hips, and vice versa. To ensure this is the case, make sure you do not directly click the hip root joints when you begin drawing the backbone. Instead, in the front view, click away from the character and drag the backbone root over the hip roots. Then hold down the Shift key as you draw three joints straight upward, without any preferred angle (see Figure 3.16). The joints should go from the hip's pivot to around the belly button, then to the solar plexus, and finally to the top of the sternum. Be sure to also check the placement of the skeleton in the side view to make sure it is inside your character's torso. If necessary, translate the root joint in the Z-axis to position the skeleton correctly.
To begin the upper-body skeletons, create two IK skeletons for the clavicles. Make sure you turn on Create IK Handle in the Joint Tool options box, and then draw the left-clavicle skeleton in the front view, using the polygon bones as a guide. It should originate at the middle of the chest and end at the top of the shoulder. After you have created the left skeleton, select the root joint, and transform it as needed to position it correctly over the polygon clavicle. Name the joints LtClavicleRoot, LtClavicleEnd, and LtClavicleIK. When completed, mirror the skeleton to create the right clavicle and rename the joints as needed.
Create a left IK scapula joint in the same way as you created the clavicle joint. Draw it in the front view so that it goes from the inner edge of the scapula to the top of the shoulder, where the clavicle and scapula meet. The finished scapula skeleton should follow the raised area at the top of the polygon scapula bone. Transform it in all the views to make it fit properly, and name the joints LtScapulaRoot, LtScapulaEnd, and LtScapulaIK. Mirror the result to the other side, and rename the joints appropriately.
The neck skeleton will be simplified to a two-joint FK skeleton. The reason for this is that the neck really doesn't bend much in a real body, but instead serves mostly as a pivot for shifting the head around. On a simple character, this kind of neck works fine. Later in this chapter, you refine the neck to be more complex. In the side view, draw the neck joint from the end of the backbone skeleton to the base of the skull. Because this should be an FK skeleton, make sure to turn off the Joint tool's Create IK Handle option before drawing. Also be careful to not attach the neck skeleton to the back skeleton. Name the resulting neck joints NeckRoot and NeckEnd.
To create the head and jaw skeletons, you also use FK, so leave the Joint tool's IK option turned off. In the side view, begin the head skeleton at the base of the skull, and end it at the top of the skull. Be sure not to attach it to the end of the neck joint. The pivot point for the head root joint should be slightly below the ear, from where your character tilts its head. Name the two head joints HeadRoot and HeadEnd. You also should draw the jaw in the side view, from close to the same pivot point as the head root. Make the jaw a three-joint chain that goes down and out to the end of the chin (see Figure 3.17). Contouring the shape of the jaw creates better weighting when the skin is bound. Name the jaw joints JawRoot, JawLow, and JawEnd.
The last joints you are going to draw for your basic skeleton controls are for the arm and hand. Draw the arm with a slight bend toward the elbow. This means that you will draw the arm skeleton in the top view if your character's elbow faces backward and the hand faces downward. Or draw it in the front view if your character's elbow faces downward and the hand faces forward. Make sure IK is turned off in the Joint Tool options box, and begin by clicking close to the left shoulder socket. Draw the arm skeleton from the shoulder to the elbow, from the elbow to midway down the forearm, and finally to the wrist. Name the joints LtArmRoot, LtArmLow, LtArmTurn, and LtArmEnd.
After you have drawn the last skeleton, go back and parent all the polygon reference bones under the appropriate skeleton joints. For instance, make the left femur child of the LtLegRoot joint. The left patella should be child of LtLegKnee, and both the left tibia and fibula should be child of LtLegLow (see Figure 3.19). Make the many back vertebrae children of the closest backbone joint, and make the rib cage child to the Back3 joint. Avoid parenting any of the polygon bones under IK handles or control icons, except the pelvis bone, which should be made temporarily child of the Hips box.
Figure 3.14 Name all your skeleton leg joints and leg IK handle.
Rotate and translate the LtLegRoot joint in the front and side views so that it sits right on top of your polygon leg bones. Make sure you do not translate any joints except the root joint. Also make sure the LtLegKnee and LtLegLow joints rotate correctly around the left knee's pivot point. When you get the left leg placed correctly, select the LtLegRoot joint, and choose Skeleton, Mirror Joint q. Set the Mirror Across option to the YZ plane, and the Mirror Function to Behavior. This creates a right-leg skeleton and associated IK handle that is a mirror copy of the left-leg skeleton. Use the new joint renaming option to name the right-leg joints the right-leg joints and IK handle RtLegRoot, RtLegKnee, RtLegLow, RtLegEnd, and RtLegIK.
One consideration to note is that if your character has bare feet, you may want to create individual toe skeletons. Do this easily by drawing them as FK skeletons in the side view. Later, when parenting your skeletons into a rig, just make the individual toe skeletons child to the LtFootBall joint.
Figure 3.15 Using your polygon bones as reference, finish drawing the lower-body skeletons for the hips, legs, and feet.
Figure 3.16 Draw a simplified FK backbone skeleton straight upward, without any preferred angle.
This is obviously a simpler version of the backbone than what exists in a real body, as it has fewer joints and doesn't follow the contour of the spine. The reason you are simplifying this skeleton is because it is going to be used as a control for a more complex backbone skeleton you create later in this chapter. You draw the skeleton straight, because it is going to be using only FK, and this gives you a smooth arc when the backbone bends in any direction. Keep in mind, however, that a simplified backbone such as this is acceptable as-is for a simple character. Finish the backbone skeleton by naming the joints BackRoot, Back2, Back3, and BackEnd.
Figure 3.17 Add an FK jaw skeleton after drawing skeletons for the clavicles, scapulas, and skull.
The reason you turn off IK when drawing the arm skeleton is that the IK for the arm should not be placed on the entire skeleton. As mentioned previously, IK always constrains all the joints within the solver to rotate in one direction. For the elbow joint, which works as a hinge joint, this is fine. But in addition to the elbow joint, you have drawn a LtArmTurn joint that will be used to twist the lower arm of your character. To make sure the arm IK doesn't interfere with the rotating of this joint in X, leave this joint out of the solver. Do this by selecting the IK Handle tool, and click the arm root joint, and then click the LtArmTurn joint (see Figure 3.18). Name the resulting IK handle LtArmIK.
Figure 3.18 Place the arm IK from the shoulder to the middle of the forearm so that the arm turn joint is outside the RP solver. Then move the pivot of the arm effector to the wrist.
When the IK is added, notice that you can still bend the arm using the IK handle, while still being able to select the LtArmTurn joint to rotate it freely in X. To make the IK act more like it controls the whole arm, you can move the effector to sit over the wrist joint. Do this in the hypergraph view by selecting the arm joint's hidden effector node, and then click the Insert key to move the effector's pivot. Notice that the IK handle sticks to the effector when it is moved. Hold down the V key to snap the effector on top of the LtArmEnd joint. When finished, click the Insert key again to go out of pivot point mode. Now when you translate the IK handle, it behaves as if it controls the arm from the wrist, rather than from the forearm.
Finally, draw a two-joint FK arm skeleton for the left hand. You can draw this in the front view, from where the wrist rotates to where the finger bones begin. Do not attach the hand skeleton to the end of the arm. Name the hand joints LtHandRoot and LtHandEnd. When finished, mirror the left-arm and left-hand skeletons to the right side, and rename them appropriately.
Figure 3.19 After you have finished drawing all your skeletons, parent the polygon bones to the appropriate Maya joints, as seen here with the leg skeleton.
Creating Control Icons
You may have noticed while you were naming your joints and IK handles that they are not that easy to select in the interface. Some joints are sitting on top of each other, and IK handles look just like locators. Traditionally, character setup artists have dealt with this problem by creating control icons. A control icon can be any easily selectable 3D shape, such as spheres, boxes, arrows, dials, and so forth, that will be parented to your skeletons and IK handles (see Figure 3.20). You create these shapes from curves so that they will not be visible when the surfaces are rendered. When the control icons are created, you place their centers directly over the pivot points of the joints they are meant to control. Once the icons are created and placed, they must then be parented over the appropriate joints and IK handles. Some control icons may control only a single skeleton or IK handle, whereas others may control many skeletons. By using control icons, you make your controls more efficient and useful.
Figure 3.20 Control icons are made from curves that can be in a variety of 3D shapes.
Exercise 3.3: Creating and Placing Control Icons
Character setup artists often use a variety of shapes when creating control icons out of curves. It doesn't really matter which shapes you use, as long as the shapes are easy to select in all the views. Before you begin creating some control icons, select all your skeletons and IK handles, and place them on a layer named Skeletons. Make sure your Models, Polygon Reference Bones, and Skeletons layers are all set to Template.
Now you should create and position all the control boxes for controlling your character's limbs. Place your new control box directly on top of the LtHandRoot joint, and scale it so it is easily selectable. Then either duplicate the left-wrist box or click your Box shelf button to create more control boxes for the right wrist and both ankles. Place the leg boxes so their centers are directly on top of each foot root joint. When the boxes are placed appropriately, reset their transform channels by choosing Modify, Freeze Transformations, and name them LtArm, RtArm, LtLeg, and RtLeg.
Create two new control boxes, and name them Hips and Head. If you want to change the shape of any control boxes to make them look different from the others, just go into component mode, and transform the vertices. Scale the Hips box so that it is slightly larger than, and contours, your character's hips. In insert mode, place the pivot point for the Hips box where your character's hip root joints are located. Place the Head box so it fits around your character's head, and move the pivot point so it sits on top of your head root joint.
Another kind of control icon you can use is a text curve. These icons are easy to create, and are also easy for the animator to recognize. Create a text curve by choosing Create, Text q on the top menu bar, and make sure the type is set to Curves. Avoid using multiple letters, or letters that require multiple curves, such as e, a, p, or d. If you do use these letters, delete the inner curve that creates the hole. You can use letters that have no holes, such as u, z, v, t, y, l, and s, without modifications.
Create a letter U, and move it so that it sits right on top of the Hips box. In the hypergraph view, notice that the U curve has a couple of parent group nodes. Select the curve node, disconnect it from its parent, and delete the group nodes (see Figure 3.23). Name the U curve UpperBody. Finally, in component mode, select all the vertices of the curve, and transform them to the left and in front of your character. In addition, to make the curve easier to see in the side view, rotate the vertices in Y about 35 degrees. The reason you make these adjustments by moving points in component mode, instead of adjusting the transforms of the UpperBody curve, is that you want the center of the curve to remain in the middle of your character's torso. This will ensure that your character's torso can be rotated around the correct pivot point. When the UpperBody icon is in the correct place, freeze its transforms.
Another kind of icon frequently used by character setup artists is an arrow. You can make multidirectional arrows for your elbow and knee controls. Do this in the top view by turning on Snap to Grid, and draw an EP curve on the grid in the shape of an arrow. When drawn, name the arrow LtElbow, and transform it behind the left elbow. Make sure that the left-elbow icon is sitting several grid units away from the arm, and not right on top of the elbow. When positioned, duplicate the icon, and create three more arrows named RtElbow, LtKnee, and RtKnee. Move the icons into place, making sure the knee icons are sitting several grid units in front of each knee (see Figure 3.24). When positioned correctly, freeze all the icons.
One shape that is easy to create with a curve is a box. Begin by creating a polygon cube by choosing Create, Polygon Primitives, Cube on the top menu bar. Scale the cube so that it is not too small in relation to your character. Make the perspective view full screen, and use the Alt key to orbit around so you can clearly see all the corners of the cube. Then choose Create, EP Curve tool q on the top menu bar. Inside the EP Curve Tool options box, set the Curve Degree to Linear, and close the options box. Hold down the V key as you click the corners of the cube (see Figure 3.21). It is important to make your control box from a single curve, so you need to make the curve overlap itself to cover all the edges of the cube. Keep clicking until you think the box is complete. When finished, select the polygon cube in the hypergraph view, and delete it. You should now have a 3D box made from a curve!
Figure 3.21 Snap the points of a linear EP curve to the edges of a polygon cube to create a box icon.
One thing you might want to do for creating more boxes in the future is create a shelf button for the creation of a box. Open the Script Editor, and in the gray History field, find the line of Maya Embedded Language (MEL) code that was used when you created your box icon. It will look something like this:
curve -d 1 -p -3.511352 3.511352 3.511352 -p 3.511352
3.511352 3.511352 p 3.511352 -3.511352 3.511352 -p -
3.511352 -3.511352 3.511352 -p -3.511352 3.511352
3.511352 -p -3.511352 3.511352 -3.511352 -p -3.511352 -
3.511352 -3.511352 -p -3.511352 -3.511352 3.511352 -p -
3.511352 3.511352 3.511352 -p 3.511352 3.511352 3.511352
-p 3.511352 3.511352 -3.511352 -p -3.511352 3.511352 -
3.511352 -p -3.511352 -3.511352 -3.511352 -p 3.511352 -
3.511352 -3.511352 -p 3.511352 3.511352 -3.511352 -p
3.511352 3.511352 3.511352 -p 3.511352 -3.511352 3.511352
-p 3.511352 -3.511352 -3.511352 -k 0 -k 1 -k 2 -k 3 -k 4
-k 5 -k 6 -k 7 -k 8 -k 9 -k 10 -k 11 -k 12 -k 13 -k 14 -
k 15 -k 16 -k 17 ;
Highlight this line of code in the Script Editor, and using the middle mouse button drag it to your shelf (see Figure 3.22). This action produces a shelf button that creates a new curve box every time you click it. Open the Shelf Editor, and name the new button Box.
Figure 3.22 One way to make a shelf button is to highlight MEL code in the History field of the Script Editor, and then use the middle mouse button to drag it to the shelf.
Figure 3.23 Separate and delete the two group node parents of the U text curve that will be used as the upper-body icon.
Create an S text curve, and name it Shoulders. Move the Shoulders curve so that it sits in the middle of your character's shoulders. Then, in component mode, select all its vertices, and transform them to the right and in front of your character. Also rotate them in Y counterclockwise about 35 degrees. Freeze the Shoulders icon when you are finished.
Figure 3.24 In front of your character's legs, place arrow icons that control where the knees point through the use of pole vector constraints.
For the elbow and knee controls to work, you must assign them to the arm and leg skeletons with a pole vector constraint. This constraint controls the overall orientation of each skeleton by forcing the elbows and knees to point at the appropriate arrow icon. This is possible because the arm and leg IK skeletons use an RP solver, which has a twist channel that controls the rotate plane of the skeleton. This twist channel will be constrained using the pole vector constraint. Do this by selecting the left-elbow arrow, and then Shift-select the left-arm IK handle, and choose Constrain, Pole Vector on the top menu bar. A line should display connecting the IK to the left-elbow arrow in the 3D views. Move the arrow up and down to see it rotate the arm skeleton. Then create pole vector constraints on the IK for the right arm and knees.
Creating a Basic Character Rig
Up until now, you have been creating all the elements you will use to control your character while animating. They are currently not very useful, however, because they are not connected in any way to each other. To use all your controls effectively, you must make them into a character rig. A rig is created when you parent all your skeletons, IK handles, group nodes, and control icons into one big hierarchy. This hierarchy organizes all your controls into a logical setup that is easy to use, and easy to import into multiple scene files.
Keep in mind while you are going through the rigging process that if objects need to move independently of one another, they must be on separate branches in a hierarchy. They cannot be child of each other. The feet, for instance, should be able to stay on the ground when the upper body moves. The upper body should also be able to stay still when a foot is raised. To accomplish this, you must place these two parts of the body on completely separate branches in the hierarchy. Although variations in rig structures will always exist, keep in mind that most basic rigs are built under these same principles.
Exercise 3.4: Parenting Skeletons and Control Icons into a Character Rig
It may be easiest to do all your parenting in the hypergraph view. If you haven't done so already, change your hypergraph to freeform layout by choosing Options, Layout, Freeform Layout on the Hypergraph window's top menu bar. Keep in mind that an easy way to parent nodes in the hypergraph is to drag the child on top of the parent with the middle mouse button. Use the middle mouse button to drag an already parented node over an empty space in the view to unparent it. Other things to be aware of when working in the hypergraph is that you want to keep everything organized neatly. If shape nodes are showing up in your window, turn them off by choosing Options, Display, Shape Nodes. You can also collapse hierarchies, expand hierarchies, and create bookmarks by right-clicking in the hypergraph.
Begin creating the upper-body hierarchy by making the UpperBody icon the parent of both the Hips box and the backbone root. Moving the UpperBody icon should move the hips and backbone together. It is important to make the hips and backbone on separate branches, so they can be moved independently of each other. In this basic rig setup, the Hips box should not be translated, because it separates the hips from the backbone. Instead, you should only rotate the Hips box to move the hips, and use the UpperBody icon to move the torso.
Create another locator and name it Rig. Translate this locator so that it sits directly on the pivot point of the UpperBody icon. You can either try to hold the V key to snap it into place, or you can use a point constraint to move it, and then delete the constraint. Do this by selecting the UpperBody icon, and then Shift-select the Rig locator, and choose Constraint, Point on the top menu bar. The locator should move into place. Then, in the hypergraph view, just delete the constraint node connected to the locator. When the Rig locator is in place, freeze it, and make it the parent of the Feet locator and the UpperBody icon (see Figure 3.26). The Rig locator will be the top of your character hierarchy, and can be used to move your entire character around in your scene.
All the parts of your character's upper torso should move when the backbone bends. This includes the shoulders, neck, head, and arms. For this to work correctly, all these body parts will be made the indirect children of the BackEnd joint. The only part of the body that is sometimes made to not follow the backbone is the hands. If you don't want your hands to follow the backbone's movement, make the arm boxes child to the UpperBody icon. Otherwise, they should be child to the end of the backbone, which is how you should do it for now. Later in this chapter, you learn how to switch this.
You need to parent several more nodes before you will be finished constructing your basic character rig. First, instead of parenting, you need to use a constraint to connect the Head box to the neck skeleton. This constraint causes the head to follow the neck movement, while keeping a vertical orientation. Select the NeckEnd joint, hold the Shift key down to also select the Head box, and constrain it by choosing Constrain, Point. Finally, make the Head box the parent of HeadRoot and JawRoot. When this is done, rotating the NeckRoot joint should move the Head box, and rotating the Head box in turn should also rotate the head and jaw skeletons.
This completes the basic skeleton setup. Check your basic hierarchy in the hypergraph view to make sure everything is parented (see Figure 3.29). Try moving your controls around to make sure everything is parented correctly. For instance, moving the UpperBody icon up and down should make your character crouch. All your polygon reference bones should move with your skeleton joints. Be aware that there are currently no limits set on your controls, and translating a control too far may pull your rig apart. Make sure you undo after testing your controls to get your character back into its default position before going on to the next section.
Begin creating the lower-body hierarchy by parenting the leg and hip root joints under the Hips box. Then make the leg IK handles, the root joints for the feet, and the knee icons child to the appropriate leg boxes. For instance, the LtLeg box should be the parent of LtLegIK, LtLegRoot, and LtKnee. Parent the right-leg controls in the same way. You should be able to translate the Hips box, and the legs will bend, while the feet remain stationary. You should also be able to translate a leg box, and the foot will move with the leg, while the hips remain stationary.
Then, create a locator by choosing Create, Locator. Name the locator Feet, and translate it so it sits directly between the two leg boxes. When in place, freeze the locator, and make it the parent of both leg boxes (see Figure 3.25). This locator is occasionally used to move the feet together, such as to make your character jump.
Figure 3.25 The Feet locator is the parent of both leg boxes, which have the individual foot skeletons, IK handles, and knee icons child to them.
Figure 3.26 Create a locator named Rig as the top node of your hierarchy. Make the Rig locator the parent of the feet and upper body branches.
Begin creating the upper-body hierarchy by making the NeckRoot joint child of the BackEnd joint. Before continuing, create two group nodes that will be between the backbone and all the child nodes. Do this by selecting the NeckRoot joint, and press Ctrl+G twice. Name the two group nodes from top to bottom BackPad1 and BackPad2. Because there will be several joints child to the end of the backbone, creating a couple of group nodes will keep unnecessary bones from being displayed. Then make the following nodes child to BackPad2: clavicle roots, scapula roots, neck root, Head box, Shoulders icon, arm boxes, and elbow icons (see Figure 3.27).
Figure 3.27 Make all the nodes that should move with the backbone child to the BackPad2 group node.
Make both clavicle IK handles children of the Shoulders icon. And make each scapula IK handle child of the clavicle IK that is on the same side of the body. For instance, LtClavicleIK should be the parent of LtScapulaIK. Once parented, translating the Shoulders icon up in Y should make both shoulders shrug, and make both scapula bones rotate outward slightly.
The clavicle IK handles are the main controls for each shoulder. The two things that should follow the clavicle IKs when they move are the scapula and the arm roots. To achieve this, make each arm root child of the appropriate clavicle IK. Then continue down the arm, making each arm IK child of the appropriate arm box, and each hand root child of the appropriate arm end joint (see Figure 3.28). The reason you make the arm end joint the parent of the hand rather than the arm box is to keep the hand oriented with the arm as the wrist box moves. This is usually what a real arm does most of the time, so it makes sense to make this the default hand orientation. Otherwise, if you were to make the hand child of the arm box, you would have to be constantly rotating it into place, which is not very efficient. In the next section, you create controls for moving the hand around as needed.
Figure 3.28 Parenting the hand root joint under the end of the arm skeleton completes the basic arm hierarchy.
Figure 3.29 Check to make sure all the nodes in your basic rig hierarchy are parented correctly.