PIPELINE TECHNIQUES: rig faces in Maya with detached blend shapes
Techniques for smarter face rigs
There are many techniques for rigging a character’s face in Maya. Whether your facial rig contains a basic system of joints or many complex nodes, chances are you’ll want to use a blend shape deformer.
Facial rigs for high-end cg often require a series of sculpted polygonal meshes, which can range from a few blend shapes to a few hundred. if your character has 60,000 faces (relatively low for production standards), every time you duplicate the geometry, your file size gets heavier and your scene performance decreases. But if we’re only sculpting facial shapes for facial expressions, keeping the whole body geometries and filling up our hard drives can be too much.
Let’s say your character has a small head and the entire geometry resolution is dense. if this character needs more than 70 blend shapes for the facial rig, it needs a copy of 70 but the body won’t be changed a bit. however, what if you could detach its head, sculpt all the blend shapes you want and then put it back on its body without adding any other Maya deformers? in this tutorial, we will demonstrate the proper workflow of using a ‘cut-out’ piece of geometry to drive a contiguous character mesh. special thanks to Tighe Rzankowski for his assistance with VEX scripting. 01
Manage component IDS When attempting to separate the head geometry from the body, you must not change any of the original component ids. in Maya, each component, such as a vertex, edge or face, is associated with a unique numeric value starting at zero and ending with last number of the total range of the components – this is often referred to as point order. Your character is essentially a list of points in space and we need to make sure each one ends up in the right place. Briefly, Maya remembers where the component was in local space of the geometry transform and moves it to an assigned position that’s driven by deformation nodes. it works like each of the marching band players, who are moving to certain positions on the football field they are performing on. in the image, cylinder (A) and (B) have identical component ids. however, if you look at the cylinder (c), you’ll notice the point order has changed. if you were to apply the two cylinders (B) and (c) as targets of the cylinder (A), the output geometry would look different for each shape. 02
Examples of blend shapes in the image, we are successful because the two geometries share the same component ids. each vertex of the base cylinder (A) has moved to the correct position relative to the original shape, cylinder (B). This is another case of a blend shape. unlike the first example, it doesn’t quite look like what i wanted. exactly the same thing happened to this cylinder but the only difference is it had a different component id
assigned on each vertex. it looks a little broken but technically there is nothing wrong with this output – this can easily happen if you do not detach the head geometry properly. As i have mentioned, component ids of a geometry start at zero and end at the last number of the range. Any action that adds or removes components like extruding, merging, separating, cutting or inserting loops will change the length of the component range, thus affecting the point count. These types of model edits will often cause unpredictable changes to the point order. 03
Detach head from the body There is no way to avoid a serious change in point order – however, we can manipulate the point order in a way that lets us work with the body and head separately. select the faces of the character’s head that you wish to detach and use Maya’s separate command. We now have two geometries with component ids starting at zero. This would be a great time to duplicate the detached head geo. We can clone this geometry for every facial target shape we wish to create. 04
Combine the head into body it is imperative that we select the head first as this function rebuilds the component id. The first selected object will retain its original point order; the points, in relation to the second object, will be renumbered starting from one above the last id of the first object. After merging two geometries, the total number of the components is more than the original geometry’s component number because there are unclosed components in between the combined geometries of where the section was. if the number vertex of the original geometry was ‘n’, the total number of the vertex becomes ‘n’ plus the number of vertices from the seam. it is hard to tell just by looking at it but these vertices need to be merged as well. Keeping the component id after merging vertices is the same as merging geometries. select the components from the head first, then the components of the body parts and merge! The output geo has an identical shape and component number but has a different component order. however, the output geometry shares the same number and order of components of the duplicated head geo. The head geometry can deform the body without exploding. 05
Finalise the geometry After combining head and body, you may have noticed a little mark where the section was completely sealed. You can simply remove these hard edges by smoothing the normal of the mesh. This action won’t make any change to the component ids so it is safe to do after the whole process. however, it still leaves construction history unless you turn it off when you are running this command. Removing nodes that aren’t needed for your rig performance helps optimise your scene. now open your outliner and node editor to find and clean all the extras. After adding this final touch, this special body geometry is ready to be driven by its detached head. 06
Apply blend shape on mesh There’s still one more small extra step before applying the blend shape on the body. if you simply create blend shapes with default options, you might receive an error reading, ‘no deformable object selected’. You can avoid this by simply unchecking ‘check topology’ in the tools options or turning it off in your command line. Don’t forget about this when you’re adding more blend shapes, too.