Sei sulla pagina 1di 8

Fourier Synthesis of Ocean

Scenes
Gary A. Mastin, Peter A. Watterberg,*
and John F. Mareda
Sandia National Laboratories

S cene synthesis has become very popular in having added noise. Ocean waves, however, are not
commercial movie production, flight simulators, simple sinusoids or the superposition of simple
architectural planning, and the graphic presentation of sinusoids. Neither are they fractal surfaces having the
mathematical entities. In the quest for realism, the art of same fractal dimension in all directions. They are
scene synthesis has progressed from line drawings to complex waveforms born of the momentum transfer
shaded polygon tilings to fractal surfaces. Fractal from wind. Ocean waves develop changing profiles due
terrains"3 represent a major step in our ability to to fetch (the distance along open water over which the
synthesize natural-looking landscapes. Natural scenes, wind blows), air-sea temperature difference, variations
however, consist of more than landforms. Water plays an in surface roughness, and alterations in the vertical wind
important role. profile. Furthermore, they transfer energy between
Past attempts at rendering water have been hampered
by overly simplistic views of water. Max4 and
Schachter5 had some success at modeling ocean waves 'Peter Watterberg is currently employed at the Savannah River Laboratory,
as the sum of a limited number of sinusoids, possibly which is run by Dupont for the Department of Energy.

16 0272-1716/87/0300-0016$01.00 1987 IEEE IEEE CG&A


spectral frequencies in a nonlinear fashion, making most
linear models rough approximations, at best. Seas
should not be looked upon as deterministic entities,
rather as statistical processes. In this article, seas are
viewed as filtered white noise.
Voss2 has presented a method of generating fractal
scenes by filtering white noise with a 1/f noise (Power
law) filter. The rationale is that fractal geometries, with
their "self-similarity" over a wide range of scales, can be
characterized by Power law filtering which introduces
correlations over a wide range of scales. Stated another
way, fractal geometries look similar at different scales
despite small differences in detail. The same is true for
Power law filtered random-number signals.
Voss' landscape pictures in Mandelbrot's book,' and Figure 1. Mountain lake scene was created from a 1/f
the mountain lake scene in Figure 1 were generated by filtering of a random intensity image, and rendered
filtering the magnitude of the fast Fourier transform by a ray-tracing program (written by Watterberg). The
(FFT) with a 1/f filter designed to give the desired fractal mountains, clouds, and water texture were made from
dimension, then inverse transforming and rendering by the same white-noise image.
a ray-tracing algorithm. The frequency response of the
filter is shown in Figure 2. Note the dominance of the

1/f NOISE FILTER


FRACTAL DIMENSION IS 2.1
SP1000-

500000-

400000-

3 300000-
0

200000-

100000 -

0
0.000 0.005 0.010 0.015 0.0200. 0.025 0.030
FREQUENCY (Hz)

Figure 2. The frequency response of the 1/f filter used in generating the mountains in Figure 1. The lower
frequencies correspond to the basic shape of the mountains while the higher frequencies give them roughness.
March 1987 17
MODIFIED 1/f NOISE FILTER
FRACTAL DIMENSION IS 2.1
300

260

200

w
¢ 150 \
0
0.

100

60

O-
0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50
FREQUENCY (Hz)

Figure 3. The same 1/f filter as in Figure 2, but with Gaussian attenuation of the lower frequencies.

lower frequencies. We suggest that a fractal roughness The model


