580 11. Animation Systems
something with her shoulders, head, and eyes and making a gesture with her
hands and arms. The movements of diff erent parts of the body aren’t gener-
ally in perfect sync—certain parts of the body tend to “lead” the movements
of other parts (e.g., the head leads a turn, followed by the shoulders, the hips,
and fi nally the legs). In traditional animation, this well-known technique is
known as anticipation [44].
This kind of movement seems to be at odds with a state-machine-based
approach to animation. Aft er all, we can only be in one state at a time. So how
can we get diff erent parts of the body to operate independently? One solution
to this problem is to introduce the concept of state layers. Each layer can be
in only one state at a time, but the layers are temporally independent of one
another. The fi nal pose of the skeleton is calculated by evaluating the blend
trees on each of the n layers, thus generating n skeletal poses, and then blend-
ing these poses together in a predefi ned manner. This is illustrated in Fig-
ure 11.58.
The Uncharted engine uses a layered state architecture. The layers form
a stack, with the bott om-most layer (called the base layer) always producing
a full-body skeletal pose and each upper layer blending in a new full-body,
partial-skeleton, or additive pose on top of the base pose. Two kinds of layers
are supported: LERP and additive. A LERP layer blends its output pose with
the pose generated by the layer(s) below it. An additive layer assumes that its
output pose is always a diff erence pose and uses additive blending to combine
it with the pose generated by the layer(s) below it. In eff ect, a layered state ma-
Base Layer
State A State B State C
Variation Layer (Additive)
D E G
Gesture Layer (Additive)
H I
Gesture Layer (LERP)
J K
F
Time (τ)
Figure 11.58. A layered animation state machine, showing how each layer’s state transitions
are temporally independent.