Advertisement

Create a Facial Animation Setup in Blender - Part 2

by

In this part of the tutorial we will learn how to add drivers to the shape keys we created in part one, and add controller bones to complete our basic face rig.


Additional Files:


Armature Setup

Step 1

Since we are focusing only on the face, we will create a small armature just for the head for now (assuming that it is continuing from chest.) If your model is already rigged, you can skip this and start with the Creating Driver Bones section. To start, select the model by Right Clicking, and then press Shift-S and select Cursor to Selected. This will move the 3D cursor to the center of the object.

Blender-Facial-Animation-Setup-PT2_a01

Press Shift-A and add an Armature.

Blender-Facial-Animation-Setup-PT2_a01b

In the Armature properties, check on X-Ray so we can see the bone through the object.

Blender-Facial-Animation-Setup-PT2_a01c

Step 2

Press 3 on the Numpad to get into a side view. And with the Armature selected, press TAB to enter into Edit mode. Select the bone by Right Clicking, and press G to move it near the neck as shown in the following image. Select the tip of the Bone, and move it down (with the B key) to the top of the neck.

Blender-Facial-Animation-Setup-PT2_a02

Step 3

Select the tip of the Bone by Right Clicking and then press E to extrude a bone for the head. Name the bones - Neck and Head.

Blender-Facial-Animation-Setup-PT2_a03

Step 4

Press TAB to exit Edit mode. Select the Head, hold Shift and select the Armature. Then press Control-P and choose With Automatic Weights to assign the object to the armature.

Blender-Facial-Animation-Setup-PT2_a04

Step 5

Select only the Armature. Press Control-TAB to get into Pose mode and select the Head bone. (The selected bone will be highlighted in light blue.) Now select the Head (object) and press Control-Tab to enter into Weight Paint mode.

Blender-Facial-Animation-Setup-PT2_a05

Step 6

Now assign the head vertices to the Head bone by just painting them. Set the Weight value to 1.00 and in the Options panel, tick on X Mirror. This will allow us to paint symmetrically.

Blender-Facial-Animation-Setup-PT2_a06

Paint the head with full weight, so it's assigned to the selected (Head) bone.

Blender-Facial-Animation-Setup-PT2_a06b

Remove the neck vertices by painting them with 0.0 Weight, as we don't want the head bone to effect the neck vertices.

Blender-Facial-Animation-Setup-PT2_a06c

Step 7

Now select the Neck bone. Weight paint the model appropriately to assign only the neck area to the bone.

Blender-Facial-Animation-Setup-PT2_a07

Creating Driver Bones

Step 1

Now we will create the bones which will trigger the shape keys. The position of the bones doesn't matter, some people like to have a separate control, while others like to have it on the face itself. We will cover both cases in this tutorial.

Press Control-TAB to exit Weight Paint mode. And with the Armature selected, press TAB to enter into Edit mode. Press Shift-A to add new bone, and then select the new bone (by Right Clicking.) Place it (using the G key) above the eyebrow, and Scale it down using the S key.

Blender-Facial-Animation-Setup-PT2_d01

Step 2

In the Bone properties, rename this new bone to anything you like, for example EB-raised.l (l for left). Uncheck the Deform option as we don't want this bone to deform the mesh.

Blender-Facial-Animation-Setup-PT2_d02

You can also change the display type for the bones. In the Armature properties and under the Display panel, click on the Stick Button.

Blender-Facial-Animation-Setup-PT2_d02b

Step 3

Select the new bone and press Shift-D to duplicate it. This way the duplicated bone will have the properties of the original one (like the size and the deform option unchecked.) If you prefer to create a new bone, then make sure that the Deform option is unchecked. Name this new bone EB-corner.l or anything else, but use a relevant name.

Blender-Facial-Animation-Setup-PT2_d03

Step 4

Select the new bone and press Shift-D to make another duplicate. Name this RB-last.l (or anything else) but use a .l extension. Now place it over the outer corner of the eyebrow. This will trigger the EB-corner shape keys.

