Graphics Reference
In-Depth Information
FIGURE A.2
Double buffering pseudocode.
selectively manipulated without the user having to regenerate the scene as a whole. As frames of com-
puter animation become more complex, the technique allows layers to be calculated separately and then
composited after each has been finalized. Compositing provides great flexibility and many advantages
to the animation process. Before digital imagery, compositing was performed optically in much the
same way that a multi-plane camera is used in conventional animation. With digital technology,
compositing operates on digital image representations.
One common and extremely important use of compositing is that of computing the foreground ani-
mation separately from the static background image. If the background remains static it need only be
computed and rendered once. Then, as each frame of the foreground image is computed, it is
composited with the background to form the final image. The foreground can be further segmented
into multiple layers so that each object, or even each object part, has its own layer. This technique
allows the user to modify just one of the object parts, re-render it, and then recompose it with the pre-
viously rendered layers, thus potentially saving a great deal of rendering time and expense. This is very
similar to the two-and-a-half dimensional approach taken in conventional hand-drawn cell animation.
Compositing offers a more interesting advantage when digital frame buffers are used to store depth
information in the form of z -values, along with the color information at each pixel. To a certain extent,
this approach allows the animator to composite layers that actually interleave each other in depth. The
initial discussion focuses on compositing without pixel depth information, which effectively mimics
the approach of the multi-plane camera. Following this, compositing that takes the
z -values into
account is explored.
A.2.1 Compositing without pixel depth information
Digital compositing attempts to combine multiple two-dimensional images of three-dimensional
scenes so as to approximate the visibility of the combined scenes. Compositing will combine two
images at a time with the desire of maintaining the equilibrium shown in Equation A.1 .
compositeðrenderðscene 1
Þ; renderðscene 2
ÞÞ ¼ renderðmergeðscene 1
; scene 2
ÞÞ
(A.1)
 
Search WWH ::




Custom Search