i
i
i
i
i
i
i
i
11.1. Computer Animation 259
Thus, in computer animation, the basic idea is:
Set up a description of a scene (place models, lights and cameras
in three dimensions) for each keyframe. Then use the computer
to calculate descriptions of the scene for each frame in between
the keyframes and render appropriate images.
Most (if not all) computer-animation application programs give their
users the task of describing the state of the action in keyframes, and then
they do their best to describe what happens in the snapshots taken during
the intervening frames. This is invariably done by interpolating between the
description of at least two, but possibly three or four keyframes.
For applications in VR, we cannot use the keyframe concept in the same
way, because events are taking place in real time. However, we still have to
render video frames, and we must synchronize what is rendered with a real-
time clock. So suppose we need to simulate the movement of a flight simula-
tor which represents an aircraft flying at 10 m/s along a path 10 km long over
a virtual terrain. The total flight time will take approximately 1,000 sec-
onds. This means that if the graphics card is refreshing at a rate of 100 Hz
(or every one hundredth of a second), our visualization software will have to
render 100,000 frames during this 1,000-second flight. In addition, if we
get external course correction information from joystick hardware every sec-
ond and use it to update the aircraft’s current position, we are still left with
the task of having to smoothly interpolate the viewpoint’s virtual position
and orientation 99 times every second (so that all the video frames can be
rendered without looking jerky). This is analogous to what happens in com-
puter animation when tweening between two keyframes to generate 100
pictures.
1
In practical terms, our rendering software has a harder job than that
of its equivalent in computer animation because of the need to synchronize
to a real-time clock. Going back to our simple flight simulator example,
if we cannot render 100 pictures per second, we shall have to make larger
steps in viewpoint position. Therefore, instead of rendering 100 frames per
second (fps) and moving the viewpoint 0.1 m at each frame, we might ren-
der 50 fps and move the viewpoint 0.2 m. Unfortunately, it is not usually
possible to know ahead of time how long it is going to take to render a
1
Thereisasmallsubtledifference. Intheanimation example, we know the starting and
ending positions and interpolate; in the flight-simulator example, we use the current position
and the last position to extrapolate.