Blender-Facial-Animation-Setup-PT2_d04

Step 5

Similarly add two more bones - one to trigger the shape key for the upper eye lid, and another for the bottom eyelid. Place them appropriately and name them EL-upper.l and EL-lower.l.

Blender-Facial-Animation-Setup-PT2_d05

Step 6

Create (or duplicate) another one for the nose Shape key. Name this nose.l.

Blender-Facial-Animation-Setup-PT2_d06

Step 7

Moving downwards, add another bone to trigger the upper lip deformation (or disgust) shape key. And a second one to control the smile and frown.

Blender-Facial-Animation-Setup-PT2_d07

Step 8

If you created a shape key for a cheek puff, then create another bone for it and place it on the cheek. Name it cheek.l

Blender-Facial-Animation-Setup-PT2_d08

Step 9

Add one for the chin as well. This will trigger many shape keys- Jaw open (aa), jaw right, and jaw left. Since this one is in the center, there is no need to add an extension like .l or .r.

Blender-Facial-Animation-Setup-PT2_d09

Step 10

Now we will create bones to drive the phonemes shape keys. I created four, so I will add four bones. Name them - Mouth-F, Mouth-O, Mouth-U, Mouth-EE and Mouth-MPB. Lets place them away from the face for now.

Blender-Facial-Animation-Setup-PT2_d10

Step 11

Lets also add bones for the eyeballs. Press TAB to exit Edit mode. Select the eyeballs by Right Clicking and then press TAB to enter into Edit mode. Hover over the left eye and press L. This will select all the connecting vertices.

Blender-Facial-Animation-Setup-PT2_d11

Step 12

Press Shift-S and select Cursor to selected. This will move the 3D cursor into the center of the eyeball.

Blender-Facial-Animation-Setup-PT2_d12

Step 13

Press TAB again to exit Edit mode. Select the Armature and press TAB to edit. Then press Shift-A to add a bone. The new bone will be created at the 3D cursor's position. (We need the eye bone to be exactly in the center of the ball.) Name this new bone - eyeball.l and make sure that the Deform option is checked, as we want to deform the eyeball with this bone.

Blender-Facial-Animation-Setup-PT2_d13
Blender-Facial-Animation-Setup-PT2_d13b

Step 14

Select the tip of the bone and press G to move it down, pointing outwards. (Hold Control to snap while moving.)

Blender-Facial-Animation-Setup-PT2_d14

Step 15

Select the new bone and press Shift-D to make a duplicate. Move this one away from the face, but keep it exactly in-line with the eyeball bone. (Hold Control to snap while moving.)

Blender-Facial-Animation-Setup-PT2_d15

Uncheck the Deform option, as we don't want this bone to affect the vertices of the face or the eyeballs.

Blender-Facial-Animation-Setup-PT2_d15b

Step 16

Also check the placement of the bones in the side view. Press 3 on the numpad to to get into a side view, and then select the individual bones and press G to move them. Place them just outside of the head with a little distance in between them and the mesh.

Blender-Facial-Animation-Setup-PT2_d16a
Blender-Facial-Animation-Setup-PT2_d16b

Step 17

Select the Head bone, press Shift-S and select Cursor to Selected. This will move the 3D cursor to the center of the face.

Blender-Facial-Animation-Setup-PT2_d17

Step 18

Press A to deselect any bone. With the B key, drag select only the bones for the left side (all bones with the .l extension), including eyeball.l and eyetrack.l, for which we need a mirror copy on the right side.

Blender-Facial-Animation-Setup-PT2_d18

Step 19

Press the . (period) key on the keyboard to make the 3D cursor the center pivot for rotation and scaling.

Blender-Facial-Animation-Setup-PT2_d19

With the bones selected, press Shift-D to make duplicates, Left Click without moving the mouse to confirm the same position. The duplicate bones will share the same position with the original ones.

