Graphics Reference
In-Depth Information
(a)
(b)
Figure 17.5: (a) A MIP map, schematically. An n × k image is stored in the upper-left corner;
to its right is an n × k / 2 version of the image, then an n × k / 4 version, etc.; below it is an
n / 2 × kimage,thenann / 4 × k image etc. The remaining quadrant is filled in with versions of
the image that are condensed both in row size and column size. The recursion stops when
the image is reduced to a single pixel. (b) A MIP map for a real image.
we have an image, I ,storing R -, G -, B -, and
α
-values (the color values have not
been premultiplied by
). The recipe for MIP mapping tells us to average adjacent
pairs of colors, but is that the right thing to do when
α
-values are present as well?
Suppose, for instance, that we have a red pixel, with opacity 0, next to a blue pixel
of opacity 1. Surely the correct “combined” pixel is blue, with opacity .5. In fact,
considering the adjacent pixels as contributing to a single “wide pixel,” we can
suppose that we have a left subpixel with colors ( R L , G L , B L ) and opacity
α
α L , and
a right subpixel with subscripts “R” on each item. The left subpixel's opacity can
contribute at most 50% opacity to the wide pixel; the same goes for the right one.
Hence the opacity for the wide pixel should be
= 1
α
2 (
α L +
α R ) .
(17.8)
What about the color of the wide pixel, though? As the red and blue example
shows, opacity must be taken into account in the blending process. In fact, the
resultant color should be
1
2 (
α L ( R L , G L , B L )+
α R ( R R , G R , B R ))
.
(17.9)
α L +
α R
Thus, we see that even for MIP mapping, it's natural to use premultiplied
-values
for the colors. For further detail on the relationship between MIP mapping and
α
α
-values, see McGuire and Stone [MS97].
MIP mapping of other image characteristics such as depth or object ID is more
problematic; there's no clear correct answer.
17.7 Discussion and Further Reading
While our use of images in graphics is primarily in rendering, images themselves
have long been a subject of study in their own right, in the field known as image
 
 
 
Search WWH ::




Custom Search