Merging and Transformation of Raster Images for Cartoon Animation

Bruce A. Wallace
Proc. ACM SIGGRAPH '81
Vol 15, No. 3, August, 1981, pp. 253-262.

Abstract:

The task of assembling drawings and backgrounds together for each frame of an animated sequence has always been a tedious undertaking using conventional animation camera stands, and has contributed to the high cost of animation production. In addition, the physical limitations that these camera stands place on the manipulation of the individual artwork levels restricts the total image-making possibilities afforded by traditional cartoon animation. Documents containing all frame assembly information must also be maintained. This paper presents several computer methods for assisting in the production of cartoon animation, both to reduce expense and to improve the overall quality.

Merging is the process of combining levels of artwork into a final composite frame using digital computer graphics. The term "level" refers to a single painted drawing (cel) or background. A method for the simulation of any hypothetical animation camera set-up is introduced. A technique is presented for reducing the total number of merges by retaining merged groups consisting of individual levels which do not change over successive frames. Lastly, a sequence-editing system, which controls precise definition of an animated sequence, is described. Also discussed is the actual method for merging any two adjacent levels and several computational and storage optimizations to speed the process.

Additional information available:


The role of this paper in the history of digital compositing

Digital compositing is at the heart of all modern desktop publishing and film production systems. The history of this technique is complicated, and many researchers contributed to its development. From a mathematical standpoint, this history can be conveniently partitioned into three steps:

  1. In 1977, Alvy Ray Smith and Ed Catmull, then working at the New York Institute of Technology, invented a method for blending a partially opaque foreground image over a completely opaque background image. The opacity of each pixel in the foreground is given by a third ("alpha") image, whose values range from 0.0 ("transparent") to 1.0 ("opaque"). (Eventually, Smith and Catmull began treating alpha as integral to an image, leading to the notion of a 4-channel image: red, green, blue, and alpha.) Their blending method, sometimes called "digital matting", employs the linear interpolation formula [1]
    Cout = (Cfgd * Afgd) + (1 - Afgd) * Cbkg
    where
    Cfgd = red, green, blue of foreground
    Cbkg = red, green, blue of background
    Afgd = alpha of foreground

  2. In 1980, Bruce Wallace and Marc Levoy, then working at Hanna-Barbara Productions, derived a more complicated method for blending two partially opaque images to produce a partially opaque result. Their formula, described on page 257 (slide 5) of Wallace's Siggraph '81 paper [2] (see above), is
    Aout = (1 - (1 - Afgd) * (1 - Abkg))
    Cout = (Cfgd * Afgd) + (1 - Afgd * Cbkg * Abkg) / Aout
    where
    Cfgd = red, green, blue of foreground
    Cbkg = red, green, blue of background
    Afgd = alpha of foreground
    Abkg = alpha of background

  3. In 1984, Tom Porter and Tom Duff, then working at Lucasfilm, showed that by pre-multiplying Cbkg and Cfgd by Abkg and Afgd, respectively, Wallace and Levoy's 1981 formulas could be simplified to [3]
    Aout = Afgd + (1 - Afgd) * Abkg
    Cout' = Cfgd' + (1 - Afgd) * Cbkg'
    where
    Cfgd' = Cfgd * Afgd
    Cbkg' = Cbkg * Abkg
    Cout' = Cout * Aout

What is the significance of these differences in formulation?

Let us abbreviate Smith and Catmull's method as (fgd OVER bkg). Using their method, three or more "layers" (i.e. images) could be composited together, but only in a linear chain that proceeded from bottom to top, i.e. fgd OVER (mid OVER bkg).

The formulation of Wallace and Levoy, by contrast, permitted multiple layers to be composited together in any order that obeyed associativity. In other words, three layers could be composited together either using fgd OVER (mid OVER bkg), as above, or using (fgd OVER mid) OVER bkg. The sequence in which the three layers are merged is different in the two cases, and thus the intermediate images (after the first merging step) look different, but the final images look the same. This new formulation meant that compositing could be expressed as a tree rather than as a linear chain. This additional flexibility conveyed two advantages. First, if the script called for the midground and foreground layers to be transformed by a common operator (e.g. a pan or zoom), but the background was to be left alone, then the two upper layers could be composited together ("collapsed") before transformation, thereby saving computation. See figure 12 of the paper for an example. Second, if the background layer changed on each frame of an animation, but the midground and foreground layers did not, then the latter two layers needed to be composited together only once, for an additional savings in computation.

The formulation of Porter and Duff permitted all four channels of an image (red, green, blue, and alpha) to be treated identically. This facilitated implementation of digital compositing in hardware. It also led to an elegant algebra containing 12 operators, of which OVER was only one.

Summarizing, Smith and Catmull invented digital matting and the integral alpha channel, Wallace and Levoy introduced compositing trees, making the technique flexible and efficient, and Porter and Duff introduced premultiplication by alpha and an algebra of 12 compositing operators, giving the technique great expressive power.

Historical footnote

Because the history of digital compositing is complicated, reasonable observers can disagree about how to partition its history into steps, and what importance to assign to each step. A recent history of the technique [4] enumerates only the first and third steps described above. In my opinion, the importance of the second step, as reported in [2], has been overlooked.

References

[1] Smith, A.R., Painting Tutorial Notes, SIGGRAPH '79 course on Computer Animation Techniques, 1979, ACM.

[2] Wallace, B.A., Merging and Transformation of Raster Images for Cartoon Animation, Proc. ACM SIGGRAPH '81, Vol 15, No. 3, 1981, ACM, pp. 253-262.

[3] Porter, T., Duff., T., Compositing digital images, Proc. SIGGRAPH '94, Vol. 18, No. 3, 1984, ACM, pp. 253-259.

[4] Smith, A.R., Alpha and the History of Digital Compositing, Pixar Technical Memo #7, August 15, 1995.


This page © Copyright 2001 by Marc Levoy
The paper © Copyright 1981 by ACM
levoy@cs.stanford.edu