A whole new world opens up with chapter 5 of Tony Mullen’s book. It begins with Shape Keys. For those not familiar with these, they are basically vertex animation key frames. The main difference between vertex animation and skeletal animation is, with vertex animation the positional data for each vertex is recorded for each key frame. With skeletal animation, only the bones are key framed, and “vertex weighting” tells an algorithm which vertices to move, corresponding to bones in the armature…
Not only is this more memory efficient, it is ultimately simpler for the animator; this is true for any model with more than a couple of dozen vertices, in most circumstances. Skeletal animations are also more efficient to store on disk, as there are generally dramatically fewer bones in an armature than there are vertices in a character model, and thus fewer items to keep track of, represented by Location, Rotation, and Scale, for each frame of the animation.
Shape Keys
Shape keys are essentially vertex keys. The power of shape keys is at least tri-fold: 1) they can be combined into single animations; 2) they can be driven by other objects or bones; 3) they can be interpolated beyond their original definition. Concerning item 2, what is meant by “driven” is that the position or rotation of another object or bone can be used to determine how dramatically a shape key is applied, or interpolated.
For instance, I can have two shape keys. One key is the “basis” shape, in this example the face of a model with eyes open. The next key is the same, except that I have remodeled the eyes to be closed. I might name this shape key “EyesClosed” as per the book’s example. I now have two keys that equate to “eyes open” and “eyes closed.” As with all animation, Blender interpolates between the two, producing motion between the key frames.
This is done using IPOs, or interpolation curves. Most of you have seen the IPO Curve Editor in the list of Blender’s window choices. While this window might be enigmatic to anyone who isn’t familiar with animation in Blender, it is extremely powerful for controlling motion of all types. Note that the Action Editor is primarily used as the animation editor for all skeletal objects, and the IPO Curve Editor is primarily used for other types of objects, including Shape Keys (although you can typically link an IPO to an Action).
Shape keys are used to control many of the facial expressions of Captain Blender, and the first several pages of chapter 5 are spent providing a welcome introduction to these items, with a brief introduction to the IPO Curve Editor, which is covered in detail in chapter 6.
Setting up all of the facial expression shapes took a while, but it was a rewarding process. I had considered shortcutting this process, since I understood the mechanics of setting these up, far before I went through every shape; but ultimately I’m glad I finished all of the expressions. It was encouraging and inspiring to see this static model begin to come alive with expressions and phonemes.
Using bones for facial rigging
Next came some additional rigging. While you can theoretically rig an entire face with bones, you get a level of control with Shape Keys that is difficult to obtain strictly with the armature. However there are some items that are best left to skeletal rigging: the eyes and the tongue.
One of the reasons for rigging the eyes is that you can set up IK solvers for eye tracking. Instead of having to animate the eyes independently, the eye bones can be IK targeted to a single bone. Wherever the “gaze” bone goes, the eyes follow. The eyelids can also be set up to track the eye movement vertically. If you take notice, when a person looks up or down, their eyelids adjust to follow the iris. Chapter 5 deals with setting this up automatically in the rig.
It is here that I had some trouble. Chapter 5 instructed me to have the “eye” bones target a single “gaze” bone using IK. This worked brilliantly. However, the bone that controls the eyelids’ up and down movement needed to be rotation constrained to the eye bone. The Rotation Constraint allows for limiting the axis of rotation, so you can have a single axis “track” the target bone. This is ideal for the eyelids because you only need them to move up and down, you don’t want them to move on any other axis.
The problem occurs because a rotation constrained bone doesn’t follow an IK bone if it’s expected to use the target bone’s local coordinates, or at least it doesn’t seem to follow it correctly, as was instructed in the book. The IK constraint modifies the bone’s rotation, apparently without actually changing the rotation value. If you want to see this for yourself, add an IK solver to a single bone. Add another bone as the IK bone’s “target.” Select the IK bone and press N to see the transform data. Move the target bone and notice that the IK bone’s rotation values don’t change. You can grab the IK bone and try to rotate it. This will change the numbers but will not actually rotate the bone very well – because it is IK constrained.
Anyway, the solution was to add another IK Solver to the eyelid bone, and lock its Y and Z rotations in the “Selected Bone” panel. These controls are only available for bones that have IK applied. In the end, I spent about an hour trying to figure out what I was doing wrong. It’s possible, even likely, that my problem was caused by missing something in the text. I was able to fix it another way, and it increased my understanding of how things work. This is why learning Blender can only truly happen by using Blender.
Shape Key Drivers and Custom Bone Shapes
It was fun setting up bones to drive the shape keys for facial expressions. The process involved placing bones at key places around the face, and using them as drivers for shape key interpolation. This creates the effect that you’re “dragging” the face expressions around, pushing and pulling the face like so much putty.
One of the cool parts of this process was developing custom bone shapes. Blender allows any bone to be rendered as any other shape, so it is possible to model an object and use that object to represent the bone, in addition to the bone rendering options provided by default: octahedron, stick, b-bone, and envelope.
So each facial shape was given a custom bone to drive it. Grabbing and moving (or rotating) one of these bones signals the shape key to deform. At this point, Captain Blender’s face was puppet-like, allowing apparent simplification in the animation process. I’ll know for sure when I get there.

