Lance W i l l i a m s
Abstract
~. Pyramidal Data S t r u c t u r e s
The m a p p i n g of images onto surfaces
may s u b s t a n t i a l l y increase the r e a l i s m and Pyramidal data structures may be
i n f o r m a t i o n c o n t e n t of computer-generated based on various subdivisions: binary
imagery. The p r o j e c t i o n of a flat source trees, quad trees, oct trees, or n-
image onto a curved surface may involve dimensional h i e r a r c h i e s [17]. The common
sampling difficulties, however, w h i c h are feature o f these s t r u c t u r e s is a succes-
c o m p o u n d e d as the view of the surface sion of levels w h i c h v a r y the r e s o l u t i o n
changes. As the p r o j e c t e d scale of the at w h i c h the data is represented.
surface increases, interpolation between
the original samples of the source image The decomposition of an image by
is necessary; as the scale is reduced, two-dimensional binary s u b d i v i s i o n was a
approximation of m u l t i p l e samples in the p i o n e e r i n g s t r a t e g y in computer graphics
source is required. Thus a constantly for visible surface d e t e r m i n a t i o n [15].
c h a n g i n g sampling w i n d o w of v i e w - d e p e n d e n t The a p p r o a c h was e s s e n t i a l l y a synthesis-
shape must t r a v e r s e the source image. by-analysis: the image plane was subdi-
vided into quadrants recursively until
To reduce the c o m p u t a t i o n implied by analysis of a s u b s e c t i o n showed that sur-
these requirements, a set o f p r e f i l t e r e d face o r d e r i n g was s u f f i c i e n t l y simple to
source images may be created. This permit rendering. Such s u b d i v i s i o n and
approach can be applied to particular analysis has b e e n s u b s e q u e n t l y adopted to
advantage in animation, where a large generate spatial data structures [5],
number of frames using the same source w h i c h h a v e been used to represent images
image must be generated. This paper [9] both for p a t t e r n r e c o g n i t i o n [13] and
advances a "pyramidal parametric" pre- for t r a n s m i s s i o n [i0], [14]. In the field
filtering and sampling geometry which of c o m p u t e r graphics, such data s t r u c t u r e s
minimizes aliasing effects and assures have been a d o p t e d for texture m a p p i n g [4],
continuity within and between target [16], and g e n e r a l i z e d to r e p r e s e n t objects
images. in space [Ii].
Permission to copy without ~e all or part of this material is granted publication and its date appear, and notice is given that copying is by
provided that the copies are not made or distributed ~ r direct permission of the Association for Computing Machinery. To copy
commercial advantage, the ACM copyright notice and the title of the otherwise, or to republish, requires a fee and/or specific permission.
2. Parametric Interpolation
By a p y r a m i d a l p a r a m e t r i c data struc-
ture, we will mean simply a pyramidal
s t r u c t u r e w i t h b o t h intra- and i n t e r - l e v e l
interpolation. Consider the case of an
image represented as a two-dimensional
array of samples. I n t e r p o l a t i o n is neces-
sary to p r o d u c e a c o n t i n u o u s function of
two p a r a m e t e r s , U and V. If, in addition,
a third p a r a m e t e r (call it D) moves us up
and down a hierarchy of corresponding
t w o - d i m e n s i o n a l functions, w i t h i n t e r p o l a -
tion b e t w e e n (or among) the levels of the Figure (i)
pyramid p r o v i d i n g continuity, the struc- S t r u c t u r e o f a Color Mip M a p
ture is p y r a m i d a l p a r a m e t r i c . Smaller and smaller images diminish into
the upper left c o r n e r of the map. Each of
~he practical distinction between the images is averaged down from its
such a structure and an o r d i n a r y interpo- larger p r e d e c e s s o r .
lant over an n - d i m e n s i o n a l a r r a y of sam-
ples is that the number of samples (Below:)
r e p r e s e n t i n g each level of the pyramid m a y M i p maps are i n d e x e d b y t h r e e c o o r d i n a t e s :
be different. U, V, and D. U and V are spatial c o o r d i -
nates of the map; D is the variable used
~. Mip M a p p i n g to index, and interpolate between, th~
d i f f e r e n t levels of the pyramid.
"Mip" m a p p i n g is a p a r t i c u l a r format
for t w o - d i m e n s i o n a l p a r a m e t r i c functions,
which, a l o n g with its a s s o c i a t e d address- V
ing scheme, has b e e n used s u c c e s s f u l l y to
bandlimit texture mapping at New York V
Institute of T e c h n o l o g y since 1979. The
a c r o n y m "mip" is from the Latin phrase
"multum in parvo," m e a n i n g "many t h i n g s in
a small place." Mip mapping supplements
bilinear i n t e r p o l a t i o n of pixel v a l u e s in V
the texture m a p (which may be used to
smoothly translate and m a g n i f y the tex-
ture) w i t h i n t e r p o l a t i o n between prefil- ~ L L
tered versions of the m a p (which m a y be
used to c o m p r e s s m a n y p i x e l s into a small
place). In this latter capacity, mip
offers m u c h g r e a t e r speed than texturing
algorithms which perform explicit convolu-
tion over an area in the texture map for
each pixel r e n d e r e d [I], [6].
d = max Ou 2+ v 2 _ //~u~2+/av~2~
I l l u s t r a t i o n s of m a p p i n g p e r f o r m e d by
the m i p t e c h n i q u e are the s u b j e c t of Fig-
ures (2) t h r o u g h (i0). The NYIT Test Frog
Figure (7)
in Figure (2) is m a g n i f i e d by simple point
sampling in (3), and b y interpolation in General mapping: interpolation and
(4). The h a p l e s s a m p h i b i a n is s i m i l a r l y pyramidal compression.
Figure (3) Figure (4)
Upsampling the frog: magnification by Upsampling the frog: magnification by
point samplinq. bilinear interpolation.
Figure (5)
Downsampling the frog= compression by point sampling (detail, right).
Figure (6)
Downsampling: compression by pyramidal interpolation (detail, right).
4
Figures (8)-(9)
"Sunstone" by Ed Emshwiller, segment animated by Alvy Ray Smith
Pyramidal parametric texture mapping on polygons.
Figures (i0)-(ii)
"Sunstone" by Ed Emshwiller, segment animated by Alvy Ray Smith
Pyramidal parametric texture mapping on polygons.
4. Hi@blight Antialiasin@
Figure (13)
As small or highly curved objects
move across a raster, their surface nor- .-",.. /
mals may b e a t e r r a t i c a l l y with the sam-
pling grid. This causes the shading : i'.
values to flash annoyingly in motion is
sequences, a symptom of illumination
aliasing. The surface n o r m a l s e s s e n t i a l l y
p o i n t - s a m p l e the i l l u m i n a t i o n function.
invoked, there m a y be v e r y h i g h c o n t r a s t
b e t w e e n samples w h e r e the normal is n e a r l y
parallel to the sample axis, and samples
w h e r e the normal points directly at the
o b s e r v e r ' s eye.
s p e c u l a r surface r e f l e c t i o n function. The
Figure (12) highlight indicated by the bump falls
e n t i r e l y b e t w e e n the samples. (Note that
this is o n l y p o s s i b l e on a flat surface if
either the eye or the light is local, a
4) point in space r a t h e r than simply a direc-
tion vector. Some b o r i n g shading formulae
exclude the possibility of highlight
a l i a s i n g on p o l y g o n s b y r e q u i r i n g all flat
surfaces to be flat in shading.)
If we r e p r e s e n t the i l l u m i n a t i o n of a
scene as a t w o - d i m e n s i o n a l map, h i g h l i g h t s
can be e f f e c t i v e l y a n t i a l i a s e d in m u c h the
same way as textures. Blinn and Newell
[I] d e m o n s t r a t e d specular r e f l e c t i o n using
an i l l u m i n a t i o n map. The m a p was an image
of the e n v i r o n m e n t (a s p h e r i c a l p r o j e c t i o n
of the scene, i n d e x e d by the X and Y com-
ponents of the surface normals) which
could be used to cast r e f l e c t i o n s onto
Figure (16) specular surfaces. The i m p r e s s i o n of mir-
Michael Chou (right) poses with an ima- rored facets and c h r o m e objects w h i c h can
ginary companion. Reflectance m a p s can be a c h i e v e d w i t h this m e t h o d is striking;
enhance the r e a l i s m of s y n t h e t i c shading. Figure (16) provides an illustration.
R e f l e c t a n c e m a p p i n g is not, however, accu-
rate for local reflections. To a c h i e v e
similar results with three dimensional
accuracy requires ray-tracing.
64 x 64
7. Acknowledgments
I w o u l d like to a c k n o w l e d g e Ed Cat-
mull, the first (to my knowledge) to a p p l y
multiple prefiltered images to texture
mapping: the m e t h o d was applied to the
b i c u b i c p a t c h e s in his thesis, a l t h o u g h it
was not described. Credit is also due Tom
Duff, who w r o t e b o t h r e c u r s i v e and scan-
order r o u t i n e s for c r e a t i n g mip maps w h i c h
p r e s e r v e d n u m e r i c a l p r e c i s i o n over all map
instances; Dick Lundin, who wrote the
first assembly-coded mip map accessing
routines; Ephraim Cohen, who wrote the
second; Rick Ace, who t r a n s l a t e d E p h r a i m ' s
PDP-II versions for the V A X assembler;
Paul Heckbert, for r e f i n i n g and speeding
up both c r e a t i o n and a c c e s s i n g routines,
and investigating various estimates of
"D"; Michael Chou, for implementing
h i g h l i g h t a n t i a l i a s i n g and h i g h - r e s o l u t i o n
r e f l e c t a n c e m a p p i n g on quadric surfaces.
10
8. References
[1] Blinn, J., and Newell, M., "Texture Electrical and Systems Engineering
and Reflection on Computer Generated Dept., Rensselaer Polytechnic Insti-
Images," CACM, Vol. 19, #i0, Oct. tute, October 1980.
1976, pp. 542-547.
11