i
i
i
i
i
i
i
i
418 17. Computer Animation
sequence until the end, pose-to-pose action, also known as keyframing,ismuch
more suitable for computer animation. In this technique, animation is carefully
Key frames (created first)
Time
Straight ahead order of frame creation
Figure 17.3. Keyfram-
ing (top) encourages de-
tailed action planning while
straight-ahead action (bot-
tom) leads to a more spon-
taneous result.
planned through a series of relatively sparsely spaced key frames with the rest
of the animation (in-between frames) lled in only after the keys are set (Fig-
ure 17.3). This allows more precise timing and allows the computer to take over
the most tedious part of the process—the creation of the in-between frames—
using algorithms presented in the next section.
Almost any of the techniques outlined above can be used with some reason-
able amount of exaggeration to achieve greater artistic effect or underscore some
specic property of an action or a character. The ultimate goal is to achieve some-
thing the audience will want to see, something which is appealing. Extreme com-
plexity or too much symmetry in a character or action tends to be less appealing.
To create good results, a traditional animator needs solid drawing skills.Analo-
gously, a computer animator should certainly understand computer graphics and
have a solid knowledge of the tools he uses.
17.1.4 Animator Control vs. Automatic Methods
In traditional animation, the animator has complete control over all aspects of the
production process and nothing prevents the nal product to be as it was planned
in every detail. The price paid for this exibility is that every frame is created by
hand, leading to an extremely time- and labor-consuming enterprise. In computer
animation, there is a clear tradeoff between, on the one hand, giving an animator
more direct control over the result, but asking him to contribute more work and,
on the other hand, relying on more automatic techniques which might require
setting just a few input parameters but offer little or no control over some of the
properties of the result. A good algorithm should provide sufcient exibility
while asking an animator only the information which is intuitive, easy to provide,
and which he himself feels is necessary for achieving the desired effect. While
perfect compliance with this requirement is unlikely in practice since it would
probably take something close to a mind-reading machine, we do encourage the
reader to evaluate any computer-animation technique from the point of view of
providing such balance.
17.2 Keyframing
The term keyframing can be misleading when applied to 3D computer animation
since no actual completed frames (i.e., images) are typically involved. At any
given moment, a 3D scene being animated is specied by a set of numbers: the
i
i
i
i
i
i
i
i
17.2. Keyframing 419
Frames
Scene parameters
Time
Figure 17.4. Different patterns of setting keys (black circles above) can be used simultane-
ously for the same scene. It is assumed that there are more frames before as well as after
this portion.
positions of centers of all objects, their RGB colors, the amount of scaling applied
to each object in each axis, modeling transformations between different parts of
a complex object, camera position and orientation, light sources intensity, etc. To
animate a scene, some subset of these values have to change with time. One can,
of course, directly set these values at every frame, but this will not be particularly
efcient. Short of that, some number of important moments in time (key frames
t
k
) can be chosen along the timeline of animation for each of the parameters and
values of this parameter (key values f
k
) are set only for these selected frames.
We will call a combination (t
k
,f
k
) ofkeyframeandkeyvaluesimplyakey.
Key frames do not have to be the same for different parameters, but it is often
logical to set keys at least for some of them simultaneously. For example, key
frames chosen for x-, y-andz-coordinates of a specic object might be set at
exactly the same frames forming a single position vector key (t
k
, p
k
).Thesekey
Frame positions
t
t
f
Keys
df/dt
Figure 17.5. A continuous
curve
f(t)
is fit through the
keys provided by the ani-
mator even though only val-
ues at frame positions are
of interest. The derivative
of this function gives the
speed of parameter change
and is at first determined
automatically by the fitting
procedure.
frames, however, might be completely different from those chosen for the object’s
orientation or color. The closer key frames are to each other, the more control the
animator has over the result; however the cost of doing more work of setting the
keys has to be assessed. It is, therefore, typical to have large spacing between
keys in parts of the animation which are relatively simple, concentrating them in
intervals where complex action occurs as shown in Figure 17.4.
Once the animator sets the key (t
k
,f
k
), the system has to compute values of
f for all other frames. Although we are ultimately interested only in a discrete set
of values, it is convenient to treat this as a classical interpolation problem which
ts a continuous animation curve f (t) through a provided set of data points (Fig-
ure 17.5). Extensive discussion of curve tting algorithms can be found in Chap-
i
i
i
i
i
i
i
i
420 17. Computer Animation
ter 15, and we will not repeat it here. Since the animator initially provides only the
keys and not the derivative (tangent), methods which compute all necessary infor-
mation directly from keys are preferable for animation. The speed of parameter
change along the curve is given by the derivative of the curve with respect to time
df / d t . Therefore, to avoid sudden jumps in velocity, C
1
continuity is typically
necessary. A higher degree of continuity is typically not required from animation
curves, since the second derivative, which corresponds to acceleration or applied
force, can experience very sudden changes in real-world situations (ball hitting a
solid wall), and higher derivatives do not directly correspond to any parameters of
physical motion. These consideration make Catmull-Rom splines one of the best
choices for initial animation curve creation.
Most animation systems give the animator the ability to perform interactive
ne editing of this initial curve, including inserting more keys, adjusting existing
keys, or modifying automatically computed tangents. Another useful technique
which can help to tweak the shape of the curve is called TCB control (TCB stands
for tension, continuity and bias). The idea is to introduce three new parameters
which can be used to modify the shape of the curve near a key through coordinated
adjustment of incoming and outgoing tangents at this point. For keys uniformly
spaced in time with distance Δt between them, the standard Catmull-Rom ex-
pression for incoming T
in
i
and outgoing T
out
i
tangents at an internal key (t
k
,f
k
)
can be rewritten as
T
in
k
= T
out
k
=
1
t
(f
k+1
f
k
)+
1
t
(f
k
f
k1
).
Modied tangents of a TCB spline are
T
in
k
=
(1 t)(1 c)(1 + b)
t
(f
k+1
f
k
)+
(1 t)(1 + c)(1 b)
t
(f
k
f
k1
),
T
out
k
=
(1 t)(1 + c)(1 + b)
t
(f
k+1
f
k
)+
(1 t)(1 c)(1 b)
t
(f
k
f
k1
).
The tension parameter t controls the sharpness of the curve near the key by scaling
both incoming and outgoing tangents. Larger tangents (lower tension) lead to a
atter curve shape near the key. Bias b allows the animator to selectively increase
the weight of a key’s neighbors locally pulling the curve closer to a straight line
connecting the key with its left (b near 1, “overshooting” the action) or right (b
near 1, “undershooting” the action) neighbors. A non-zero value of continuity c
makes incoming and outgoing tangents different allowing the animator to create
kinks in the curve at the key value. Practically useful values of TCB parameters
are typically connedtotheinterval[1; 1] with defaults t = c = b =0corre-
sponding to the original Catmull-Rom spline. Examples of possible curve shape
adjustments are shown in Figure 17.6.
i
i
i
i
i
i
i
i
17.2. Keyframing 421
high tension, t>0
low tension, t<0
low continuity, c<0
low bias, b<0 high bias, b>0
high continuity, c> 0
original spline, t=c=b=0
original spline, t=c=b=0
original spline, t=c=b=0
Figure 17.6. Editing the default interpolating spline (middle column) using TCB controls.
Note that all keys remain at the same positions.
17.2.1 Motion Controls
So far, we have described how to control the shape of the animation curve through
key positioning and ne tweaking of tangent values at the keys. This, however,
is generally not sufcient when one would like to have control both over where
the object is moving, i.e., its path, and how fast it moves along this path. Given a
set of positions in space as keys, automatic curve-tting techniques can tacurve
through them, but resulting motion is only constrained by forcing the object to
arrive at a specied key position p
k
at the corresponding key frame t
k
, and noth-
ing is directly said about the speed of motion between the keys. This can create
problems. For example, if an object moves along the x-axis with velocity 11 me-
ters per second for 1 second and then with 1 meter per second for 9 seconds, it
will arrive at position x =20after 10 seconds thus satisfying animator’s keys
(0,0) and (10, 20). It is rather unlikely that this jerky motion was actually de-
sired, and uniform motion with speed 2 meters/second is probably closer to what
the animator wanted when setting these keys. Although typically not displaying
i
i
i
i
i
i
i
i
422 17. Computer Animation
such extreme behavior, polynomial curves resulting from standard tting proce-
dures do exhibit non-uniform speed of motion between keys as demonstrated in
Figure 17.7. While this can be tolerable (within limits) for some parameters for
which the human visual system is not very good at determining non-uniformities
in the rate of change (such as color or even rate of rotation), we have to do bet-
ter for position p of the object where velocity directly corresponds to everyday
experience.
We will rst distinguish curve parameterization used during the tting proce-
dure from that used for animation. When a curve is t through position keys, we
will write the result as a function p(u) of some parameter u. This will describe
the geometry of the curve in space. The arc length s is the physical length of the
t=0
t=9
t=12
t=6
t=3
Figure 17.7. All three
motions are along the same
2D path and satisfy the set
of keys at the tips of the
black triangles. The tips of
the white triangles show ob-
ject position at Δ
t
=1in-
tervals. Uniform speed of
motion between the keys
(top) might be closer to
what the animator wanted
but automatic fitting proce-
dures could result in either
of the other two motions.
curve. A natural way for the animator to control the motion along the now existing
curve is to specify an extra function s(t) which corresponds to how far along the
curve the object should be at any given time. To get an actual position in space,
we need one more auxiliary function u(s) which computes a parameter value u
for given arc length s. The complete process of computing an object position for
a given time t is then given by composing these functions (see Figure17.8):
p(t)=p(u(s(t))).
Several standard functions can be used as the distance-time function s(t).
One of the simplest is the linear function corresponding to constant velocity:
s(t)=vt with v = const. Another common example is the motion with con-
stant acceleration a (and initial speed v
0
) which is described by the parabolic
s(t)=v
0
t + at
2
/2. Since velocity is changing gradually here, this function
can help to model desirable ease-in and ease-out behavior. More generally, the
P(u(s(t)))
P(u)
t
s
s(t)
s(t)
u(s(t))
u
u(s)
s
Figure 17.8. To get position in space at a given time
t
, one first utilizes user-specified motion
control to obtain the distance along the curve
s
(
t
) and then compute the corresponding curve
parameter value
u
(
s
(
t
)). Previously fitted curve P(
u
) can now be used to find the position
P
(
u
(
s
(
t
))).
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.11.230