Blender-Facial-Animation-Setup-PT2_d19b

Step 20

With the new bones selected, press Control-M and then X to make a mirror copy along the X axis. The 3D cursor will serve as the center point.

Blender-Facial-Animation-Setup-PT2_d20

Step 21

The new bones will have jumbled extensions but we want each one to have .r extension. So with the new bones selected, click on the Armature menu in the footer of the 3D window, and then select Flip Names. This will add a .r extension to the mirrored bones.

Blender-Facial-Animation-Setup-PT2_d21

Step 22

Press B to drag select all the controller bones. Hold Shift and then Right Click on the Head bone to select it last. Press Control-P to make it the parent bone and select Keep Offset, so that the position of the bones is kept the same. This way all the facial controller bones are now children of the head bone, so they will follow the movement of the head bone.

Blender-Facial-Animation-Setup-PT2_d22
Blender-Facial-Animation-Setup-PT2_d22b

Press TAB to get out of Edit mode, and press N to bring up the Properties shelf. Under the Display panel, uncheck Relationship Lines. This will hide the dotted lines representing the parent/ child relationship between the objects.

Blender-Facial-Animation-Setup-PT2_d22c

Assigning a Custom Shape to the Bones

Step 1

Too many of the bones on the face look the same, so lets give them a custom shape. This will not affect the functionality, but it will give us a nice and neat graphical interface. But to do so, we need to create an object first. So in Object mode, create an object using any shape you want (I like to use a simple diamond shaped plane.) And then name it Shape, or anything else you want.

Blender-Facial-Animation-Setup-PT2_c01

Step 2

In Pose mode, select the bone. Click on the Bone properties and in the Display panel, select your new object using the Custom Shape option.

Blender-Facial-Animation-Setup-PT2_c02

Step 3

Sometimes the bone may appear too small or too large, or the rotation might be off. To fine tune the look, edit the object not the bone.

Blender-Facial-Animation-Setup-PT2_c03

Step 4

You can also turn on the Wireframe option to achieve a more minimized look. Assign the custom shape to all driver bones.

Blender-Facial-Animation-Setup-PT2_c04

Step 5

Similarly, assign custom shapes to the driver bones, eye track bones and the Head bone. Then turn off X-Ray in the Display options to reduce the clutter.

Blender-Facial-Animation-Setup-PT2_c05
Blender-Facial-Animation-Setup-PT2_c05b

You can also move all the objects you created for the custom shapes to another layer. Press B and drag select all objects, then Press M and select the second block to move them onto a second layer. Switch back to layer one by pressing 1 on the keyboard.

Blender-Facial-Animation-Setup-PT2_c05c

Setting up Shape key Drivers

Step 1

Split the window into two and select the Graph Editor for any one view.

Blender-Facial-Animation-Setup-PT2_sd01

Switch to Drivers Mode.

Blender-Facial-Animation-Setup-PT2_sd01b

Step 2

In Object mode, select the Head. Then select the first shape key - EB-angry.l, Right Click on the Value slider and select Add Driver.

Blender-Facial-Animation-Setup-PT2_sd02

Step 3

In the Drivers window:

  1. Select the Shape Key Value Driver.
  2. Press N to bring up the Properties shelf. In the Drivers panel, select Averaged Value for the Type.
  3. In the Object/Bone field, select Armature.
  4. And in the Bone field, select the bone which you want to assign the shape key to. Here we want the shape key for angry eye brows, so I selected the eye brow tip bone.
  5. Select Y Location for Type, as we want to trigger the shape key when the bone is moved in a Y location, i.e. vertically.
  6. In the Space field, select Local Space.
Blender-Facial-Animation-Setup-PT2_sd03

Step 4

Again in the Drivers window:

  1. Add a new Modifier, and select Generator.
  2. Type -10 into the lower box. Since we want the shape key to be triggered when the bone is moved downwards, the value we use is negative. You can increase or decrease this value according to your liking.
