Graphics Reference
In-Depth Information
the coefficients, which is very compact. A spline patch is a surface constructed
analogously: a linear combination of several basis functions (each a function of
two variables), where the coefficients are again points. This fixed mathematical
form allows compact storage. The fact that the basis functions are carefully con-
structed, low-degree polynomials makes computations like ray-path intersection,
sampling, and determining tangent and normal vectors efficient and fast. By glu-
ing together multiple patches, we can model arbitrarily complex surfaces. (Indeed,
spline patches are at the core of most CAD modeling packages.) There are many
kinds of splines, each determined by a choice of the so-called basis polynomi-
als. Graphics commonly uses third-order polynomial patches, which let us model
surfaces with continuously varying normal vectors and no sharp corners. More
general spline types, such as Nonuniform Rational B-Splines (NURBS), have his-
torically been very popular modeling primitives. Splines may be rendered either
by discretizing them to polygons by sampling, or by directly intersecting the spline
surface, often using a root-finding method such as Newton-Raphson.
Subdivision surfaces are smooth shapes defined by recursive subdivision
(using carefully designed rules) and smoothing of an initial mesh cage (see
Figure 14.17). Because many modeling tools and many algorithms operate on
meshes, subdivision surfaces are a practical method for adapting those tools
to curved surfaces. They are especially convenient for polygon-based rendering
because the mesh need only be subdivided down to the screen-space sampling
density at each location. They have been favored for implementation in graphics
hardware over other smooth surface representations because of this. For exam-
ple, so-called tessellation, hull, and geometry shaders each map meshes to meshes
inside the graphics hardware pipeline using subdivision schemes. As with all curve
and surface representations, a major challenge is mixing sharp creases and other
boundary conditions with smooth interiors. Representations that admit this effi-
ciently and conveniently are an active area of research. At the time of this writing,
that research has advanced sufficiently that the techniques are now being used in
real-time rendering [CC98, HDD + 94, VPBM01, BS05, LS08, KMDZ09].
14.5.4 Heightfields
A heightfield is a surface defined by some function of the form z = f ( x , y ) ;it
necessarily has the property that there is a single “height” z at each ( x , y ) posi-
tion. This is a natural representation for large surfaces that are globally roughly
planar, but have significant local detail, such as terrain and ocean waves (see Fig-
ure 14.18). The single-height property of course means that these models cannot
represent overhangs, land bridges, caves, or breaking waves. By the Wise Mod-
eling principle, you should only use heightfields when you're certain that these
things are not important to you. At a smaller scale, heightfields can be wrapped
around meshes or other surface representations to represent displacements from
the surface. For example, we can model a tile floor as a plane with a heightfield
representing the grout lines. Heightfields used in this manner are often called dis-
placement maps or bump maps [Bli78]. “Height” is of course relative to our
orientation—it simply denotes distance from the base plane or surface along its
normal, so we can use a heightmap to represent the wall of a log cabin simply by
rotating our reference frame.
The height function can be implemented by a continuous representation, such
as a sum of cosine waves, or by the interpolation of control points. The latter
 
 
Search WWH ::




Custom Search