Graphics Reference
In-Depth Information
Combine scenes
Anti-alias the
combined scene
image
A
Without compositing: anti-alias the combined scenes to produce image
Anti-alias the
partial scene
RGB
over
image
Anti-alias the
partial scene
RGB
information about geometric
relationships has been lost and only
the depth priority of images is known
B
Without compositing: anti-alias the partial scenes and then combine to produce image
FIGURE A.5
Anti-aliasing combined scenes versus alpha channel compositing.
foreground image will, on average, show through 50 percent of the time. Consider the case of a fore-
ground pixel and middle ground pixel, both with partial coverage in front of a background pixel with
full coverage ( Figure A.6 ) .
The result of the compositing operation is shown in Equation A.4 .
RGB FMB ¼ð a F RGB F þð 1 a F Þ a M RGB M Þþð 1 a FM Þ a B RGB B
where a FM ¼ð a F þð
1
a F Þ a M Þ
and a FMB ¼
1
:
0
(A.4)
RGB ¼
0
:
5 RGB F þ
0
:
25 RGB M þ
0
:
25 RGB B
If the color fragments are correlated, for example, if they share an edge in the image plane, then the
result of the compositing operation is incorrect. The computations are the same, but the result does not
accurately represent the configuration of the colors in the combined scene. In the example of
Figure A.7 , none of the background should show through. A similarly erroneous result occurs if the
middle ground image has its color completely on the other side of the edge, in which case none of
the middle ground color should appear in the composited pixel. Because geometric information has
been discarded, compositing fails to handle these cases correctly.
 
Search WWH ::




Custom Search