Graphics Reference
In-Depth Information
Alternatively, water can be modeled as a smoothly rolling height field in which time-varying ripples are
incorporated into the geometry of the surface [ 12 ] . In ocean waves, it is assumed that there is no trans-
port of water even though the waves travel along the surface in forms that vary from sinusoidal to
cycloidal [ 6 ][ 15 ] . 1 Breaking, foaming, and splashing of the waves can be added on top of the base
model in a postprocessing step [ 6 ][ 15 ]. The transport of water from one location to another adds more
computational complexity to the modeling problem [ 10 ] .
Still waters and small-amplitude waves
The simplest way to model water is merely to assign the color blue to anything below a given height.
If the y -axis is “up,” then color any pixel blue (with, for example, an illumination model that uses a
consistent normal) in which the world space coordinate of the corresponding visible surface has a
y -value less than some given constant. This creates the illusion of still water at a consistent “sea level.”
It is sufficient for placid lakes and puddles of standing water. Equivalently, a flat blue plane perpen-
dicular to the y -axis and at the height of the water can be used to represent the water's surface. These
models, of course, do not produce any animation of the water.
Normal vector perturbation (the approach employed in bump mapping) can be used to simulate the
appearance of small amplitude waves on an otherwise still body of water. To perturb the normal, one or
more simple sinusoidal functions are used to modify the direction of the surface's normal vector. The
functions are parameterized in terms of a single variable, usually relating to distance from a source point.
It is not necessarily the case that the wave starts with zero amplitude at the source. When standing waves
in a large body of water are modeled, each function usually has a constant amplitude. The wave crests can
be linear, in which case all the waves generated by a particular function travel in a uniform direction, or
the wave crests can radiate from a single user-specified or randomly generated source point. Linear wave
crests tend to form self-replicating patterns when viewed from a distance. For a different effect, radially
symmetrical functions that help to break up these global patterns can be used. Radial functions also sim-
ulate the effect of a thrown pebble or raindrop hitting the water ( Figure 8.1 ) . The time-varying height for a
point at which the wave begins at time zero is a function of the amplitude and wavelength of the wave
( Figure 8.2 ). Combining the two, Figure 8.3 shows the height of a point at some distance d from the start
of the wave. This is a two-dimensional function relative to a point at which the function is zero at time
zero. This function can be rotated and translated so that it is positioned and oriented appropriately in
world space. Once the height function for a given point is defined, the normal to the point at any instance
in time can be determined by computing the tangent vector and forming the vector perpendicular to it.
These vectors should then be oriented in world space, so the plane they define contains the direction that
the wave is traveling.
Superimposing multiple sinusoidal functions of different amplitude and with various source points
(in the radial case) or directions (in the linear case) can generate interesting patterns of overlapping
ripples. Typically, the higher the frequency of the wave component, the lower the amplitude. Notice
that these do not change the geometry of the surface used to represent the water (e.g., a flat blue plane)
but are used only to change the shading properties. Also notice that it must be a time-varying function
that propagates the wave along the surface.
The same approach used to calculate wave normals can be used to modify the height of the surface
(e.g., [ 11 ] ). A mesh of points can be used to model the surface of the water and the heights of the
1 A cycloid is the curve traced out by a point on the perimeter of a rolling disk.
 
Search WWH ::




Custom Search