Graphics Reference
In-Depth Information
concealed by rendering a small billboard for each particle. This is similar to the
splatting operation in point-based rendering. One usually calls a dynamic object
with translucent billboards a particle system and a rigid object with opaque splats
a point set. Section 14.10 describes methods for simulating translucency for both
meshes and particles.
The billboard nature of particle systems can be revealed when the billboards
intersect other geometry in the scene. Soft particles [Lor07] are a technique
for concealing this intersection (see Figure 14.23). Soft particles become more
translucent as they approach other geometry. Proximity is determined by reading
a depth buffer during shading. The effect is particularly convincing for billboards
that have high density and little visible structure, such as smoke.
Before:
After:
14.7.4 Fog
Particles and voxels are discrete representations of amorphous volumetric shapes.
Homogeneous, translucent volumes are amenable to continuous analytic rep-
resentation. The classic application is atmospheric perspective, the relatively
small-scale scattering of light by the atmosphere that desaturates distant objects
in landscapes. A more extreme variation of the same principle is dense fog, which
may be homogeneous over all space or vary in density with elevation.
True atmospheric perspective necessarily involves exponential absorption with
distance, but it is often artistically desirable to present arbitrary control over the
absorption rate. Homogeneous fog is implemented either during shading by blend-
ing the computed shade of each pixel toward the fog color based on distance from
the viewer (e.g., in a pixel shader or employing the fixed-function glFog command
in OpenGL), or by a 2D image post-process that performs the equivalent blending
based on depth buffer values. An example of this blending to compute final color
c from distance d , original color c , fog color f , and fog density parameter
Figure 14.23: Top: The flat, dis-
crete nature of this cloud parti-
cle system's rendering billboards
is revealed where it intersects the
terrain mesh. Bottom: Adjusting
the pixel shader to use the “soft
particle” technique that fades out
the billboard's contribution with
proximity to scene geometry con-
ceals this artifact. (Credit: Cour-
tesy of Tristan Lorach, NVIDIA)
κ
is
(following the glFogf documentation)
c = c +( f
e d κ .
c )
·
(14.13)
The same approach can be applied to the scattering/attenuation of light when
the camera is underwater. Much more sophisticated models of atmospheric scatter-
ing have been developed (e.g., [NMN87, Wat90, NN94, NDN96, DYN02, HP03]);
this common exponential approximation is only the beginning.
Localized fog volumes (see Figure 14.24) can follow the same attenuation
schemes as global ones, but the distance on which they are parameterized must
measure only the extent traveled through the fog along the view ray, not the total
distance from the observed surface to the viewer. This distance is computed by
ray intersection with the bounding volume of the fog. Doing so within the shading
algorithm for each pixel is reasonable provided that the bounding volume is geo-
metrically simple. Half-plane, rectangular slab, and sphere volumes are common.
14.8 Scene Graphs
It is rare for large graphics systems to treat a scene as a single object. Instead, the
scene is typically decomposed into a set of individual objects. This allows different
model representations for different parts of a scene. It also reduces the memory
size of objects that must be processed to both better accommodate computational
 
 
 
Search WWH ::




Custom Search