Algorithm Search⌘K

Conceptcore

Candy wrapper artifact

Also called collapsing joint artifact.

The loss of volume of linear blend skinning when joints twist or bend far, because averaging rotation matrices does not give a rotation.

The candy wrapper artifact is the collapse of the skin of linear blend skinning at a joint that twists. Near a forearm that turns by half a turn, the skin narrows to a thin neck, like the twisted ends of a wrapped sweet. The cause is exact and simple: LBS averages the skinning matrices of the joints, and the average of two rotation matrices is not a rotation, but a rotation times a shrink. The same cause makes a bent elbow lose volume on its inside, the collapsing elbow; the candy wrapper is the twist case of that collapse.

In plain words

Think of a long sweet in a paper wrapper, and twist one end while you hold the other. The paper in the middle narrows to a thin neck. Simple skinning does the same thing to a twisted arm. A point of the skin halfway between the elbow and the wrist is moved partly as the elbow says and partly as the wrist says, and the result is the midpoint of the two places. When the wrist turns far, those two places are on opposite sides of the arm, and their midpoint is near the middle of the arm. So the skin there falls inward. Better skinning methods blend the turns themselves, not the places, and keep the arm round.

The idea

LBS moves a vertex by v′=∑awaCavv' = \sum_a w_a C_a v, so the linear part of the map is the average Rˉ=∑awaRa\bar R = \sum_a w_a R_a of the rotations RaR_a of the joints. Take two joints that turn about the same axis xx: joint 0 by the angle 00 and joint 1 by θ\theta, with the weights 1−w1 - w and ww. In the plane orthogonal to the axis,

Rˉ=(1−w)(1001)+w(cos⁡θ−sin⁡θsin⁡θcos⁡θ)=(p−qqp),p=1−w+wcos⁡θ,  q=wsin⁡θ.\bar R = (1 - w) \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} + w \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix} = \begin{pmatrix} p & -q \\ q & p \end{pmatrix}, \quad p = 1 - w + w\cos\theta, \; q = w \sin\theta.

A matrix of this form is a scale by s=(p2+q2)1/2s = (p^2 + q^2)^{1/2} times a rotation by φ=atan2⁡(q,p)\varphi = \operatorname{atan2}(q, p), and

s2=1−2w(1−w)(1−cos⁡θ).s^2 = 1 - 2 w (1 - w) (1 - \cos\theta).

This is a proved property, with these consequences:

  • s<1s < 1 whenever 0<w<10 < w < 1 and θ\theta is not a multiple of 2π2\pi: a ring of the radius rr about the axis shrinks to the radius srs r. So the average is not a rotation.
  • At w=1/2w = 1/2, s=∣cos⁡(θ/2)∣s = \lvert\cos(\theta/2)\rvert and φ=θ/2\varphi = \theta/2: the ring turns by the right angle but shrinks, and at θ=π\theta = \pi it collapses onto the axis.
  • At θ=π\theta = \pi, s=∣1−2w∣s = \lvert 1 - 2w \rvert, and the ring does not turn at all for w<1/2w < 1/2 and is turned by π\pi for w>1/2w > 1/2: along the limb, where ww rises from 0 to 1, the skin narrows to a neck and flips there, which is the look of the wrapper.
  • At θ=2π\theta = 2\pi the two matrices are equal, and LBS gives no twist at all; a matrix cannot tell a full turn from none.

The same algebra holds for a bend: the rotations are about an axis through the joint, and the points in the plane of the bend move closer to the joint by the factor ss. The determinant of the blended linear part is s2s^2 here, so where the weights are nearly constant the local volume shrinks by that factor.

The methods that fix it blend rotations as rotations: dual quaternion skinning blends unit dual quaternions and normalizes, so each vertex moves rigidly; spherical blend skinning and optimized centers of rotation blend unit quaternions about a center. These keep the radius, but DQS and its kin can bulge at a bent joint, the opposite artifact.

Examples

The check value. With the weights 0.50.5 and 0.50.5, joint 0 at the identity and joint 1 turned by π\pi about xx, LBS maps (0,1,0)(0, 1, 0) to 0.5(0,1,0)+0.5(0,−1,0)=(0,0,0)0.5 (0, 1, 0) + 0.5 (0, -1, 0) = (0, 0, 0). Dual quaternion skinning with the same weights turns the vertex by π/2\pi/2, to (0,0,1)(0, 0, 1), and keeps the radius 1.

The radius against the twist. For a vertex at the radius 1 with the weight w=0.5w = 0.5:

twist θ\theta radius with LBS, ∣cos⁡(θ/2)∣\lvert\cos(\theta/2)\rvert radius with DQS
π/4\pi/4 0.923880.92388 11
π/2\pi/2 0.707110.70711 11
3π/43\pi/4 0.382680.38268 11
π\pi 00 11

Along the limb at a half turn. At θ=π\theta = \pi the radius is ∣1−2w∣\lvert 1 - 2w \rvert: 11 at w=0w = 0, 0.50.5 at w=0.25w = 0.25, 00 at w=0.5w = 0.5, 0.50.5 at w=0.75w = 0.75 and 11 at w=1w = 1.

The collapsing elbow. Put the elbow at (1,0,0)(1, 0, 0), bend joint 1 by π/2\pi/2 about zz through it, and take the vertex (1.5,0.2,0)(1.5, 0.2, 0) with the weights 0.50.5 and 0.50.5, at the distance 0.538520.53852 from the elbow. LBS puts it at (1.15,0.35,0)(1.15, 0.35, 0), at the distance 0.38079=0.53852cos⁡(π/4)0.38079 = 0.53852 \cos(\pi/4); DQS puts it at (1.21213,0.49497,0)(1.21213, 0.49497, 0), at the distance 0.538520.53852.

Where it is used

  • As the test of a skinning method. The twist of two joints by π\pi is the standard case; this site tests it on LBS, DQS, spherical blend skinning and CoR skinning.
  • In rigging practice. Riggers add twist joints along the forearm and the thigh, each taking a part of the twist, so that LBS blends only small angles, where ss is close to 1.
  • As the reason for corrections. Pose-space deformation and other corrective shapes add back the volume that LBS loses at the joints, and delta mush hides part of it (it does not keep the radius in a twist, as its page measures).
  • In the theory of rotation averages. The fix is a better average of rotations; the rotation group is not convex, and rotation averaging studies the means that stay in it.
  • In the character skinning problem, as the reason why no linear blend of the matrices can keep the volume in every pose.

References

  1. Ladislav Kavan, Part I, Direct skinning methods and deformation primitives, in Alec Jacobson, Zhigang Deng, Ladislav Kavan and J. P. Lewis, Skinning, Real-time Shape Deformation, SIGGRAPH 2014 course, Section 2 (linear blend skinning and the candy wrapper artifact) and Section 4 (dual quaternion blending as a fix, and its bulging artifact)
  2. Ladislav Kavan, Steven Collins, Jiří Žára and Carol O'Sullivan, Geometric skinning with approximate dual quaternion blending, ACM Transactions on Graphics 27(4), article 105, 2008, Section 2.2 (linear blend skinning, equation 2, and the candy wrapper example)

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/ENSRSS/text.yaml