could be generated by attenuating the lower frequencies,
with the peak frequency occurring at the spatial In 1964, Pierson and Moskowitz8 developed a model
frequency corresponding to the desired "fineness" of the for the spectrum of fully developed wind seas. A fully
roughness pattern. Figure 3 shows the frequency developed wind sea is a stage in the growth of a wind-
response of the filter in Figure 2 with the lower driven ocean where, given a constant wind velocity and
frequencies attenuated by a Gaussian response. (The an adequate fetch and duration, the spectrum will no
Gaussian was simply forced to fit at the peak frequency.) longer grow. This model was based on 460 ship-recorded
The filtered white-noise image was used to give the water wave records selected from a data-base of over 1000
in Figure 1 its specular texture. records collected over five years, which were judged to
The attenuated 1/f filter generates a roughness pattern, be records of fully developed wind seas.9 The modeled
but it is not suited for synthesizing ocean water. These spectrum may be stated mathematically,
patterns don't display the long-crestedness inherent in 2
real ocean waves. A more realistic method of creating
ocean waves from white-noise images is required. The
FpM(f) - g__24
technique outlined in this article uses an empirical wind- (27r) f
driven sea spectrum model to filter white-noise images.
Again, our interest is to synthesize fully developed seas
in deep water rather than to synthesize seas in shallow
water where effects like wave refraction and wave
exp[ -(5/4)(f /f)4 ] (1)
breaking exist. Shallow water coastal scene synthesis
was covered by Peachey,6 and also by Fournier and where FpM(fl downwind power spectrum, f = fre-
=

Reeves.7 quency in Hz, fm peak frequency in Hz, a = Phillips


=

18 IEEE CG&A
constant = 0.0081, and g = gravitational constant. The al.13 differs from the more traditional cos20 distribution
peak frequency fm is directly related to the wind speed in two ways. First, it creates a narrower profile near the
at a height of 10 m above the sea surface, u1o, by the peak frequency in the downwind direction of the spec-
expression, trum. This modification is in keeping with additional
experimental evidence. Secondly, it attenuates the peak
fm = 0.13 g / u10 . (2) frequency and forms a bimodal spectrum shape for
The significance of this model is that the one- angles nearing 90 degrees from downwind. The effect is
dimensional (in the direction of the wind) spectrum of to suppress the long-crested peak frequency components
a fully developed wind sea may be calculated from Equa- that would run parallel to the wind direction, while
tion 1 using the wind speed, ul0. retaining nonpeak frequency components.
The assumptions inherent in Equations 1 and 2 should A one-dimensional profile of the modified Pierson-
be stated. First, we are assuming fetch-limited wave Moskowitz spectrum computed for a wind speed of 15
growth in deep water with a constant wind field. Fetch- m/s is shown in Figure 4. This profile was extracted in
limited wave growth is divided into three time stages: an the downwind direction which, in this case, was 45
initial growth stage, a transitional stage, and a late stage degrees. Note that the frequency axis has been normal-
where growth is strongly reduced. The latter stage ized by fm and is therefore nondimensional. This is
applies here and is referred to as a fully developed wind- done to provide a reference spectrum often used to com-
sea state. The upper limit of a fully developed sea is wave pare a variety of empirical data. The frequency scale
breaking, a condition not covered here. independence should not be misunderstood as a betrayal
Second, aerodynamic drag does not remain constant, of the physical parameters, which are assumed in the
but changes with wind speed and sea state.10'11 A con- model and are scale sensitive.
stant drag coefficient of C1o = 1.8x1O- assumed here is Probably the most significant reason for performing
valid for a wind speed ulo = 15 m/s. It is approximately frequency normalization when comparing empirical
valid for wind speeds between and 10 and 20 m/s. data is fetch. The fetches generating empirical data,
The Pierson-Moskowitz spectrum, with minor modifi- whether from the field or in laboratory experiments, are
cations,12 is still considered to be a valid model for fully "long," but "long" is a relative term. Komen et al.'2 note
developed seas. Hasselmann et al.'3 suggested a two- that the high frequency part of a fully developed sea spec-
dimensional spectrum, trum is nearly fetch independent. This is not true for the
lower frequencies. The peak frequency varies inversely
F(f,O) = FPM(f) D(f,O), (3) with fetch, however, within the wind speed limits of 10
to 20 m/s, the shape of the fully developed wind-sea
based on the Pierson-Moskowitz model, where D(f,e) is spectrum does not vary appreciably. Normalizing by the
a directional spreading factor that weights the spectrum peak frequency becomes a standardization technique for
at angles 0 from the downwind direction. The spreading generating a reference spectrum.
factor is defined by the relations,
D(f,O) = N -1 cos2p(0/2) (4) Implementation
p
Synthetic ocean images may be generated from white-
where noise images in a very straightforward manner using the
forward FFT, a filter based on Equation 3, and the inverse
p = 9.77 (f/fm) FFT. These steps were implemented on a VAX 11/750
minicomputer. The FFT used here is a mass store two-
4.06 dimensional FFT provided in the IEEE signal-
processing package.14
As= { (5) The white-noise image is generated by adding uni-
-2.34 f > fm formly distributed noise, having intensities between
-127 and 127, to a constant intensity image of gray level
128. This results in random gray shades between 0 and
and the normalization constant 255, inclusive. Figure 5 is an example. A two-dimensional
forward FFT is performed on the image to generate a
N -
2 1-2pn r(2p+1)/r2(p+1) (6) magnitude and a phase image. The result of the FFT is
a complex number file. The magnitude and phase
images are created by the operations,
is defined such that J,-r
DdO - 1.
MAG = SQRT( REAL2 + IMAGINARY2 ) (7)
The frequency associated with the peak power is f11
The spreading function suggested by Hasselmanrn et and
March 1987 19
MODIFIED PIERSON-MOSKOWITZ SEA SPECTRUM
WIND VELOCITY = 15 m/s AT 10 m HEIGHT
DOWNWIND
1-

0.8-

cc
w

o 06-

w
N

< 0.40

0
z

0.2

0 0.5 1 1.5 2 2.5

FREQUENCY / PEAK FREQUENCY


Figure 4. The modified Pierson-Moskowitz spectrum computed for a wind speed of 15 rn/s.

PHASE -
Arctan ( IMAGINARY / REAL ), (8)

respectively. Only the magnitude image will be filtered.

An interesting property of the FFT of a white-noise


image is that the magnitude is a white-noise image. All
frequencies are present, as shown in Figure 6.

The next step is to filter the FFT magnitude. This is


done in the Fourier domain by multiplying the magni-
tude by D(f,6). The filter is shown in Figure 7 for a wind

speed of 15 degrees. The long-crestedness of


in/s at 45

the resulting image is emphasized by the passing of fre-


quencies around fm at 45 and 225 degrees (white) and
the attenuation of the same frequencies at 135 and 315

degrees (black). The filter is normalized in power to pro-


vide a gain of one. It is normalized in frequency and
therefore independent of scale.
The filtered FFT magnitude and the original phase are
then inverse transformed to create a synthesized wave

image. The result of processing the white-noise image in


Figure 5. A white-noise image with intensities uni- Figure 5 is shown in Figure 8. People who have flown
formly distributed between 0 and 255, inclusive, over seas should appreciate the realism of this image.

20 IEEE CG&A
Figure 6. The FFT magnitude of the image in Figure Figure 7. The Fourier-domain filter based on the
5. modified Pierson-Moskowitz spectrum model for u10
= 15 m/s at 45 degrees.

Ocean scene animation


A sequence of images portraying wave motion can be
animated by manipulating the FFT phase. The simplest
manipulation is based on the translation property of the
Fourier transform which is'5

,[f(x-x0) ) = exp(-jwx0)F(w) (9)


This implies that a one-dimensional signal may be trans-
lated in the spatial domain by multiplying the Fourier
transform of the signal by a linear phase component. For
each movie frame, xO would be incremented, thereby
changing the slope of the linear phase and translating the
signal at a constant rate. This is a very unrealistic manip-
ulation since each frame is a translated carbon copy of
the preceding one. Realistic wind-driven seas gradually
change their structure with time without altering their
fundamental periodicity. Two more sophisticated phase
manipulation techniques are presented here: One is ad
hoc, and the other is based on the deep water model for
gravity wave propagation.
The ad hoc technique will be presented first because Figure 8. The synthesized ocean image created by
of its recent use in the SIGGRAPH '86 movie "Hot Air," processing the white-noise image in Figure 5.
(produced by J. Mareda, available from ACM). Since
changing the derivative (slope) of the linear phase by a
constant amount per frame produces translated carbon two-thirds of the energy of the peak frequency fm. The
copy frames, why not shift frequency components dominant components were shifted independently of
around the peak frequency by a constant different from the surrounding components. The choice of how much
the surrounding frequencies? We defined dominant fre- to shift the dominant components relative to the sur-
quency components as those frequencies bounded by rounding frequencies was then decided by trial and
March 1987 21
error. In "Hot Air," the surrounding frequencies were smaller boxes for successive refinement. This is essen-
moved 0.003 radians per frame, while the dominant fre- tially a quadtree structure where each node contains the
quency components were shifted 0.05 radians per frame. maximum height value for all its subtrees.
Keep in mind that all shifts must be less than it radians To test a ray against the quadtree, start by pushing the
to avoid aliasing. root node (a box enclosing the entire height field) on a
The second phase manipulation technique takes consideration stack. Iterate as follows: Pop the top node
advantage of our idea of shifting different frequency on the consideration stack and test the ray against it. If
components by different amounts based on a model. A the ray is not entirely above the box, from one to three
well-known formula for the phase velocity of gravity of its offspring (determining which ones is a two-
waves in deep water is16 dimensional problem) are pushed on the stack (farthest
first, since we want to consider it last).
2 If the stack becomes empty, the ray doesn't intersect
c g/k (gX)/(2w) (10) the surface. If a leaf is reached, the ray must actually be
intersected with the surface. Rather than intersect the ray
where c = phase velocity, g = acceleration due to gravity, with a bilinear patch defined by four neighboring points,
A = wavelength, and k = wave number (spatial fre- the approximation presented by Coquillart and
quency). Gangnet18 is used here. Normals are obtained from the
The phase velocity c is dependent upon the wave- bilinear patches and interpolated between patches to
length (or spatial frequency), which becomes the mech- remove visual discontinuities at patch boundaries.
anism for shifting the FFT phase. By assigning a scale For the lighting model, the inherent blue color in the
to the image i.e. how many m/pixel (looking straight
- water contributes 30 percent and the reflected environ-
down on the scene, disregarding perspective) we can
- ment 70 percent. Incorporation of Fresnel's law into the
convert c from m/s to radians/s. For video sequences, reflectance model would probably enhance image qual-
we have 30 frames/s, so we can apply the appropriate ity. The images are adaptively antialiased with 16 extra
phase shift c, in radians/frame, to the FFT phase and rays per pixel in the neighborhood of large color discon-
thereby properly model wave motion. We applied this tinuities. Figures 1 and 9 were rendered at a resolution
technique and generated realistic looking sea ani- of 1217x811 pixels, antialiased, on a VAX 8600. Both
mations. images required approximately one hour of CPU time.
Processing times were monitored for the single scenes
generated by the ad hoc technique. The times for the
wave dispersion model animation are comparable. The
times for the forward FFT, filtering, and inverse FFT
were on the order of five minutes, a few seconds, and five
minutes, respectively, for an ELXSI 6400 (10-processor
configuration). The FFT times include the time for creat-
ing magnitude, phase and image files and with the
forward FFT, creating a log-encoded magnitude image Summary
(which was useful for viewing intermediate results, but
unnecessary in an actual application). A technique for synthesizing wind-driven seas in
computer-generated imagery was presented, based on an
empirical model for wind-driven sea spectra. When ren-
The ray-tracing image rendition dered with a ray-tracing program, these synthesized
The synthetic ocean waves are presented here in scenes produce remarkably realistic images. The tech-
images produced with experimental ray-tracing software nique has been extended to generate animated wave
that we developed. The data are represented as a motion sequences by processing the Fourier phase.
512 x 512 array of height values. The technique for inter- Several schemes for modifying the Fourier phase were
secting a ray with ocean wave height field is the same as tried, and the scheme of shifting the dominant wave fre-
the one used for intersecting the terrain, since they are quencies independent of shifting the entire wave ensem-
essentially the same data structure. ble proved to be useful in generating animated sequences
To intersect a ray with a height field, the ray is inter- for video presentation.
sected with a series of bounding boxes (or extents) that As a final point, the simplicity of synthesizing complex
are successively finer approximations to the surface. ocean data from a few parameters is especially attractive.
While similar to the method presented by Kajiya,17 it One simply supplies a uniformly distributed random
differs in that these extents are rectangular in cross sec- noise generating program with a random noise seed, a
tion while Kajiya's are triangular. Since all the sides of wind direction, and a wind speed. Animated sequences
the boxes are parallel to the x-, y-, and z-axes, the inter- require only the additional specification of one or two
sections are trivial and fast. Each box is divided into four phase shifting parameters. U
22 IEEE CG&A
Acknowledgments
We would like to thank D.C. Ghiglia for his many help-
ful hints and his advice for performing the signal
processing. We would also like to thank two unknown
reviewers for their constructive criticism and suggestion
to apply the wave dispersion model. This work was per-
formed at Sandia National Laboratories, Albuquerque,
NM, a prime contractor to the US Department of Energy,
under contract DE-AC04-76DP00789.

Figure 9. The ray-traced rendition of the Fourier-


synthesized image in Figure 8. Several features have
been added to make the scene more appealing.
References
1. B.B. Mandelbrot, The Fractal Geometry of Nature, WH. Freeman, 16. A. Sommerfeld, Mechanics of Deformable Bodies, Lectures on The-
New York, 1983. oretical Physics, Vol. 11, Academic Press, New York, 1950.
2. R.F. Voss, "Fourier Synthesis of Gaussian Fractals: lf Noises, Land- 17. J.T. Kajiya, "New Techniques for Ray Tracing Procedurally Defined
scapes, and Flakes," in State of the Art in Image Synthesis, Tutorial Objects," Computer Graphics (Proc. SIGGRAPH 83), July 1983, pp.
No. 10, SIGGRAPH 1983, ACM, New York, 1983. 265-274.
3. A. Fournier, D. Fussell, and L. Carpenter, "Computer Rendering 18. S. Coquillart and M. Gangnet, "Shaded Display of Digital Maps,"
of Stochastic Models," Comm. ACM, June 1982, pp. 371-384. IEEE CG-A, July 1984, pp. 35-42.
4. N.L. Max, "Vectorized Procedural Models for Natural Terrain:
Waves and Islands in the Sunset," Computer Graphics (Proc. SIG-
GRAPH 81), Aug. 1981, pp. 317-324.
Biographies
5. B. Schachter, "Long Crested Wave Models for Gaussian Fields,"
Computer Graphics and Image Processing, Feb. 1980, pp. 187-201. Gary Mastin's biographical information may be found at the begin-
ning of this issue in "About the Cover."
6. D.R. Peachey, "Modeling Waves and Surf," Computer Graphics
(Proc. SIGGRAPH 86), Aug. 1986, pp. 65-74.
7. A. Fournier and W.T. Reeves, "A Simple Model of Ocean Waves," Peter Watterberg is a senior staff analyst at the Savannah River Labora-
Computer Graphics (Proc. SIGGRAPH 86), Aug. 1986, pp. 75-84. tory, which is run by Dupont for the Department of Energy. He sup-
8. W.J. Pierson and L. Moskowitz, "A Proposed Spectral Form for ports various graphics applications from finite element analysis to
Fully Developed Wind Seas Based on the Similarity Theory of S.A. data plotting and presentation graphics. He was previously a mem-
Kilaigorodskii," J. Geophysical Research, Dec. 1964, pp. 5181-5190. ber of the technical staff at Sandia National Laboratories where he
served in a similar capacity. At every opportunity he spends time
9. L. Moskowitz, "Estimates of the Power Spectrums for Fully Devel- generating surreal computer images.
oped Seas for Wind Speeds of 20 to 40 Knots," J. Geophysical Watterberg received his BS degree in mathematics from the Univer-
Research, Dec. 1964, pp. 5161-5179. sity of Illinois in 1977.
10. S.A. Hsu, "A Mechanism for the Increase of Wind Stress (Drag)
Coefficient with Wind Speed over Water Surfaces: A Parametric JlComputer
John Mareda is a staff member in the Applied
Model," J. Physical Oceanography, Jan. 1986, pp. 144-150. Graphics Division at Sandia National
11. N.E. Huang et al., "A Study of the Relationship Among Wind Laboratories in Albuquerque, New Mexico. His
Speed, Sea State, and the Drag Coefficient for a Developing Wave primary responsibility is providing system sup-
Field," J. Geophysical Research, June, 1986, pp. 7733-7742. port for graphics software on all of Sandia's
mainframe computer systems. He also has imple-
12. G.J. Komen, S. Hasselmann, and K. Hasselmann, "On the Exis- >1_a mented a video animation system for use at the
tence of a Fully Developed Wind-Sea Spectrum," J. Physical Ocean- laboratories. He uses it in his spare time to cre-
ography, Aug. 1984, pp. 1271-1285. ate computer generated animations such as those
described in this article.
13. D.E. Hasselmann, M. Dunckel, and J.A. Ewing, "Directional Wave Mareda received a BSEET from Missouri Institute of Technology
Spectra Observed during JONSWAP 1973," J. Physical Oceanog- in 1976 and an MSEE from the University of New Mexico in 1979.
raphy, Aug. 1980, pp. 1264-1280.
14. Digital Signal Processing Committee, IEEE Acoustics, Speech and
Signal Processing Soc., ed., Programs for Digital Signal Process-
ing, IEEE Press, New York, 1979.
The authors can be contacted through the Digital Image Process-
15. A. Antoniou, Digital Filters: Analysis and Design, McGraw-Hill, ing Facility at Sandia National Laboratories, PO Box 5800, Organi-
New York, 1979, p. 139. zation 2643, Albuquerque, NM 87185.

March 1987 23

Potrebbero piacerti anche