Blender-Facial-Animation-Setup-PT2_sd04a

Test it by moving the bone in Pose Mode. The shape key should be triggered when the bone is moved downwards. If the bone needs to be moved too much then you can increase the value to -20.

Blender-Facial-Animation-Setup-PT2_sd04b

Step 5

Similarly, select the next shape key and add a Driver. Right Click on the Value slider and select Add Driver.

Blender-Facial-Animation-Setup-PT2_sd05

Step 6

  1. Select the shape key Value Driver.
  2. Press N to bring up the Properties shelf. In the Drivers panel, Select Averaged Value for the Type.
  3. In the Object/Bone field select Armature and choose the appropriate bone. Here I have to selected EB-angry.r
  4. Select Y Location for the Type, as we want to trigger the shape key when the bone is moved in a Y location, i.e. vertically.
  5. In the Space field, select Local Space.
  6. Add a new Modifier, and select Generator.
  7. Type -10 in for the Coefficient value. We use a negative value because the bone is to be moved downward on the Y axis to trigger the shape key.
Blender-Facial-Animation-Setup-PT2_sd06

Test by moving the bone in Pose mode. The shape key should be triggered when the bone is moved downwards. If the bone needs to be moved too much, increase the value to -20.

Blender-Facial-Animation-Setup-PT2_sd06b

Step 6

To save time we can copy a driver setting and paste it onto a new shape key, instead of repeating the steps. We can then change only the name of the bone, transformation type and the modifier settings accordingly. To copy a driver, hover the mouse over the Value of a shape key which already has a driver (indicated with purple). Right Click and select Copy Driver.

Blender-Facial-Animation-Setup-PT2_sd07

Select the next shape key and Right Click on its Value slider. Then click on Paste Driver.

Blender-Facial-Animation-Setup-PT2_sd07b

Step 8

Go ahead and paste the driver onto all the shape keys. We don't have to copy it again, so just keep on pasting the driver into the value. You can also Right Click on the 0.00 Value right next to the shape key in the list, to add, copy and paste the driver.

Blender-Facial-Animation-Setup-PT2_sd08a

Paste the Driver for all shape keys.

Blender-Facial-Animation-Setup-PT2_sd08b

Step 9

Assign the Driver values.

  1. Select the next driver in the Drivers window.
  2. Assign it to appropriate bone. In this case I need to assign it to the corner eye brow bone, to which we also assigned the angry shape key driver. This one bone will trigger two shape keys - EB-angry.l when moved downwards, and EB-sad.l when moved upwards.
  3. Since we want to move the bone vertically, we will select Y location in Local space.
  4. In the Generator Modifier, type 10 (positive) into the value for Coefficient. We need to trigger the shape key when the bone is moved upwards, therefore the value here is +10 and not -10.
  5. Finally press Update Dependencies.
Blender-Facial-Animation-Setup-PT2_sd09

Test by moving the bone up and down in Pose mode.

Blender-Facial-Animation-Setup-PT2_sd09b

Step 10

Similarly update all the drivers with their corresponding bones, type and modifier values. And finally press Update Dependencies. Things to be kept in mind are:

  1. Select the appropriate bone for which you want to trigger that particular shape key. One bone can be assigned to many drivers. For example, here I have assigned the chin bone to the jawright, jawleft, and Mouth-AA shape keys.
  2. Choose the correct Type according to the movement of the bone. If a shape key should be triggered when moving the bone vertically, then select Y location. If you want to trigger a shape key when the bone moves horizontally, select X location. Here I have used X Location for the jaw-left driver because I want it to be triggered when I move the chin bone horizontally (right) along the X axis. You can also experiment with Rotation and Scale types. For the Mouth-AA driver I have selected Y Location, because I want it to be triggered when the bone is moved up and down vertically along the Y axis.
  3. In the Modifier value, choose a positive value if you want to move right or up, and choose a negative value if the bone needs to be moved left or down.
