Graphics Reference
In-Depth Information
placement field might actually cause self-intersections, giving strange loopy
inside-out artifacts. This is fairly easy to detect—if a surface normal is
pointing downwards (has a negative
y
component) anywhere, it's a self-
intersection. These spots could be interpreted as points where the waves
got so steep and pointed that this solution breaks down, i.e., the wave is
breaking; the problem can then be plausible covered up with a procedural
foam shader, or used as an emitter for a spray and mist particle system.
13.5 Wave Parameters
We turn now to the selection of the wave parameters, the amplitudes
A
ij
and phase shifts
θ
ij
, which so far have been left as unspecified constants.
The phase shifts are straightforward: they have no special significance, and
so each
θ
ij
may be chosen as an independent uniform random number from
[0
,
2
π
]. The amplitudes, however, are a little more interesting.
The first point to make follows from the nature of the solution method
itself: if the ratio of amplitude to wavelength is too large, the approxi-
mations we made are unjustifiable and the result looks unconvincing—real
waves simply don't get that steep, and simulating very rough violent oceans
is a continuing research problem beyond this method. Therefore it makes
sense to put a limit of, say,
A
ij
O
(1
/k
). However, beyond this our
physical model doesn't give us much guidance for automatically picking a
convincing set of amplitudes; ultimately waves are driven by the wind or
by ocean currents, which we are not even considering. Tessendorf recom-
mends instead turning to phenomological models garnered from observa-
tions, such as the
Phillips spectrum
, which biases waves to align with some
chosen wind direction, but there is a lot of freedom to experiment. The
FFTs can run fast enough to give interactive feedback even on half-decent
grids (say 128
2
), allowing you to tune the amplitudes effectively.
13.6 Eliminating Periodicity
The ocean model we've defined so far often works just fine for ocean shots.
However, it is periodic: if the perspective of a shot allows the audience to
see many of these tiles, there is a chance that the periodicity will be visible
and distracting. One way of overcoming this, which in fact is a simple
trick to turn any unstructured periodic texture into a nonperiodic pattern,
is to superimpose two repeating tiles of different sizes. That is, add to