|
Blend shapes work by referencing the vertices from a duplicate of the main mesh. The duplicated vertices are edited to create a facial expression into which the main head will morph on command. Suppose the duplicate face is edited to represent an open mouth. Using the Blend Shape window, you can then tell the main face to gradually morph into the duplicate, making the character's mouth open and close. Depending on the system for which you are developing, the number of available blend shapes might be restricted, so always check with your manager first. Work with as few blend shapes as possible. In this section, we will work with just a few basic shapes, and you can add more if you have the budget to do so. Our first step is to prepare the geometry. Preparation for Blend ShapesOpen up the file called Kila_MainRig.mb and turn off visibility for all the icons. We can't use the geometry in its current state for our work with blend shapes, so (as we did with the joint rig) we need to combine all the separate elements of Kila into one object. With the first LOD combined into a single element, we could duplicate the whole figure and use that as our morph target, but that would be a huge waste of memory and processing power because we only need to alter her face. So we will separate her face from the rest of the body, and then combine the rest. In effect, there will be two separate mesh objects.
The mesh is now ready for generating face shapes. Move the geometry for both the face and the body back inside the Kila4095 folder in the Outliner. Then rename the body to KilaBody and the face to KilaFace. Save the file as Kila_Combined.mb. With the face detached and the rest of the body combined, we can start to build up our library of face shapes. Generating Face ShapesCreating blend shapes is a simple task involving nothing more than editing vertices. The faces we create will essentially be the same as the poses we generated for the joint-based facial rig. To start, we will generate the Ahh shape so that we can test the mouth before continuing on to create shapes that will animate the eyelids and eyebrows. We will then create the O, L, MPB, FV, Ooo, Smile, and Frown shapes. You will notice that, unlike the joint-based facial setup, we don't create face shapes for CDENSZ and AKI. Since we are limited in the overall number of blend shapes we can use, we will use the Ahh and Smile shapes together to create CDENSZ and AKI. Efficiency is also called for in the creation of some base facial poses, including Shock, Angry, or Happy. These can all be done via the other basic shapes. NOTE It's important that the geometry is fully tested and complete before you create the blend shapes. If the topology is altered in any way afterward, they will have to be redone. Each vertex is assigned a number in Maya, and blend shapes work with these numbers. Altering the topology means altering the vertex numbers, so the face shapes will no longer work. You can still flip and edit edges, as that doesn't affect vertex numbers. TIP Do not freeze the transforms on any of the face shapes. The vertices work on a relative basis, so all transforms should remain intact. If not, when you blend the main face to one of the others, the whole face will move to its target. Let's create the Ahh shape.
The first mouth shape is complete and we haven't noticed any problems. One good feature of blend shapes is that, even after they have been applied to the main model, you can still tweak the vertices to get the shape just right. We'll do the eyebrows next, and learn a technique of creating two face shapes from one.
TIP To save time, select the same vertices on each side of the face. This way, when you move them, both sides will be exactly the same. This shape is acceptable for moving both eyebrows at the same time, but we want Kila to be able to move them individually, as well.
The technique you've just used is a quick and easy way to get two shapes out of one; plus, you will know that each side will be the same. It may be that you don't want the face to be symmetrical, which is fine, but this way you get a good starting point from which you can tweak later. Go ahead and create the rest of the face shapes needed, by simply duplicating the main head and editing the vertices. You should have the following:
TIP For the eyelids, you will need to use the shape of the eyes as a guide, so keep the duplicated head in its default position until you are happy with the eyelid shape. You can see all of these shapes in Figure 13.38. These represent a good initial group of face shapes for a character. If your budget allows, you can add more to get more refined manipulation of the face. Figure 13.38. Blend shapes for Kila's faceWith the entire library of face shapes complete, we can now apply them to our main model. Blend Shape ApplicationThe geometry shapes are ready, so now we can connect them to the main face model, allowing us to morph the face into any of the new shapes.
To animate the blend shapes, go to Window > Animation Editors > Blend Shape, which opens up the window shown in Figure 13.40, left. Moving the sliders will animate the main face, morphing it into its target shape. Pressing Select will select the node, enabling you to animate it via the Channel Box (Figure 13.40, right). Figure 13.40. The Blend Shape windowNOTE You can change the orientation of the sliders by going to Options > Orientation and selecting either Horizontal or Vertical. Vertical is the default view. Now that the blend shapes are set up, take some time to edit each face, tweaking the vertices until you are satisfied with the final shapes. Place all the face shapes in a new group called Bshapes; then move this node so it is under the Kila4095 group. Create a new display layer called BlendShapes, add the BShapes group to it, and save your scene as Kila_FaceRig_BS.mb. TIP Once the face shapes have been applied to the main face, you can delete them. However, I recommend keeping them in the scene for as long as you can. This allows you to easily edit them if you need to. The animator will quite happily use the Blend Shape window to animate the character. If you like, though, you could use Set Driven Key to tie the blend shapes into the main head controller, as you did with the joint setup. Facial Animation and LODsYou have now worked through two approaches to facial animation on Kila, but what about the LODs? Giving a character the ability to be seen talking might be unnecessary at a distance, but you may need it for the next level of detail. For the joint-based face, all the hard work has already been done. Because all the animation is applied via the joints, we can simply bind the lower LODs and then copy the weighting information across. We will be covering this process in Chapter 14. The blend shapes, however, will need further work in terms of LODs. These shapes reference a copy of the face's geometry, so we will need to create the required blend shapes for all the LODs. This might seem a daunting task, but getting organized ahead of time will help. Before you start, consider what will actually be seen at that distance and what the geometry will allow. Dolly out until Kila is just about to switch to her next LOD; then use the Blend Shape window to see what face shapes are visible and actually distinguishable. Certainly at this distance you can see that her mouth is open or closed, her eyebrows are raised or lowered, and her eyes are open or closed. The smile is clearly visible, but the rest of the mouth shapes can hardly be seen, so it wouldn't be advisable to re-create these for the lower LOD. With the blend shapes created and applied, you can use the Connection Editor to connect the lower-LOD blend shape nodes' attributes to the higher ones. When you animate the highest LOD, the lower ones will follow; that means you and the animator don't need to animate each individual LOD. |
|