Chapter 1 AL Character Skeletons RI Getting a character to move properly begins and ends with a good D MA TE skeleton. It takes proper positioning and the right number of joints. The skeleton provides functionality and at the same time limits the ways geometry can deform. In this first chapter, you’ll construct a skeleton and weight it to a modeled character. You’ll then apply stock motion capture to test the character’s deformations and the skeleton’s validity.
■ Chapter 1: Character Skeletons Character Pipeline The details of a character pipeline vary based on the character and change from company to company, and artist to artist, but for the most part, the overall process doesn’t change. In this book, the pipeline is as follows: P h o t o R ea l P i pe l i n e 1. Establish the geometry. 2. Build a skeleton with basic functionality. 3. Add traditional skin weighting. 4. Create the facial anatomy. 5. Set up skin simulation. 6. Add facial hair using Fur. 7.
Character Pipeline increase makes it possible to have deforming wrinkles and folds with accurate collision. This increase also demands a more intricate setup. In this book, the character you’ll create is clothed. Most of his skin is covered; only his hands and face are exposed. As a result, his body can have basic deformations, while his face is complex. Figure 1.1 shows the geometry of the character named Jack who is the focus of this book. Figure 1.
■ Chapter 1: Character Skeletons Figure 1.2 The interior of Jack’s mouth combined motions of groups of muscles create a facial expression. Tweaking this expression is a matter of moving a muscle a little up or a little down. The geometry of the head is attached to the muscles. The muscles drive the geometric skin using nCloth for both the muscles and face geometry. This creates very complex deformations. It also makes it necessary to isolate the head from the rest of the body.
Character Pipeline Figure 1.3 Figure 1.4 Jack’s spine is positioned almost centered in his body and is vertically aligned. After testing several positions, the locations of the hip and knee are determined. The arm joints are positioned in a similar fashion to the leg. However, their joints are located based on the shape of the character’s skin. You want to pay close attention to the angle of the fingers to ensure proper rotation. Figure 1.5 shows the hand and the joint placement.
■ Chapter 1: Character Skeletons Figure 1.6 To maintain the freedom to design and build any character, you need a system for calibrating the two rigs. The better your calibration process, the greater your freedom. The capture skeleton is based on the actor whose performance you’re capturing. For this book, the capture skeletons are generated using Autodesk’s MatchMover program (see Figure 1.6). The interface for Autodesk MatchMover Figure 1.
Character Pipeline motion-capture data. Getting such data to work on your character is possible, as shown in the last two projects in this chapter, but it often fails for numerous reasons. First, downloaded motion-capture data may fail due to unknown factors. You don’t know how the data came to be. The actor’s physique doesn’t need to match your character, but knowing what the person looked like is helpful. Having a video of the actual performance is invaluable.
■ Chapter 1: Character Skeletons Weighting Quaternion weighting helps skin deformations tremendously. You no longer need additional bones to help support the volume of skinned parts; you only need to add joints where your character needs them, making the process far more intuitive. This also helps with the weighting process. Instead of the skin caving in at a bent joint, the volume is maintained, causing the skin to penetrate the opposing side.
Weighting ■ 9 C l av i c l e R o tat i o n In the final rig, the clavicle will rotate only a little in the Z axis. To achieve a proper shoulder shrug, most of its motion will come from the joint’s local X translation. Rotations are being used here simply for convenience. All the rotate values are at 0.0, making it easy to return the joint to its original position. Otherwise, you’d keyframe the joint’s translation to retain its original value. 5. The spine and left shoulder joints are the first to tackle.
■ Chapter 1: Character Skeletons Figure 1.11 The black-and-white based weights maps are on the left, and the colored heat maps are on the right. Gradient Weight Maps There are two ways to display a joint’s influence: grayscale shading and color ramps (also known as a heat map). The grayscale shading is straightforward: black is zero, and white is one. Heat maps increase the amount of visible contrast by displaying weight values as colored intensities.
Weighting Don’t worry about getting the weights perfect or taking away too much. The weights are far from being finished, and it’s much easier to come back with the Smooth Paint operation to fine-tune the results. 11. Spine2_JNT is a little out of hand. Its influence spreads across most of the body. Instead of trying to paint this out, it’s easier to flood the weight to 0 and paint it from scratch. Change Paint Operation to Replace, set Value to 0.0, and click Flood. All of its weights are removed. 12.
■ Chapter 1: Character Skeletons 13. Switch the Paint operation to Smooth, and click the Flood button six times. 14. Choose shoulderLft_JNT. Change the Paint operation to Replace, and use a Value of 0.0. Paint out all the weights up to the shoulder. Use Figure 1.14 as a guide. Remember to do the back of the character as well. 15. You should start to see some progress. At this point, you can use the Smooth operation to refine the weighting.
Weighting ■ 13 18. Select the character’s geometry, and open the Paint Weights tool options. Select the following joints from the Influences list, and pin the selection: • clavicleLft_JNT • shoulderLft_JNT • elbowLft_JNT • radiusLft_JNT • wristLft_JNT 19. Click shoulderLft_JNT. Replace any weighting with 0.0 below the elbow. 20. Switch to elbowLft_JNT, and replace all the weights above the elbow with 0.0. Repeat for radiusLft_JNT. 21. Switch to wristLft_JNT, and replace all the weights with 0.
■ Chapter 1: Character Skeletons Figure 1.17 Scale the weights to get a crease around the bent wrist. To check your work so far, you can compare it to jackWeights_v03.ma on the DVD. 26. Do the hip, leg, and neck using the same procedure you’ve followed for the other joints in this project. You can try them on your own or continue to the next project. Mirror and Copying Weights Symmetrical characters are great because you only have to build half of them. You can mirror just about every aspect.
Weighting 2. Select Jack’s geometry. Choose Skin ➔ Edit Smooth Skin ➔ Mirror Skin Weights. Use Figure 1.18 to set the mirror options. Click Mirror to apply the settings. 3. The Mirror Skin Weights tool is highly effective, but you can still have a few stray vertices. Rotate shoulderRght_JNT to 50.0 units in the Z. A single vertex from the torso is attached to the upper arm (see Figure 1.19). ■ 15 Figure 1.18 Mirror Skin Weight options Stray vertices like these are easy fixes.
■ Chapter 1: Character Skeletons Motion Capture Figure 1.20 Three axes from motioncaptured data Even the best animated characters still fall short of captured motion. You just can’t beat the real thing. There are reasons why, but current hand-keyed animation isn’t as convincing. Movie producers like to say it’s because animators make characters do things that aren’t natural. Animators say they needed more time or better direction.
Motion Capture systems. Until these are capable of delivering a convincing human performance, we still need to rely on motion capture for the ultimate in photorealism. As we mentioned at the beginning of the chapter, it’s important to know where your motion-capture data comes from. You can use material downloaded from the Internet, but it often requires a lot of work and in the end produces less than adequate results.
■ Chapter 1: Character Skeletons Figure 1.21 Scale the motion-capture group to match the size of Jack. G r o u p Sc a l e At this point, you may want to reevaluate the character’s scale. It should still be close enough. It’s difficult to state whether you should scale the character in its default pose or its first frame of animation. If the first frame is a crouching or lying-down position, then you have to go with the default skeletal pose.
Motion Capture ■ 19 6. Select mocap_GRP, and go to frame –13. Turn on Snap To Point. Press D, and snap the group’s center to the root node of the motion-capture skeleton. With Snap To Point still on, snap mocap_GRP to Jack’s root_JNT. The two skeletons are now collocated. 7. To get the skeletons to stay collocated, you need to add a point constraint. Shift+select root and root_JNT, and choose Constrain ➔ Point. Reset the settings, and choose Add. Figure 1.22 Add an IK handle to root_JNT.
■ Chapter 1: Character Skeletons Figure 1.24 Click Play to see the constraints working. Figure 1.24 shows that the two skeleton roots are nicely aligned. The captured character squats down with Jack’s root node connected and perfectly aligned. To check your work so far, you can compare it to mocap_v02.ma on the DVD. Let’s take a moment to review what you’ve just done. You point-constrained Jack’s root node to the motion-capture root node.
Motion Capture 14. Return to frame –13. You can now begin adding handles and constraints to the rest of the joints. For quick reference, Figure 1.26 shows the point and orient constraint options. 15. Add an SC handle from spine1_JNT to spine2_jnt. 16. Shift+select thorax from the motion-capture skeleton and ikHandle2. Add a point constraint. 17. Shift+select upperback from the motion-capture skeleton and ikHandle2. Add an orient constraint. 18.
■ Chapter 1: Character Skeletons Figure 1.27 22. Now is a good time to check and save your work. Jack’s skeleton should look like Figure 1.27 at frame 280. Check the alignment at frame 280. To check your work so far, you can compare it to mocap_v03.ma on the DVD. 23. The left arm is next. Use the following table to map it. For the hand, add an SC IK handle from wristLft_JNT to middle1Lft_JNT. The thumb on the motion-capture skeleton is too awkward to include; you can skip that joint.
Motion Capture To check the alignment of the two skeletons, go to frame 424 and compare it with Figure 1.28. ■ 23 Figure 1.28 Check the alignment at frame 424. To check your work so far, you can compare it to mocap_v04.ma on the DVD. 24. The head and neck are next. SC IK Handle Point Constraint Orient Constraint ikHandle 12 upperneck lowerneck ikHandle 13 head upperneck 25. More than half of the character is constrained. Unfortunately, IK handles and constraints can’t be mirrored.
■ Chapter 1: Character Skeletons To check your work so far, you can compare it to mocap_v05.ma on the DVD. 26. Hide all the joints and handles. Play the animation to check the quality of the motion. Figure 1.29 shows Jack in an extreme pose at frame 550. Maintaining Performance Other than the obvious geometry collisions, the data transferred pretty well. The only major motionrelated issue is in the shoulders: they look too high.
Motion Capture 4. Select clavicleLft_JNT. Change all of its Rotation values to 0.0. ■ 25 Figure 1.30 The shoulders at frame 1 U p d at i n g C o n s t r a i n t s When you move the clavicle, the arm moves away from the motion-capture skeleton it’s constrained to. The constraints aren’t broken; they simply don’t update. To force the constraints to update, move to a different frame and then move back to frame 1; the arm will now be in the proper position. 5.
■ Chapter 1: Character Skeletons Figure 1.31 The shoulder has been rotated in the Z by 7.0 units. Figure 1.32 Orient constraint options 6. Shift+select lclavicle and clavicleLft_JNT. Choose Constrain ➔ Orient. Add the constraint with the settings from Figure 1.32.
Motion Capture 7. After evaluating the shoulder again with its new orient constraint, it becomes evident that there are weighting issues compounding the problem. You can see in Figure 1.33 that clavicleLft_JNT is too strong of an influence. ■ 27 Figure 1.33 ClavicleLft_JNT weights 8. You don’t want to paint the weights on this model. Doing so would break the smooth blending between the head and body. Instead, return to the single-mesh weighted character to perform the fix.
■ Chapter 1: Character Skeletons 10. The correctly weighted mesh is loaded into the scene. The two versions of Jack overlap each other. Turn off the layer visibility of the imported Jack nodes. 11. You can’t copy the weights over to the animated Jack successfully until he is back into his bind pose. Go to frame -13.0 on the timeline, and choose Modify ➔ Evaluate Nodes ➔ Ignore All. 12. Now that everything is shut down, select all of the animated Jack’s joints.
Motion Capture ■ 29 14. You can turn on the layer’s visibility for the correctly weighted Jack, although doing so isn’t necessary. Shift+select weightFix_v01_body1 and body1. 15. Using the default settings, choose Skin ➔ Edit Smooth Skin ➔ Copy Skin Weights. 16. Shift+select weightFix_v01_head1 and head1. Choose Skin ➔ Edit Smooth Skin ➔ Copy Skin Weights. 17. Turn all the nodes back on by choosing Modify ➔ Evaluate Nodes ➔ Evaluate All. Jack snaps back into place with new shoulder weights (see Figure 1.
■ Chapter 1: Character Skeletons FBX The FBX file format has a long history of exchanging hands. It’s ironic, because it’s labeled as a universal data-exchange format. The name is from its original owner, Filmbox. After numerous ups and downs, Filmbox eventually became MotionBuilder, now owned by Autodesk. Its current version is now supported by Maya, 3D Studio Max, Softimage, LightWave, and others, including a QuickTime format.
FBX ■ 31 5. Select mocap_GRP, and snap its pivot point to the root joint. You can hold D and V on the keyboard to do both actions simultaneously. This is a good time to save your scene. To check your work so far, you can compare it to boxing_v02.ma on the DVD. 6. Choose File ➔ Export All. Change File Type to FBX Export, and click Edit Preset (see Figure 1.37). Figure 1.37 Set the Export All options to export FBX. 7. When you click Edit Preset, the Edit Export Preset window pops up.
■ Chapter 1: Character Skeletons 11. The rest of the Animation options should be turned off. Curve Filters and Constant Key Reducer are useful for cleaning up animation curves, but at this point you aren’t interested in cleaning the curves. Figure 1.41 Geometry Cache Files and Constraints, the next two sections, have no bearing on the scene because none of these objects exist in the scene. Figure 1.41 shows all the settings. The remaining Animation options Figure 1.42 12.
FBX 16. Choose File ➔ Import, and change File Type to FBX. Also deselect Use Namespaces, and use the settings shown in Figure 1.43. ■ 33 Figure 1.43 The Import Options window 17. Click Import to go to the Import browser window. Select the boxing.fbx scene from the chapter1\FBX folder on the DVD. As soon as you select the file, the FBX options appear at right in the window. 18. Under Include, change File Contents to Update Scene Elements.
■ Chapter 1: Character Skeletons To check your work so far, you can compare it to boxing_v03.ma on the DVD. For free and instant access motion capture, the results are pretty good. If you were to make extensive use of a motion-capture library, you could start with one of the skeletons provided by the library and build your character around it. Summary Libraries are limiting. At some point, you’ll need an animation they don’t have or some type of transition between captures.