i
i
i
i
i
i
i
i
576 13. Curves and Curved Surfaces
surfaces are a natural form of on the fly level of detail modeling: When the
curved object is close, generate more triangles from its equations. Also, if
an application is found to have a bottleneck in the rasterizer, then turning
up the level of detail may increase quality while not hurting performance.
Alternately, if the transform and lighting stage is the bottleneck, the tessel-
lation rate can be turned down to increase the frame rate. However, with
a unified shader architecture, such as the Xbox 360 (Section 18.4.1), these
types of optimizations do not apply.
In terms of animation, curved surfaces have the advantage that a much
smaller number of points needs to be animated. These points can then
be used to form a curved surface and a smooth surface can be generated.
Also, collision detection can potentially be more efficient and more accurate
[699, 700].
The topic of curves and curved surfaces has been the subject of entire
books [332, 569, 905, 1072, 1328]. Our goal here is to cover curves and
surfaces that are finding common use in real-time rendering. In particular,
a number of surface types are likely to become or have become a part of
graphics APIs and have direct accelerator support.
Curves and surfaces have the potential for making real-time computer
graphics applications faster, simpler to code, and last longer (i.e., survive
a number of generations of graphics hardware). With the advent of geom-
etry shaders, the programmer even gets control of deriving new primitives
in the shader. A possible problem with using this type of shader can be
that some CPU-side algorithms rely on knowing the exact geometry. For
example, the shadow volume method (Section 9.1.3) needs to use the sil-
houette edge of a model in order to generate projected quadrilaterals. If
the CPU is creating these quadrilaterals, a curve description has to also be
evaluated on the CPU to find the silhouette edges. Even with such lim-
itations, the potential quality and speed improvements offered by curved
surface descriptions makes them useful today, and future graphics hardware
promises to be more powerful and flexible.
13.1 Parametric Curves
In this section we will introduce parametric curves. These are used in many
different contexts and are implemented using a great many different meth-
ods. For real-time graphics, parametric curves are often used to move the
viewer or some object along a predefined path. This may involve changing
both the position and the orientation; however, in this chapter, we con-
sider only positional paths. See Section 4.3.2 on page 77 for information
on orientation interpolation. Another use could be to render hair, as seen
in Figure 13.1.