Building A Complete Human Facial Rig In Maya, Part 2
In today's post we're bringing you the second part of Soni Kumari's excellent facial rigging tutorial for Maya. In part two you'll be learning how to create a series of facial morphs based on various facial expressions and poses. You'll also learn how to skin the head, paint and adjust weights, fix deformation errors and set up control sliders for each blend shape. You'll then begin construction on a facial GUI (graphic user interface) for the character, which will carry over into the next part.
This tutorial is a companion piece to author Soni Kumari's previous premium series covering the creation of a complete human character rig. Building a face rig suitable for animation is one of the more challenging aspects of character creation, this series will walk you through the entire process from start to finish and give you a detailed, in-depth lesson on what it takes to build a intuitive and animation friendly facial rig from scratch!
Also available in this series:
- Building A Complete Human Facial Rig In Maya, Part 1
- Building A Complete Human Facial Rig In Maya, Part 2
- Building A Complete Human Facial Rig In Maya, Part 3
Let’s start Maya and open the "Complete Jaw control.mb" file which was saved at the end of the first part of the tutorial.
In this step we will start skinning. So unhide the face mesh by clicking on the layer visibility tab as shown in the image below.
If you are not in Animation mode, then switch to Animation mode by clicking on mode menu command. To apply the Smooth Bind command, first select the face mesh object and then select the Neck_joint and apply the Smooth Bind command (Skin > Bind Skin > Smooth Bind) as shown in the image below.
After applying Smooth Bind, select the head control and Rotate it to test the head rotation. You will notice that the face mesh also deforms along with the head control. After checking, undo the last move.
To clean the view port, we will create one layer to put all the cluster deformers on. So in the panel menu, click on Show and select the None command to hide all elements from the view port.
After hiding all view port elements, again click on the Show menu and turn on the Deformers option for showing only deformer objects.
Now, first select all Clusters, then in the layer pallet click on Create new Layer with the Assign selected objects tab button. This makes a new layer (layer1) with all selected clusters on it. Also rename layer1 as AllClusters.
Now, first turn off the visibility of the AllClusters layer which will hide all the clusters on that particular layer. Then click on the Show menu on the view port panel menu group tab bar and select the All command, to show all elements in the view port.
You will see that all elements are now visible in the view port except for the clusters. Now we will refine the Smooth Bind skin weights for all joints and skin for proper deformation.
To check the applied skin effect. First select Head_Control, and then put a value -20 in the JawZ fill box. You will notice the skin deformation is something like what's shown below. It looks bad, so we will now amend this.
To edit and balance skin weights, click on Skin > Edit Smooth Skin and then click on the Paint Skin Weights Tool options box.
This opens the Paint Skin Weight Tool settings panel. In the Attribute panel, Neck_Joint is selected by default and it shows the skin weight in the viewport.
With the Neck_joint selected, slide the vertical slider down and see the selected geometry options for painting weights. Put the value to 0 and turn on the ‘Replace’ radio button for Paint Operation.
Now drag and replace the weight value on the back of the head mesh wherever it is not necessary. Here you will have to calculate for yourself how much skin mesh deformation you want on the Neck joint.
If you select the Head_joint, you will see the maximum skin weight around the Head mesh, but no proper skin weight around the sides of the nose. So we have to replace the weights down the neck wherever it is not necessary for area of the Head mesh.
For adding more weight influence to the nose area, put a maximum value of 1 in the Value slider fill box and then drag the brush on head area of the mesh.
Now, continue painting weights around the head and nose area. You will now see the upper lips are open due to the weight influence.
After painting weights, turn on the Smooth radio button and click about two or three times on the Flood button. This makes the skin weights smooth. Do the same thing for the Neck joint also.
Next, select Jaw_Joint, and turn on the Paint operation radio button, and then put a value of 0 to remove unwanted weights. Weight should remain till only the jaw area.
Do the same as we have done in the previous steps to define the weights. It should now look something like this.
Next, select JawTip_Joint, turn on the Paint operation Replace radio button with a value of 0. Now drag the brush around the JawTip_Joint to reduce the value of the skin weight.
Just like this you should work on refining proper skin weight influences. After that check all the joints influence weight. If everything is right, your character's facial expressions will be good.
After the skin bind, we will make some Morph targets. So reset the Head_Control attributes.
For making Morph Targets, select the face mesh object, then press Ctrl+D key to make a duplicate copy of it. After duplicating the face mesh object, it's not possible to move it because it has the smooth skin bind applied already. So to move the duplicated mesh, select all the transform attributes in the channels and then right click and select the ‘Unlock Selected’ command.
Now, move the new duplicated face mesh away from the main face mesh as shown in the image below.
Just like this continue duplicating the mesh and arrange them as shown below. These copied faces will be used as morph targets for different facial expressions.
Now, we will start modifying the duplicated faces one by one according to the desired expression. Also rename the meshes according to the chosen expression. So select the first duplicated head mesh and rename it as R_Eye_Blink, because we will use this morph target to blink the Right Eye.
With the mesh selected, let’s concentrate on the right side eye. Now, select the upper and lower eye lid vertices in components vertex mode, and scale down or edit the eye lid into a closed position as shown in the image below. You should always think about each expression and then modify the vertices as per requirement.
Now, select another one of the duplicated face meshes, rename it as L_Eye_Blink, and modify it so the left eye lid is in a closed position as shown. Now we have two morph targets ready for both the right and left eye blink.
Next, select the third duplicated face mesh and rename it as R_Smile.
Select the Soft Modification Tool, and click on the right side corner of the mouth. If you want to increase the influence of the soft modification tool, press and hold down the B key and then drag using the Middle Mouse Button inside the influence circle to adjust it until you have a sufficient influence.
Now, drag the mouse upward in the Y axis, and also rotate it to make the smile pose as well. Something like what's shown in the image below.
Now select the next duplicated face mesh and rename it as L_Smile. Using the same technique as we did in the previous step, create the smile for the left side of the mouth.
Now select the first mesh in the next column and rename it as Both_Smile, and then select the Soft Modification Tool again.
Modify it in such a way that it looks like a full smiley expression, something similar to what's shown in the image below.
Now, select the next duplicated mesh to make the sad expression.
Using the same technique as before, create a sad expression on the characters face. As shown below.
Select the next face mesh and first rename it as Upper_Mouth_open. In Vertex component mode, select four rows and columns of the upper lip, and drag them in the Y direction.
Modify the upper part of the mouth to open, as shown in the image below.
Select the next face mesh and rename it as Lower_Mouth_open, also modify the lower lip vertices in such a way that it looks open.
Now, select the next duplicated face mesh and rename it as R_Frown_Up.
With the Soft Modification Tool selected, edit the vertices to frown up the right eyebrow.
Now the frowned face should look similar to what's shown below.
Select the next face mesh and rename it as Surprise. Also select the Soft Modification Tool again to give the face a surprised expression.
Edit it with the Soft Modification Tool to make it look something like what's shown below.
Select the next duplicated face mesh, and rename it as Anger. Then select the Soft Modification Tool again.
Deform it in such a way that it should look like an angry expression.
We have now made a handful of morph targets with different facial expressions. One thing I would like to tell you is that you can still make many different morph targets according to your specific requirements. For example: if you need phonetic expressions like A, E, O, P, Ah!, Yo, Hey etc, you can make them. You just need to follow the same techniques which have been apprized in the previous steps.
Now, it’s time to clean up the viewport. So select all the morph objects and click on Create new Layer with Assign selected objects, and then double click on layer1. Which opens the Edit Layer setting box. Rename it as MorphObjects and then click on the Save button. Now all the morph targets are on this new layer.
Before applying the Blend Shape modifier, I would first select R_Eye_Blink then select L_Eye_Blink, and continue selecting the targets in sequence until Anger. All the morph targets will come in this very sequence in the Blend Shape.
After selecting all the morph targets, now select the main target face mesh object.
While in Animation mode, click on Create Deformers and then select the Blend Shape options setting box.
The Create Blend Shape Options box opens. Enter FaceMorphGroup as the BlendShape node: name, and then click on the Create button to apply the Blend shape command.
Now, click on Window > Animation Editors and then select the Blend Shape command.
In the Blend Shape window, you can see the Morph control sliders according to the applied morph shapes. You can check the functionality of the blend shapes by sliding the slider; you will see changes on main character face expression accordingly.
After checking all expressions, click the Reset All button to neutralize all the expression values. Then close the Blend Shape window.
Now let’s hide all the morph targets because we have already loaded the targets in the Blend Shape. So, to hide all morph objects, turn off the visibility button of the Morph Objects layer.
Before going to the next step, I would like to tell you about one possible error which you may experience. Whenever you rotate the Head_control to make some kind of pose and you use the Blend Shape too, you will notice that the face mesh doesn’t deform properly.
This happens because the use of the Blend Shape and Smooth Skin bind. It happens when we first apply the Smooth Skin modifier, then the Blend Shape command. So to rectify it, we have to rearrange the order of the Blend Shape and Smooth Skin bind, i.e. we will first apply the Blend Shape command then the Smooth Skin modifier. After that it will not create problems.
Right click on the selected face mesh, then choose Inputs, and finally select the All Inputs... options command.
It opens the List of input operations box. Here select the Blend Shape node, then drag it using the Middle Mouse button and drop it onto the Skin Cluster node.
Now the Skin Cluster is in the first position and the Blend Shape is in the second position. We have successfully changed the order of these commands. Close the option box.
Now let’s check how it affects the face. So Rotate the Head_Control and also adjust several of the Blend Shape sliders randomly to create some weird, funny expression. You will notice that everything is now working perfectly.
Once satisfied with the deformation, do undo and reset all sliders and controls to keep the face in the initial position. And also close the Blend Shape control window.
Now, we will create a GUI (Graphic User Interface), which will be some curve controllers for the various facial expressions. This is actually a very useful thing for animators and helps them to make various facial expressions easily. So let’s start creating GUI. Go to Create > NURBS Primitives and then select Circle. Also jump into the Front view.
Drag and create a circle in the front viewport. Then while in Components mode, reshape the circle into an over facial shape as shown in the image below.
With the newly created curve selected, rename it as Face_GUI.
After renaming the control curve, don’t forget to Delete History and Freeze Transform.
Let’s change the controller’s color to be easily recognizable; it would also be convenient for the animators. So first select the Head_Control, then press Ctrl+A to open the Attribute Editor. In the Attribute Editor, click on the Object Display arrow button to show its options.
Now click on the Drawing Overrides arrow to open its options.
Now, in the Drawing Overrides option, check on Enable Overrides, and slide the Color slider to change the color to something you want.
Again select Both_Eyes_Control, and do the same as we did in the previous step. This time use a different color like blue.
Following the same techniques, you can change the display colors for all controls to be recognized easily.
Finally save the file as "Morph completed.mb." In the next part we will create some more controls for the GUI and then connect them with the blend shapes.