Sometimes, using skeletons to animate can cause problems, particularly in facial animation. Hundreds of different muscles are required to arrange the human face into the positions that people use to communicate nonverbally. Trying to emulate this arrangement with dozens of bones strewn throughout a character's face doesn't make for easy animation. A better solution is the Blend Shape deformer, sometimes known as a "morph." Blend Shapes can work on any NURBS or polygonal geometry, warping the source object to the shape of the target. In general, you copy the base object and modify the copy into a new shape. For example, you could copy a character's head and arrange its facial features for one of the phonemes used for human speech the "ooo" sound. You could then use this copy as a Blend Shape target for the original neutral face. Animating the percentage of blend makes the face gradually change from the neutral pose to the "ooo" pose. You can apply any number of targets to the base object, allowing you to mix percentages of all the targets into the base object. With enough phoneme poses, you can simulate speech. In addition, you can blend any combination of poses. For example, you can have a left eyebrow-raised pose and a right eyebrow-raised pose. These poses can then be animated independently alongside the speech animation for truly emotive character animation. Tutorial: Facial Expression with Blend Shapes Animating facial expression is a snap with Blend Shapes. Facial expressions are created by making a copy of the original head, changing the facial expression, and adding this copy as a target to the original head on a Blend Shape deformer. Maya offers a vertical slider style Blend Shape editor that makes it easy to set keys for facial expression. On the DVD Chapter_12\ch12tut06.wmv |
On the DVD Chapter_12\ch12tut06begin.mb |
Load the file noted next to the DVD icon. The character you find in this file is the Creepy Alien. You use this character model for the facial animations found in this tutorial. Editing a simple object like this enables you to quickly make major changes to the character's face without the lag of a high polygonal model. First, copy the original head to make sure you have a source for future facial expressions. Duplicate the head with Hotbox | Edit | Duplicate | option box, reset the settings, and click Duplicate. Move the duplicate to the left of the original head, and name it more_faces. Select the more_faces head and duplicate it (hotkey: Ctrl+d). Drag this new head to the right of the original head, and name it Confused. Choose Hotbox | Polygons | Smooth Proxy to see the smoothed mesh under this proxy mesh. Drag the proxy to the right of the smoothed head if you like; it might be easier to see the edits as you make them to the facial expression. Right-click on the proxy and choose Vertices. To make a concerned, worried monster, select the vertices at the four faces at the front of the brow and move them down, as shown in Figure 12.22. Figure 12.22. Editing the proxy while observing the effect on the smoothed object.
Right-click over the model and select Face Mode. Now, select the center face of each forehead lobe, and move it slightly inward. Marquee-select an area around the nose; this process selects polygons at the front and the rear of the head. Orbit to the rear of the head and deselect these faces by holding down the Ctrl key as you drag a marquee over the unwanted faces. Notice how the manipulator moves to the front faces of the head after you deselect the faces in the rear. Orbit back to the front, push the nose up, and scale it down vertically a slight amount (see Figure 12.23). This adds to the confused facial expression. Continue editing the proxy head until you like the facial expression you've created on the smoothed face. Exit face editing (literally!) by right-clicking and choosing Object mode. Figure 12.23. Adjusting the faces on the nose. trap The Blend Shape might produce unwanted results if the target and base objects aren't precisely the same geometry. Do not split, add, subtract, or otherwise change the target object in a way that might change the number of vertices or faces! Select the smoothed head and delete it. Right-click on the smooth layer (confusedSmoothMesh) in the Layers editor, and delete it. Do the same for the proxy mesh layer (AlienHead). Select the confused proxy head, and then Shift-select the original, expressionless head. Now, choose Hotbox | Deform | Create Blend Shape | option box, and reset the settings. Change the BlendShapeNode name to Alien_Expression, and click Create. Open the Blend Shape editor (Hotbox | Window | Animation Editors | Blend Shape). In the Blend Shape dialog box, adjust the Confused slider to see the original face move into the confused shape, as shown in Figure 12.24. Figure 12.24. Use the Confused slider to adjust the original head's facial expression. tip You can delete the confused head at this point, if you like the Blend Shape editor records the facial position, so the actual geometry is no longer needed. tip Although 0 to 1 is the range created for the Blend Shape slider, you can type in other values, as you learned in other areas of Maya, such as the Color Chooser in Chapter 9, "Materials." You can use negative values to change the pose in the opposite direction, or go beyond 1 to extrapolate to a more exaggerated blend. To see the real result, try applying a smooth to the head. Smooth the original AlienHead object by selecting it, and choosing Hotbox | Polygons | Smooth. Now try the slider in the Blend Shape dialog box to see the result. Make another facial configuration and add it to the Blend Shape set of facial expressions. Duplicate the more_faces object and drag it to the right of the confused head. Name this head open_mouth. Make a smooth proxy of this open_mouth head, and drag the proxy object to the right of the smoothed head. Right-click over the proxy object and choose Edge Mode. Select several edges at the front of the chin you might need to orbit to a point where you look down on the face to select just the front of the chin. Open the Selection Constraints dialog box (by choosing Hotbox | Edit Polygons | Selection | Selection Constraints). Click the Grow Selection Region button to increase the selected edges. Continue enlarging the selection until the entire lower jaw is selected. Then, press Ctrl while marquee-selecting unwanted edges to deselect them. You need to orbit around the head to find the unwanted edges and deselect them. With just the lower jaw selected, switch to the Side view. Set it to Wireframe mode (hotkey: 4), and switch to Rotate mode (hotkey: e). Toggle the pivot point by pressing the Insert key. Move the pivot point to the jaw hinge, and exit pivot editing by pressing Insert again. Now, you can rotate the jaw down to open the mouth. Check your work in the Perspective view. Right-click and press the F8 key to exit Component (edge) mode. Select the smoothed open_mouth head and delete it. Right-click on the smooth layer (open_mouthSmoothMesh) in the Layers editor, and delete it. Do the same for the proxy mesh layer (AlienHead). Select the open_mouth proxy head, and then Shift-select the original, smoothed, expressionless head. To add this Blend Shape to the Alien_Expression set of Blend Shapes, you need to apply this Blend Shape differently. Choose Hotbox | Deform | Edit Blend Shape | Add | option box. In the Add Options dialog box, reset the settings. Set the Specify Node option to Alien_Expression. Clear the Check Topology check box. Click Apply and Close, and go back to the Blend Shape editor. (If you closed it, you can find it under Window | Animation Editors | Blend Shape.) You see a new slider for the open mouth. Try this slider, and watch the smoothed shape open its mouth. You can also add any amount of the Confused slider to the slack-jawed alien. You can repeat steps 10 through 15 to add more facial expression sliders for the alien, if you like. At this point, however, try creating a little facial animation first. Set both sliders to 0 in the Blend Shape editor, and set the current frame to 0. In the Blend Shape editor, click the Key All button. Go to frame 35 and raise the Confused slider to 1.0. Click Key All again. Go to frame 40. Set Confused to 0, and raise the Open_mouth slider to 0.5. Click Key All again. Go to frame 60, raise Confused back to 1.0, and again click Key All. Create a playblast of frames 0 to 60 (by selecting Hotbox | Window | Playblast | option box). Set the Time Range to Start/End, set the start and end times to 0 and 60, and click Playblast to create an AVI of your animation. Blend Shape deformers are a delightful way to animate poses for any geometry. They provide an easy-to-use interface for mixing and animating poses, and you can even take any mixed configuration and "bake" it into another Blend Shape slider (the Add function in the Blend Shape dialog box). You can mix Blend Shape deformers with characters that have been skinned with a skeleton to get walking, talking objects in Maya. You can also use Trax to animate facial poses with blended still poses or clips of motion. On the DVD Chapter_12\ch12tut06end.mb |
On the DVD Chapter_12\ch12tut_reversefootrig.wmv |
Going Further Try creating other animation clips and combining them in Trax. Try creating more facial targets and animating them with more complex facial animation. Try creating a skeleton for a quadruped, such as a dog, and explore this creature's unique walk cycle. In addition to the movie tutorials on the DVD, look for the additional setup movie for the reverse foot rig. You can add it to your existing skeletal rig to advance the quality of your motion while each foot takes a step. |
|