Game Engine Architecture

(Ben Green) #1

510 11. Animation Systems


As we saw above, playing a looping animation is like laying down an
infi nite number of back-to-front copies of the clip onto the global time line.
We can also imagine looping an animation a fi nite number of times, which
corresponds to laying down a fi nite number of copies of the clip. This is il-
lustrated in Figure 11.15.
Time-scaling a clip makes it appear to play back more quickly or more
slowly than originally animated. To accomplish this, we simply scale the im-
age of the clip when it is laid down onto the global time line. Time-scaling is
most naturally expressed as a playback rate , which we’ll denote R. For example,
if an animation is to play back at twice the speed (R = 2), then we would scale
the clip’s local time line to one-half (1/R = 0.5) of its normal length when map-
ping it onto the global time line. This is shown in Figure 11.16.
Playing a clip in reverse corresponds to using a time scale of –1, as shown
in Figure 11.17.

Clip A

110 sec

τsta rt = 102 sec

Clip A ...

τ = 105 sec

Figure 11.15. Playing a looping animation corresponds to laying down multiple back-to-back
copies of the clip.

Clip A

τsta rt = 102 sec
τ = 105 sec

Clip A

R= 2
(scale t by 1/R= 0.5)

t= 0 sec t= 5 sec

t= 0 sec 5 sec
Figure 11.16. Playing an animation at twice the speed corresponds to scaling its local time line
by a factor of ½.

t= 5 sec 0 sec

τsta rt = 102 sec
τ = 105 sec 110 sec
A pilC

Clip A
t= 0 sec 5 sec

R= –1
(flip t)

Figure 11.17. Playing a clip in reverse corresponds to a time scale of –1.
Free download pdf