538 11. Animation Systems
pose (at a single point in time) is D = S – R. Of course, we’re dealing with joint
poses, not scalar quantities, so we cannot simply subtract the poses. In gen-
eral, a joint pose is a 4 × 4 affi ne transformation matrix PCP→ that transforms
points and vectors from the child joint’s local space to the space of its parent
joint. The matrix equivalent of subtraction is multiplication by the inverse ma-
trix. So given the source pose Sj and the reference pose Rj for any joint j in the
skeleton, we can defi ne the diff erence pose Dj at that joint as follows (for this
discussion, we’ll drop the C→P or j→p(j) subscript, as it is understood that we
are dealing with child-to-parent pose matrices):
Dj=SRjj−^1.
“Adding” a diff erence pose Dj onto a target pose Tj yields a new additive
pose Aj. This is achieved by simply concatenating the diff erence transform
and the target transform as follows:
Aj==DTjj(SR Tj j−^1 ).j (11.15)
We can verify that this is correct by looking at what happens when the diff er-
ence pose is “added” back onto the original reference pose:
1
.
j jj
jj j
j
−
=
=
=
A DR
SR R
S
In other words, adding the diff erence animation D back onto the original ref-
erence animation R yields the source animation S, as we’d expect.
Temporal Interpolation of Difference Clips
As we learned in Section 11.4.1.1, game animations are almost never sampled
on integer frame indices. To fi nd a pose at an arbitrary time t, we must oft en
temporally interpolate between adjacent pose samples at times t 1 and t 2. Thank-
fully, diff erence clips can be temporally interpolated just like their non-addi-
tive counterparts. We can simply apply Equations (11.10) and (11.11) directly
to our diff erence clips as if they were ordinary animations.
Note that a diff erence animation can only be found when the input clips
S and R are of the same duration. Otherwise there would be a period of time
during which either S or R is undefi ned, meaning D would be undefi ned as
well.
Additive Blend Percentage
In games, we oft en wish to blend in only a percentage of a diff erence anima-
tion to achieve varying degrees of the eff ect it produces. For example, if a
diff erence clip causes the character to turn his head 80 degrees to the right,