i
i
i
i
i
i
i
i
Chapter 10
Image-Based Effects
“Landscape painting is really just a box of air with little marks
in it telling you how far back in that air things are.”
—Lennart Anderson
Modeling surfaces with polygons is often the most straightforward way to
approach the problem of portraying objects in a scene. Polygons are good
only up to a point, however. Image-based rendering (IBR) has become a
paradigm of its own. As its name proclaims, images are the primary data
used for this type of rendering. A great advantage of representing an object
with an image is that the rendering cost is proportional to the number of
pixels rendered, and not to, say, the number of vertices in a geometrical
model. So, one use of image-based rendering is as a more efficient way
to render models. However, IBR techniques have a much wider use than
this. Many objects, such as clouds and fur, are difficult to represent with
polygons. Layered semitransparent images can be used to display such
complex surfaces.
In this chapter, image-based rendering is first compared and contrasted
with traditional polygon rendering, and an overview of algorithms pre-
sented. Commonly used techniques such as sprites, billboards, particles,
and impostors are described, along with more experimental methods. Opti-
mizations are described for when the camera and scene are mostly
static.
At the same time, there is more involved in making an image than
simply portraying objects. We may wish to post-process synthesized data
in a wide variety of ways. Image processing techniques are explained for
performing tone mapping, high dynamic range effects, motion blur, depth
of field, and other phenomena. The chapter ends with two related top-
ics, atmospheric effects and using three-dimensional volumetric data for
modeling objects.
439
i
i
i
i
i
i
i
i
440 10. Image-Based Effects
Figure 10.1. The rendering spectrum. (After Lengyel [763].)
10.1 The Rendering Spectrum
The goal of rendering is to portray an object on the screen; how we at-
tain that goal is our choice. There is no single correct way to render a
scene. Each rendering method is an approximation of reality, at least if
photorealism is the goal.
Polygons have the advantage of representing the object in a reasonable
fashion from any view. As the camera moves, the representation of the
object does not have to change. However, to improve quality, we may wish
to substitute a more highly detailed model as the viewer gets closer to the
object. Conversely, we may wish to use a simplified form of the model
if it is off in the distance. These are called level of detail techniques (see
Section 14.7). Their main purpose is to make the scene display faster.
Other rendering and modeling techniques can come into play as an
object recedes from the viewer. Speed can be gained by using images
instead of polygons to represent the object. It is often less expensive to
represent an object with a single image that can be sent quickly to the
screen. One way to represent the continuum of rendering techniques comes
from Lengyel [763] and is shown in Figure 10.1. We will first work our way
from the left of the spectrum back down to the more familiar territory on
the right.
10.2 Fixed-View Effects
For complex geometry and shading models, it can be expensive to rerender
an entire scene at interactive rates. Various forms of acceleration can be
performed by limiting the viewer’s ability to move. The most restrictive
situation is one where the camera is fixed in position and orientation, i.e.,
does not move at all. Under such circumstances, much rendering can be
done just once.
For example, imagine a pasture with a fence as the static scene, with
a horse moving through it. The pasture and fence are rendered once and
Get Real-Time Rendering, Third Edition, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.