Eventually we'll add sound to this animation and lip sync the character to the sound. In order to do this, however, we need to make mouth shapes and facial expressions.
Just like we used keys to describe the position of a bone at one point in time, shape keys describe the position of vertices within a mesh.
Shape keys are most often used for facial expressions. We will create some basic shape keys like "open", "wide", "narrow", "brows up", "brows down", and "eyes closed". Then we can mix the facial expressions together in an animation, and lip synch to a sound file.
I should say up front that the process of creating a set of shape keys can be quite time consuming. Vertices have to be moved individually, and it's tough to get just the right expression. Just take your time and have fun giving the character life.
Creating the first shape key
First, we need to make the armature stay still so we can work on the facial expressions without the character walking around. To do this,
- Select the armature
- In the Armature panel under the Edit buttons, press the Rest Position button. Now the armature will stay still until we press the Rest Position button again.
Now to create some facial expressions: that means more modeling in Edit mode.
- Select the character mesh.
- In the Edit buttons, look for the Shapes panel. It is often seen as a tab next to the Modifier stack. Keep in mind that a mesh has to be selected before these controls appear.
- Click the Add Shape Key button. This created a shape based on the current shape of the mesh, ignoring the effects of the armature. The only thing a new shape records is the shape of the vertices in Edit mode.
The Basis shape is the default shape that we modeled the character in, so we want to leave it alone and not make any changes. It is the reference shape that all other shapes will be based on.
- Add another Shape Key. A new shape key is a copy of the previously selected one. In this case, it's a copy of the Basis shape.
- Name the new shape "Open".
From now on, we'll have to be careful when we switch into Edit mode. Whatever shape is selected in this panel is the shape that will be edited when you enter the mesh's Edit mode.
- In the Mesh Tools 1 panel (also under the Edit buttons), press the X-axis mirror button. This allows us to work symmetrically on the mesh. Note that the Mesh Tools 1 panel is only visible when you are in the object's Edit Mode.
OK, so why didn't we use a Mirror modifier? It turns out that if we used a Mirror modifier we would lose all shape keys and weight painting. OK, why didn't we use this X-axis mirror button when making the character? Because this tool only lets us move, rotate, and scale vertices -- it can't handle extrusions. And we sure did a lot of extrusions! The point is, each tool has its limitations. We are done with extrusions and will just be moving vertices around, so the X-axis mirror tool is perfect for us right now.
The Open shape
We're going to start modeling the "Open" shape. Remember, we saved the original state of the mesh by creating the "Basis" shape, so it's safe to move vertices around. We could move vertices one by one to open the mouth, but there's an easier way. First, keep in mind that when you open your mouth, your jaw doesn't just drop straight down, it swings in an arc, hinging at the back of your jaw. We can easily simulate this:
- Enter the mesh's Edit mode.
- Select a vertex on the centerline of the front of the face.
- Snap the 3D Cursor to the selection with ⇧ ShiftS → Cursor to Selection. This gets the 3D Cursor on the centerline.
- Switch to Side view.
- Place the 3D Cursor in Side view, Ortho mode (5 NumPad) in the spot roughly as shown. The cursor was on the centerline from the previous step, and we can't move the cursor left or right of center in Side view (we can only move it forward/back and up/down), so the cursor will still be in the center of the head.
- Select the vertices that make up the lower jaw. Since we have X-Axis mirror enabled, we only have to select one side. Don't worry about the vertices on the inside of the mouth, we'll get them shortly. Do, however, try to get the lower lip vertices.
- Switch to side view.
- Change the Pivot center to the 3D Cursor.
- Rotate the jaw around the 3D Cursor (R). That got us the general shape we wanted. Now we have to get the inside of the mouth to open, as well.
- Select the vertices on the inside of the mouth that you want to move with the lower jaw.
- Rotate them around the 3D Cursor in Side view, as well.
In the screenshots below, I spent some time to smooth out the vertices near the throat by moving them by hand. I also moved some vertices around in the inside of the mouth. Building shapes like this takes a lot of time, and is an iterative process. We'll have to see how this shape behaves when it is combined with a "wide" shape, and make some changes as necessary.
The bottom line is, it takes time and practice to build facial expressions. Don't get frustrated, and keep playing around. Sometimes it's useful just to create a new shape and start over rather than try to fix a shape you've been working on.
Here are three views of the "Open" shape after spending some time moving vertices around. The first two are shown in wireframe to better show the position of the vertices.
- Switch back to Object mode.
- Move the slider in the Shapes panel to determine how much of the selected shape (in this case, the "Open" shape) should be applied.
Note that when you move the slider, a key appears in the Action Editor (If the Shapekey editor is selected from the "Editor Mode" drop down), as well as a slider. I prefer to use the slider in the Action Editor instead of the one in the Shapes panel, especially for mixing multiple shapes (they both work the same way). Try this:
- In the Action Editor, select "ShapeKey editor" mode.
- Set a key for the "Open" shape, say, 0%, at frame 1.
- Move to frame 11 with ↑.
- Set a key for the "Open" shape, say, 100%.
- Move the frame slider back and forth to see the mouth open and close!
- When you are satisfied with your "Open" shape, delete the key in frame 11 (by selecting it and hitting X), move the frame slider to frame 1 and set the "Open" shape back to 0%.
The Wide shape
Now we'll make a "Wide" shape.
- Make sure you are in Object mode.
- Select the Basis shape in the Shapes panel, by using the arrow buttons next to the shape name.
- Press Add Shape Key to add a new shape. When you add a new shape, it turns into a copy of the previously selected shape. We want to start with the original shape of the mesh, not the Open shape, so that's why we had to select Basis first.
- Name this shape "Wide".
- If you want, you can set the strength of this shape to 100% now, so that when you switch back and forth between Object and Edit mode you will see the "Wide" shape in both modes. Otherwise, you will see the shape in Edit mode but in Object mode the shape will do whatever the Action Editor says it should be doing in that frame.
- Switch to Edit mode to start making the "Wide" shape. It's impractical to go step-by-step, so here are screenshots of the "Wide" shape I made. This shape initially looks like a smile - in fact, adding some eye squints would make it a smile. However, we also want to use it for making an "EEE" sound (when combined with the "Open" shape) so to serve this dual purpose, we don't want the eyes to squint (we can make an eye squint shape later, and mix it with this shape).
Some tips on the "Wide" shape:
- Take your time! There's no quick way to do this.
- Make sure you have Subsurf turned OFF in Edit mode
- Move one vertex at a time. It's tedious, but that's how it's done.
- Constantly change your view - often you will need to check the movement of a vertex in several views to make sure it's not making a dent or crease in the face where you don't want it to.
- The corners and inside of the mouth are tricky. Switch to wireframe mode, select one vertex, and rotate the view around to get a feel for what part of the mouth it is (inside upper lip? lower lip?). Then move it to where it should be.
- When you're happy with the "Wide" shape, switch to Object mode.
- In the Action Editor, mix the shapes by moving the sliders. Here's what my shapes looked like individually and then mixed:
If your shapes look strange while mixing, play with the sliders to try to figure out what's going wrong. This is one of those things that just takes some experience to figure out. If you'd like, you can download the .blend so far and take a look at the shapes.
The Narrow shape
By now, you've got the basic idea:
- Switch to Object mode.
- Switch to the Basic shape.
- Add a new Shape Key.
- Name it (this one will be "Narrow").
- Switch to Edit mode to start shaping.
My "Narrow" shape looked something like this:
- Check to see that "Narrow" and "Open" work together. We don't need to check "Narrow" and "Wide" together, since they are opposites.
Shapes for the eyelids
For the next shape, close the upper eyelids ("Upper lid closed"). To do this, I found it was best to turn on Subsurf in Edit mode, so that I knew how far the eyelid was moving.
Next, make a "Lower lid closed" shape, something like this. Again, enable Subsurf in Edit mode.
Let's make one more shape for now: a "Brows up" shape. I move the forehead vertices up and outwards.
The shape keys set
Below are the shape keys we have so far. Now that you know how, you can build as many shape keys as you'd like. Good ones to build would be shapes to make "M", "F", and "B" sounds. For the purpose of this tutorial, this set is sufficient for now:
We created a basic set of facial expressions using Shape Keys. Next, we'll add sound to the animation and lip sync the character to the sound using these new facial expressions
Previous: Using the NLA Editor