Professional Documents
Culture Documents
object definition
key frames
in-betweening
raster animation
colour-table animation
Raster animation
This is the most common animation technique
Frames are copied very fast from off-screen memory
to the frame buffer
Copying usually done with bitBLT-type operations
Copying can be applied to
complete frames
only parts of the frame which contain some movement
Examples
Ship is redrawn in background colour
Step 1 (erase)
(x,y)
Step 2 (move)
(x,y)
(x+Dx,y+Dy)
x = x + Dx
y = y + Dy
Move ship
Step 3 (draw)
(x,y)
Double buffering
Used to achieve smooth animation
The next frame of animation is computed to an offscreen buffer at the same time when the current
frame is transferred to the frame buffer.
Create
Frame
Load to the
frame buffer
Create
Frame
Load to the
frame buffer
Create
Frame
Load to the
frame buffer
Time
Colour-table animations
Simple 2D animations can be easily implemented
using colour lookup table.
Predefine the object as successive positions along
the motion path, set the successive blocks of pixel
values to color table entries.
Set the pixels at the first position of the object to on
values, and set the pixels at the other object positions
to the background color.
The animation is accomplished by changing the color
table values so that the object is on at successive
positions along the animation path as the preceding
position is set to the background intensity.
Object definition
In simple manual systems, the objects can be simply
the artist drawings
In computer-generated animations, models are used
Examples of models:
a "flying logo" in a TV advert
a walking stick-man
a dinosaur attacking its prey in Jurassic Park
Models can be
Rigid (i.e. they have no moving parts)
Articulated (subparts are rigid, but movement is
allowed between the sub-parts)
Path specification
Impression of movement can be created for two basic
situations, or for their combination:
static object, moving camera
static camera, moving object
Time
F1
F5
F2
F4
F3
F2
F3
F4
Key frames
Compute first a small number of key frames
Interpolate the remaining frames in-between these
key frames (in-betweening)
Key frames can be computed
at equal time intervals
according to some other rules
for example when the direction of the path changes rapidly
In-betweening
The simplest method of in-betweening is linear
interpolation
Interpolation is normally applied to the projected
object points
Lmax =max(lk,lk+1)
Lmin=min(lk,lk+1)
Ne=Lmax mod Lmin
Ns=int (Lmax/Lmin)
added point
2
2
Key frame k
Halfway frame
In-betweening - example
Given coordinates of a 2D point
key frame n:
(xn,yn)
key frame n+1:
(xn+1,yn+1)
time interval between the two key frames: 1/10 second
x = (xn+1 - xn) / 3
y = (yn+1 - yn) / 3
for ( i=1; i<3; i++ )
{
xi = xn + i * x
yi = yn + i * y
}
In-betweening
In-betweening
In-betweening should use interpolation based on the
nature of the path, for example:
straight path
linear interpolation
circular path
angular interpolation
irregular path
linear interpolation
spline