- Porter and Duff's ``Compositing Digital Images'', ACM SIGGRAPH 1984
it the standard reference for this material
- An image is separated into elements which can be independently
rendered
- Each element has an associated matte which denotes the shape of
the element (coverage information)
- The elements are composited using the matte to create the
final image
- Concerns with compositing
- It must not introduce aliasing
- It should be an associative operation
- It should provide for dissolves and fades during animation
- Systems that reduce an environment to a front-to-back or
back-to-front order are called 2 1/2 dimensional
- Background elements generally have alphas of 1 everywhere
- Foreground images generally have large areas with alphas of 0
- Mattes used for controlling compositing have 0 as their rgb
components
- Off-line storage can use this information to compress elements
- Porter and Duff introduce a compositing algebra
- Consider two elements A and B that divide a pixel into 4 subpixels
B | A | Name | Description | Choices |
0 | 0 | 0 | Not in A and not in B | 0 |
0 | 1 | A | In A and not in B | 0, A |
1 | 0 | B | Not in A and in B | 0, B |
1 | 1 | AB | In A and in B | 0, A, B |
- The choices indicate that in the subpixel the element may
(A, B) or may not (0) contribute to the composite
- For example in the subpixel containing A and B we may choose
to use A's, B's, or neither's color
- Thus there are
distinct
compositing operators - The table summarizes the operations, giving the output
pixel C as a linear combination of A and B
Operation | (0, A, B, AB) | Diagram | Result
Clear |
A | (0, A, 0, A) | | C = A |
B | (0, 0, B, B) | | C = B |
A over B | (0, A, B, A) | | C = |
B over A | (0, A, B, B) | | C = |
A in B | (0, 0, 0, A) | | C = |
B in A | (0, 0, 0, B) | | C = |
A out B | (0, A, 0, 0) | | C = |
B out A | (0, B, 0, 0) | | C = |
A atop B | (0, 0, B, A) | | C = |
B atop A | (0, A, 0, B) | | C = |
B xor A | (0, A, B, 0) | | C = |
- The over operation is perhaps the most useful - it represents
the placement of a foreground A over a background B
Florida Tech Computer Science
William D. Shoaff
Comments to author:wds@cs.fit.edu
All contents copyright ©, William D. Shoaff
Revised: Tue Oct 22 18:18:25 EST 1996