I ran into a “user error” problem while working with facial control bones that rotate. I had turned on the “Move Object Centers Only” button next to the pivot mode selector. This keeps an object’s data from transforming along with the object itself. It’s handy when you want to rotate or scale objects to affect their positions, but you don’t want to affect the mesh; or when you want to move some bones apart, but don’t want to affect their sizes. With more than one object selected, the effects are obvious. However with one object selected, it will simply appear that it refuses to rotate. If you have a troubleshooting checklist for these types of things, add “check Move Object Centers Only button” under the heading, “object or bone will not rotate.”
Shape Keys as Mesh Deformation Aids
Chapter 5 finishes up with a quick example on how to use Shape Keys to fix bone/mesh deformation problems. This is a very powerful method. Obtaining perfect weight painting is difficult, if not impossible. Undoubtedly there are always problem areas that deform terribly at extreme bone angles. This is fixed by using shape keys. Mesh areas can be edited as Shape Keys which can be driven by the bones that deform them.
For instance, shoulders are often difficult to weight paint, and in my model the shoulder area pinched at the top when the arm was raised all the way up. This was also the book’s example. I might have been able to spend some additional time weight painting to reduce this, but most likely I would have been left with imperfect deformations no matter what I did. I was able to add a Shape Key and edit the mesh directly to fix the shoulder area. The bicep bone was used to drive the key and was activated as the arm raised up.
The only difficulty I had with this area was that the Bicep bone is part of an IK chain, and therefore refuses to divulge its local rotation coordinates in the Transform Properties window. This forced me into a trial-and-error approach to figure out the proper bone angles to begin and end the Shape Key driver. I made this easier on myself by exaggerating the key’s deformations by about 4x in order to see the effects. I then tuned the shape key frames around this, and restored the proper intensity after I had the angles figured out.
Epilogue
This chapter was fantastic. Although long (like all the other chapters so far) it was paced well and richly rewarding to work through. I found a complex subject begin to make sense as I worked my way through. I found myself intuitively able to do what the book suggested, and I found myself working ahead of the instruction. This is a testament to the effectiveness of Tony Mullen’s instructional approach in this chapter, and the culmination of much effort on my part to grasp the many concepts presented so far. Persistence is required and rewarded.
As a final note on shape keys: In the IPO window, when you add a driver to the Shape, the horizontal (X) axis that used to represent frames of animation now represent the driver bone’s transformations. If you’re using a bone’s rotation as the driver parameter, the X axis will change to show degrees of rotation; and if you’re using a bone’s location, the axis will represent units of 3D space.
I can’t say enough how enjoyable this chapter was for me. Although it was a lot of work, it was immensely satisfying, and I’m looking forward to the rest of the material. If this subject interests you in the least, you’ll want to check out this book for yourself.
LINKS:
This entry was posted on Thursday, November 15th, 2007 at 4:35 pm and is filed under Products. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.




Leave a Reply
You must be logged in to post a comment.