Blender-Facial-Animation-Setup-PT2_sd10

Again test the bones in Pose mode. Press Alt-G to reset the location of the bones and Alt-R to reset the rotation.

Blender-Facial-Animation-Setup-PT2_sd10b

Eye Bone Settings

Step 1

In Pose mode, select the left eye bone (here it's named eyeball.l), and turn on X-Ray if it is not visible. In the Properties panel, click on the Bone Constraint button.

Blender-Facial-Animation-Setup-PT2_e01a

Click on Add Bone Constraint and select Track To.

Blender-Facial-Animation-Setup-PT2_e01b

Step 2

In the Target field select the object you want the eye bone to track to (here we have Armature.) And in the Bone field, select the eyetrack.l bone we created. Now the eye bone is tracked to the eye track bone.

Blender-Facial-Animation-Setup-PT2_e02a

Move the eyetrack.l bone and you will see that eyebone.l is tracking wherever the bone is moved. (The white line in the image below is superimposed.)

Blender-Facial-Animation-Setup-PT2_e02b

Step 3

Similarly, do it for the other eye bone.

Blender-Facial-Animation-Setup-PT2_e03

Step 4

Now select the eyeballs. We made them a separate object in the previous part of the tutorial, and now we'll further make each ball a separate object. With the eyeballs selected, press TAB to enter into Edit mode.

Blender-Facial-Animation-Setup-PT2_e04a

Step 5

Select one eyeball, press P and click on Selection to make the selected vertices a separate object.

Blender-Facial-Animation-Setup-PT2_e05

Step 6

Select the left eyeball and then hold Shift to select the left eye bone (eyebone.l). The armature must be in the Pose mode. Press Control-P and select Bone to make the bone a parent. Now the eyeball is assigned to the bone.

Blender-Facial-Animation-Setup-PT2_e06

Similarly, parent the right eye bone to the right eyeball.

Blender-Facial-Animation-Setup-PT2_e06b

Now we can see that the eyeballs follow the tracking bones.

Blender-Facial-Animation-Setup-PT2_e06c

Step 7

Lets create one more parent bone which can govern both of the tracking bones, so that we only need to move one and the rest will follow. With the Armature selected, press TAB to enter Edit mode. Click at the center of Armature to move the 3D cursor to the center. In a side view click near the tracking bone.

Blender-Facial-Animation-Setup-PT2_e07

Press Shift-A to add a new bone. Make sure it's in the center of the tracking bones, and name it eyecontrol.

Blender-Facial-Animation-Setup-PT2_e07b

Step 8

Select the two bones first and then select the new eyecontrol bone. Press Control-P to make it the parent bone, and select keep Offset to keep the current position.

Blender-Facial-Animation-Setup-PT2_e08

Now select the eyecontrol bone and then select the Head bone. Press Control P to make the head the parent. Select Keep Offset.

Blender-Facial-Animation-Setup-PT2_e08b

Press Control-TAB to enter into Pose mode. Now by moving only the eyecontrol bone we can move both eye track bones. And when you need to tweak the eyes individually, you can still move them using the individual eye track bones.

Blender-Facial-Animation-Setup-PT2_e08c

Step 9

Create a new object and give the bone a custom shape.

Blender-Facial-Animation-Setup-PT2_e09

Enhancements

Step 1

Switch to Object mode and add a new Plane, then delete two of its vertices to make a line.

Blender-Facial-Animation-Setup-PT2_b01a

Place the object near the phonemes controllers (in Object mode) and duplicate the lines (in Edit mode) as shown in the next image. You can also add text beside each of them.

Blender-Facial-Animation-Setup-PT2_b01

Step 2

Set the Head bone as their parent. Select the new object, the text objects and then the Head bone, press Control-P and select Bone.

Blender-Facial-Animation-Setup-PT2_b01b

Conclusion

Our basic face rig is now ready.

Blender-Facial-Animation-Setup-PT2_b02

Advertisement