Computer Graphics · Animation
Linear Blend Skinning and the Candy-Wrapper Collapse
Why averaging joint matrices produces volume loss and pinching on twisted limbs, how dual quaternions replace the average, and why dual quaternion skinning is not always the better choice.
A vertex influenced by several joints receives, in the common formulation, a weighted average of the matrices that move it. The formulation is one line of shader arithmetic per influence and it produces the deformations seen in most real-time character work. It also has a defect that no amount of weight painting removes: when two joint transforms differ by a large rotation, the weighted average of matrices is not a rotation, and a vertex between the joints collapses inward. The artifact has a name in the trade, and understanding it is the fastest route to knowing when the cheaper approximation is acceptable and when it is not.
The blend is an average of matrices, not of motions
The formula is
$$p’ = \sum_{i=1}^{n} w_i , M_i , p, \qquad \sum_i w_i = 1,$$
where each $M_i$ is a palette entry from the skinning palette and $p$ is the vertex in mesh space. Because the weights sum to one, the result is a convex combination of the transformed positions. For a vertex bound entirely to one joint, with one weight equal to one, the arithmetic reduces to a matrix-vector multiply and no artifact is possible. Artifacts live in the transition region where two or more weights are substantially nonzero.
The trouble is that the weighted sum of two rotation matrices is not a rotation matrix. Take two rotations about the same axis, one by 0 degrees and one by $\theta$. Their weights are $1-t$ and $t$, so the averaged matrix has a rotation cosine of $(1-t) + t\cos\theta$ and the off-diagonal term is $t\sin\theta$. The scale of that matrix is $\sqrt{((1-t) + t\cos\theta)^2 + (t\sin\theta)^2}$, which equals one only at $t=0$ and $t=1$. At $t = 1/2$ it is $\cos(\theta/2)$, so a vertex exactly between two joints that differ by 90 degrees gets a matrix whose linear part shrinks by about 0.71, and one that differs by 180 degrees shrinks to zero. Applied to a vertex offset from the joint origin, the shrink pulls it toward the axis of the average rotation. That is the pinching.
The 180-degree case is the classic demonstration: rotate a forearm 180 degrees relative to the upper arm and the vertices at the elbow, weighted half to each, map to the average of two positions that are on opposite sides of the joint. The average lands on the joint axis, the mesh folds flat, and the limb looks like a twisted candy wrapper. The name is descriptive: the surface between the two joints spirals through the collapse, and the geometry that should be a bulging tube becomes a pinched waist.
Volume loss is not a rounding error and it is not local to a single vertex. Since neighbouring vertices in the transition band have slightly different weights, they shrink by slightly different amounts and toward slightly different axes. The band develops a crease along its length, and specular highlights break at the crease because the interpolated normals no longer correspond to a smooth surface.
Why the cheap form survives anyway
The average-of-matrices formulation has three properties that are hard to replace. It is linear in the palette entries, so a vertex with four influences costs four matrix-vector products and nothing else. It maps any local frame consistently: normals transform by the same matrix, tangents too, so a single matrix per vertex suffices and no separate normal transform is needed. And the weights are directly paintable: an artist increases a weight and the vertex moves toward that joint’s transform, monotonically and predictably.
The last property matters more than it sounds. Any nonlinear blend method destroys monotonicity in the weights, which means an artist’s brush no longer does what the brush preview shows. That is the practical reason most engines ship the linear form as the default and offer the alternative as a per-mesh option, rather than the reverse.
There is also a large class of deformation where the artifact never appears. A vertex whose influences share a rotation axis and differ only by small angles sees a shrink factor close to one; a character with modest joint rotations, under roughly 60 degrees between adjacent joints on a deformation chain, loses under 15 percent of scale in the worst case, and the loss is spread over a band rather than concentrated. Squash and stretch rigs, cloth-like secondary motion, and most locomotion cycles fall in that range. The candy-wrapper artifact is specifically the signature of large rotations on a limb cross-section, which happens in twisting forearms, necks turned past the shoulder line, and shoulders raised far overhead.
Instead of averaging matrices, blend the rigid motion
Dual quaternion skinning replaces the matrix average with an average of rigid motions expressed in a different algebra. A unit dual quaternion pairs a rotation quaternion $r$ with a translation encoded in a second quaternion $t$: $q = r + \varepsilon \frac{1}{2} t r$, where $\varepsilon^2 = 0$. Applying $q$ to a point rotates by $r$ and then translates, and the composition of two dual quaternions is again a dual quaternion, so rigid motions form a closed algebra with eight components and two constraints.
Blending two of them means averaging the eight components and renormalizing. The renormalization has two parts: normalize the real part to unit length, and remove the component of the dual part along the real part. If the blend is an average of two unit dual quaternions $q_0$ and $q_1$ with weights, the real part before normalization has length less than one, and the normalization restores it. The crucial difference from the matrix case is what happens between the extremes: the averaged dual quaternion still represents a rigid motion with unit scale, and its rotation angle interpolates along the short arc. A vertex between two joints rotating 180 degrees apart follows the rotation through the intermediate angles rather than collapsing to the axis, so the tube keeps its radius.
The construction is not free of subtleties. The dual quaternions being blended must be chosen on the same side of the double cover, exactly as rotation interpolation requires: a sign flip between two entries produces a blend whose real part nearly cancels, and the result is a wild rotation rather than a small correction. For the translation part, the standard remedy for the resulting artifact, where the blend of two distant translations pulls the vertex inward, is to multiply each joint’s dual quaternion by the vertex’s position expressed as a dual quaternion and blend those, then extract the position; that converts the translation blend into a blend of transformed points and avoids the shortening that afflicts direct blending of the dual parts. The gain in quality is real, and so is the per-vertex cost.
Scale and shear are exactly what the algebra cannot express
A unit dual quaternion is a rigid motion. It has no scale and no shear, by construction, and this is a limitation rather than a detail. A rig that leans on non-uniform scale, for a stretched limb or a flattened foot, cannot be expressed as a single dual quaternion. Real engines that support both methods handle this by factoring the palette entries into a rigid part and a scale part, blending the rigid part as dual quaternions and the scale part linearly, which is a reasonable approximation and reintroduces a smaller version of the original defect for the scaled component.
The same algebra limits what can be done with a joint whose matrix contains a reflection. A negative determinant has no dual quaternion representation at all, so a mirrored mesh bound through a mirrored joint must decompose its transform. This appears in practice with characters built by mirroring half a body, where the mirroring is baked into the geometry rather than the joint, which is fine, but breaks when a rig applies a mirroring transform to a joint and expects skinning to follow.
Supporting both methods also doubles the shader variants. The vertex path differs in the number of registers per influence: a compact dual quaternion is eight floats, and four influences cost 32 floats against 4×12=48 for a three-row matrix. That is a genuine saving in bandwidth, offset by the renormalization: the dual path needs a dot product, a reciprocal square root, and a dual-part projection per vertex, where the matrix path needs only multiplies and adds. On hardware where the palette is sampled from a texture, the two reads per influence for a dual quaternion are cheaper than the three for a compact matrix, which shifts the balance further.
The transition band is where the choices show
Weight distribution determines which formula a vertex uses, so the band where weights are mixed is the region that either method must handle well. A hard weight boundary, where a vertex’s weight jumps from 1 to 0 over a single edge loop, produces a faceted crease under the linear formula and a sharp corner under the dual formula; neither smooths it. Spreading the transition across enough edge loops to cover roughly the joint’s radius keeps the angular change per vertex small and reduces both artifacts. That is a geometry-density requirement rather than a shader one, and it is the reason a low-polygon character shows more skinning artifacts than a dense one with identical joints.
A vertex with influences from joints that are not adjacent in the hierarchy is the case both methods handle badly. The linear blend averages two matrices that may describe unrelated parts of the body, pulling the vertex into the interior; the dual blend averages two rigid motions and does the same more gracefully. Well-formed weights are spatially local, which is an authoring invariant that no runtime check enforces. The failure appears when weights are copied between meshes or when automatic weighting is applied to a mesh with disjoint parts near a joint, and it manifests as a stray polygon that stretches between two distant limbs.
Symmetry matters too. A mirrored vertex with mirrored weights produces a mirrored deformation under the linear formula, because the average commutes with the reflection. Under dual quaternions, a reflection does not commute with the blend, so mirrored halves can deform differently unless the sign convention is handled consistently across the mirror. That is not a reason to avoid the method; it is a reason to test both halves of a symmetric character rather than one.
The choice between the formulas is a per-mesh decision in most engines, and the surrounding pipeline reinforces that. Key reduction compresses the curves feeding the palette, and a compressed curve’s approximation error becomes a deformation error whose visibility depends on which blend the shader uses: the linear formula’s scale shrink amplifies the error near a twisted joint, while the dual formula does not. Compression and skinning are coupled through tolerances even though they are separate stages.
References
- Skinning with Dual Quaternions — Kavan, Collins, Zara and O Sullivan, I3D 2007
- Geometric Skinning with Approximate Dual Quaternion Blending — Kavan and Zara, ACM TOG 2008
- DirectX SDK: Dual Quaternion Skinning — Microsoft documentation