Graphics Reference
In-Depth Information
APPENDIX
A
Rendering Issues
This appendix presents rendering techniques for computing a series of images that are to be played back
as an animation sequence. It is assumed that the reader has a solid background in rendering techniques
and issues, namely, the use of frame buffers, the z -buffer display algorithm, and aliasing. The tech-
niques presented here concern smoothly displaying a sequence of images on a computer monitor
( double buffering ), efficiently computing images of an animated sequence ( compositing, drop
shadows, billboarding ), and effectively rendering moving objects ( motion blur ). An understanding
of this material is not necessary for understanding the techniques and algorithms covered in the rest
of the topic, but computer animators should be familiar with these techniques when considering the
trade-offs involved in rendering images for animation.
A.1 Double buffering
Not all computer animation is first recorded onto film or video for later viewing. In many cases, image
sequences are displayed in real time on the computer monitor. Computer games are a prime example of
this, as is Web animation. Real-time display also occurs in simulators and for previewing animation for
later high-quality recording. In some of these cases, the motion is computed and images are rendered as
the display is updated; sometimes pre-calculated images are read from the disk and loaded into the
frame buffer. In either case, the time it takes to paint an image on a computer screen can be significant
(for various reasons). To avoid waiting for the image to update, animators often paint the new image
into an off-screen buffer. Then a quick operation is performed to change the off-screen buffer to
on-screen (often with hardware display support); the previous on-screen buffer becomes off-screen.
This is called double buffering .
In double buffering, two (or more) buffers are used. One buffer is used to refresh the computer
display, while another is used to assemble the next image. When the next image is complete, the
two buffers switch roles. The second buffer is used to refresh the display, while the first buffer is used
to assemble the next image. The buffers continue exchanging roles to ensure that the buffer used for
display is not actively involved in the update operations (see Figure A.1 ).
Double buffering is often supported by the hardware of a computer graphics system. For example,
the display system may have two built-in frame buffers, both of which are accessible to the user's
program and are program selectable for driving the display. Alternatively, the graphics system may
be designed so that the screen can be refreshed from an arbitrary section of main memory and the
buffers are identified by pointers into the memory. Double buffering is also effective when
Search WWH ::




Custom Search