Blend Shapes and Morph Targets

Watch a close-up of a character talking and you are watching a mesh change shape dozens of times a second: the corners of the mouth lift into a smile, an eyebrow flicks up in surprise, an eyelid drops for a blink. None of that is a skeleton swinging bones around — a face has no bones to speak of. It is done by blend shapes (the same idea goes by morph targets in game engines and shape keys in Blender): a small library of pre-sculpted faces that the rig fades between. This is the backbone of facial animation, and it is a beautifully simple idea built on one operation you already know — a weighted average.

This page is part of the rigging strand of the Computer Animation course, and it sits alongside its natural counterpart, skeletal skinning.

Sculpt a few faces, then fade between them

Start with the neutral mesh — the character at rest, mouth relaxed, no expression. Call its vertex positions \mathbf{b}_0. Now sculpt some targets, each a full copy of the mesh pushed into one expression: \mathbf{b}_1 a broad smile, \mathbf{b}_2 a brow-raise, \mathbf{b}_3 a blink. Crucially, every target has the exact same vertices in the exact same order as the neutral — the artist only moves vertices, never adds, deletes, or reorders them.

Because the meshes line up vertex-for-vertex, the difference \mathbf{b}_i - \mathbf{b}_0 is a bundle of little arrows, one per vertex, saying "to reach expression i, shove this vertex that way". These are the offset (or delta) vectors. Fade a target in with a weight w_i and add the offsets on top of the neutral:

That is the whole engine. A rig might expose fifty or a hundred of these weights as sliders (or drive them from a performance-capture solver reading an actor's face), and the pose you see is nothing but neutral-plus-a-pile-of-scaled-offsets.

See it move

Below is a cartoon face wired with two blend shapes: a smile (weight w_1, lifting the mouth corners) and a brow-raise (weight w_2, hoisting the eyebrows into surprise). The dots are vertices; drag either slider and watch each vertex glide in a straight line from its neutral spot toward its target spot. At w=0 a shape contributes nothing; at w=1 it is fully expressed; in between you get a partial expression — a half-smile, a hint of a raised brow.

Notice the two shapes don't fight: the smile only touches the mouth vertices and the brow-raise only the eyebrow vertices, so you can dial in any mix and the face just... does both. That independence is exactly the commuting property — but, as the next section shows, it politely holds only while the shapes stay out of each other's way.

Worked example: blending one vertex

Let us track a single vertex — the right corner of the mouth — through two targets. In the neutral pose it sits at

\mathbf{b}_0 = (2.0,\,-1.0).

A smile target lifts and spreads that corner to (2.3,\,-0.1), so its offset is \mathbf{d}_1 = \mathbf{b}_1 - \mathbf{b}_0 = (0.3,\,0.9). A cheek-raise target (a squint that puffs the cheek) also nudges the same corner up, to (2.1,\,-0.3), giving \mathbf{d}_2 = (0.1,\,0.7). Now blend:

\mathbf{v} = \mathbf{b}_0 + w_1\,\mathbf{d}_1 + w_2\,\mathbf{d}_2.

With a gentle half-smile and no squint, w_1 = 0.5,\, w_2 = 0:

\mathbf{v} = (2.0,-1.0) + 0.5\,(0.3,0.9) = (2.15,\,-0.55).

Fine. But crank both to full, w_1 = 1,\, w_2 = 1 — a big smiling squint:

\mathbf{v} = (2.0,-1.0) + (0.3,0.9) + (0.1,0.7) = (2.4,\,0.6).

The corner has jumped from y=-1.0 all the way to y=+0.6 — up near the eyes. Both targets raised the corner, and the additive blend counted the lift twice: the lip punches straight through the cheek. Anatomically the corner should land around y=-0.1, not +0.6. The fix is a corrective shape (below); the figure shows the naive sum overshooting.

Correctives: patching the combinations linear blending gets wrong

Linear blending assumes the offsets simply add. Reality is more stubborn: skin doesn't stretch linearly, and two expressions that each look great can, together, intersect, bulge, or collapse — think a wide smile plus a dropped jaw-open, whose lips overlap and clip through the teeth. The remedy is a corrective (or combination) shape: an extra target that carries only the difference between the ugly additive result and a face the artist actually sculpted for that combination.

The corrective is driven by the product of the two weights, w_1 w_2, so it switches on only when both shapes are active and vanishes when either is off:

\mathbf{v} = \mathbf{b}_0 + w_1\mathbf{d}_1 + w_2\mathbf{d}_2 + \underbrace{w_1 w_2\,\mathbf{c}_{12}}_{\text{corrective}}.

For our mouth corner we want the full-smile-full-squint result to read (2.15, -0.1) instead of (2.4, 0.6), so the corrective offset is the gap, \mathbf{c}_{12} = (-0.25,\,-0.7), which only bites at w_1 w_2 = 1 and fades away as either slider drops. Correctives are how production face rigs stay clean across the combinatorial explosion of expressions — and why a heavily rigged face can have more corrective shapes than base ones.

Two more tricks lean on the same non-linear patching: in-between targets (a shape that fires at, say, w=0.5 to give a mouth a non-linear path as it opens, instead of a dull straight-line morph), and stacked combination shapes for three-way interactions. All of them are just more offsets, gated by cleverer weight expressions.

Blend shapes vs skinning: two tools, one rig

Blend shapes are not the only way to deform a mesh — the other workhorse is skinning, where a skeleton of bones drags the vertices around. It helps to know when to reach for which:

Blend shapesSkinning
Driven bysculpted target meshes + weightsa skeleton of bones + transforms
Deformationarbitrary per-vertex offsetsrigid-ish, follows the bones
Best forfaces, subtle organic shapesbodies, limbs, anything jointed
Storagea full offset per target vertexa few weights per vertex

In practice you don't choose — most rigs combine both. A jaw bone (skinning) swings the chin open while blend shapes shape the lips, cheeks, and brow on top. Bodies lean on skinning with a few correctives; faces lean on blend shapes with a couple of bones. The two layers stack: skin the mesh with the skeleton, then add the blend-shape offsets.

Behind an animoji (or any performance-capture facial rig) sits a solver. The device tracks your face and estimates a set of expression strengths — often the ~50 blendshape coefficients of a standard face model (brow-up, jaw-open, mouth-smile-left, and so on), each a number in [0,1]. Those numbers are piped straight into the blend-shape weights w_i of the character's rig, whose targets were sculpted to match the same expression names. Your grin sets w_{\text{smile}} \approx 1, the character grins. Because the whole thing is just a weighted sum of offsets, it runs comfortably at 60 frames a second on a phone — the heavy lifting is the tracking, not the deforming.

Blend shapes are stored as per-vertex offsets, matched up strictly by vertex index: offset number 4173 lands on vertex number 4173. So every target must have the same vertex count and the same vertex ordering as the neutral — the artist may only move vertices, never add, delete, or re-order them. If someone retopologises a target (rebuilds its mesh for a cleaner edge flow), the vertex numbering is scrambled: vertex 4173 is now somewhere else entirely, so \mathbf{b}_i - \mathbf{b}_0 becomes garbage and the face explodes into confetti. Sculpt every target by editing a copy of the neutral, and if you must retopologise, do it before making any targets and rebuild them all.

The second trap is the one from the worked example: naively adding overlapping shapes double-counts. If two targets both push the same vertices the same way, turning both on fully over-deforms. It is not a bug in the maths — linear blending is doing exactly what you asked — it is a signal that the combination needs a corrective shape to subtract the excess.