Title: Simulation and Rendering of Real-Time Breaking Waves
1Simulation and Rendering of Real-Time Breaking
Waves
- Adam Lake, David Reagin, John Van Drasek
- Intel Software Solutions Group (SSG)
- Modern Game Technologies Project
- 2/27/2005
2Motivation
We arrive at the truth, not by the reason only, but also by the heart. -- Blaise Pascal
- Great real-time results for deep ocean but what
about close to shore? - Sum of Sines Isidoro02, Finch04
- Tessendorf, etc. Tessendorf01
- Little work on breaking waves in computer
graphics! - Animation and Control of Breaking Waves
Mihalef04 - Navier Stokes and store
- None emphasize real-time breaking waves
3Getting water right requires
- Geometry
- Overall shape must be correct
- Shading
- Lighting and shading
- Additional Geometry/Texture
- Capillary waves, foam, etc. must be modeled
4Goal
- Get the geometric solution to look right
- Shading and additional geometry are areas of
future work - Good candidates for vertex and pixel shaders
- If geometry is correct, not as important to
interact with shading and lighting values
5Basic Algorithm
- 3 passes over 2D Grid
- Deep Wave Simulation
- Shallow Wave Simulation
- Curling of Wave
- Classify portions of waveform
- Modify shape based on this classification
- Curling breaks height field
6Part I of III Deep Ocean Simulation
7Deep Ocean Simulation
- Based on Sum of Sines approach of Finch04,
Isodoro02 - Summation of N waves to simulate Ocean Surface
(N4 for us) - 4 good candidate for SSE optimization!!
- x dependent upon wind direction, velocity,
wavelength of wave
8Normal Generation
- 2 techniques
- Derivates as presented in Finch04
- Good for GPU implementations
- Possible to make faster with trig lookup tables
- Compute face normals, then average
- Faster than Option 1 on CPU implementations
- Must use neighbor list to get performance
- Brute force method was painfully slow!
9Wave Speed and Wavelength Relationship for Deep
Ocean Waves
Eqn. from Garrison02
10Wavelength to Velocity Relationship for Deep Waves
Figure from Garrison02
11Deep Ocean Wave Demo
12Nature vs. Your Next Big Hit
- Even these functions are on average, many
parameters can effect wavelength, velocity,
direction, etc. - While in nature there are observed
relationshipsthe model gives user control over
surface parameters - Ignoring these relationships is fine to tune your
deep ocean for your environment
13Threading Lake05
- Task Level Decomposition
- Thread A Simulated Game Workload
- Thread B Compute Wave
14Performance with threading
15Part II of III Shallow Wave Simulation
16Breaking Waves
Image from Seafriends.
17Shallow Wave Observations
- Same variables as deep wave
- Wavelength, steepness, velocity,
- Wavelength
- Decreases as we approach shore
- Specifically, at a depth of ½ wavelength
- Steepness
- Increases as we approach shore
- Fix velocity to maintain phase
- Recall wavelength and speed are dependent
- If you dont do this waves will be incorrect
- Adjust height
- Attempt to preserve water column as it collapses
18Shallow Wave Algorithm
- Input position, wavelength, steepness,
position, distance to shore, sealevel, and
distance to ocean floor as input - Output New vertex position in shallow wave
simulation - For each point,
- Determine Deep Ocean wave position from Section
I. - Based on this position
- Adjust wavelength
- Wavelength varies linearly from lamba to ½ lambda
in our example - Adjust Steepness
- In our example steepness varies from x to y in
our demo - Fix Velocity to Maintain phase
- For velocity solve
- Adjust Height as it attempts to maintain water
column - Collapse of water column is what causes break
- Calculate new position using modified values as
input to deep ocean simulation equation!
19Shallow wave speed and wavelength relationship
Eqn. from Garrison02
20Shallow Waves demo!
Image from Seafriends04
21Part III of III Breaking Waves!
22Breaking Waves
Image from Seafriends.
23Types of Breaking Waves
Image from Mead03
24Side view of breaking wave
Image from Miller76
25Side view of breaking wave after collapse
Image from Miller76
26Breaking Waves
- When waves reach a point that the wavelength is a
factor of 1/7 of waveheight, the wave breaks
Seafriends. - Dependent on slope, composition, wind velocity,
etc. - In our implementation, user can vary parameters
27The Vortex
Image from Mead03.
28Vortex Ratio
- Ratio of length to width in practice is often
between 1.73 and 4.43 Mead03.
29Cubic form of vortex
- Cubic form of Vortex is expressed as
Longuet-Higgins82
Note Not actually needed for implementation!
30Classification of surfing wave breaking Intensity
31Breaking Algorithm
- Input is positions from shallow wave simulation
- Pass 3 of the algorithm
- Pass 1 deep wave
- Pass 2 shallow wave
- Pass 3 curling
32Breaking Algorithm Overview
- For every timestep t
- Move vortex forward as wave moves forward
- For each vertex
- Classify based on type
- Project point towards vortex based on type,
height, and distance to shoreline
33Wave Breaking Algorithm
- Classify vertex state
- TOP, BACK, FRONT, FLAT
- Floating point gotchas, especially FLAT!
34So, how do we approximate this shape?
Image from Mead03.
35Vortex Approximation
- Using 2D Circle as attractor
- Pulls vertices based on
- Distance from shore
- Height from sealevel
- Desired vortex shape
- Sphere moves towards sealevel as we move into
shore - Sphere decreases in size as we move toward shore
36Image of Vortex Sizes, etc.
37Wave Breaking Algorithm
- Switch(vertex_state)
- TOP or FRONT
- Obtain 2D Circle Position
- Midpoint between FRONT of back wave and BACK of
front wave - To simulate Vortex, project towards circle based
on vertex height - BACK
- Interpolate to remove gap
- FLAT
- Nothing
38Results 1/3
Only showing FRONT and TOP
39Results 2/3
40Results 3/3
41Breaking Wave Demo!
42Areas of Future Work
- Work in Progress
- Lighting and shading
- Foam
- Interaction with outside environment
- Modify ocean floor
- Ready but not complete
- Model is not restricted to waves coming in
straight ondemonstrate this - Stage IV In the surf
43Acknowledgements
- Kim Pallister and Pete Baker for giving the
resources and time to work on this project. - Jacob Anderson (jwa_at_beyond-ordinary.com) at
Beyond Ordinary Software Solutions for useful
pointers and early discussion. - Discussions with Dean Macri on vortex simulation.
- Useful discussions with Stephen Junkins, Allen
Hux, Kim Pallister, William Hachfeld_at_SGI. - Allison Knowles for title, poster, and
acknowledgement photographs.
44References 1 of 2
- Black98 Black, K. P., J. A. Hutt S. T. Mead,
1998. Narrowneck Reef Report 2 Surfing Aspects.
Technical Report prepared for the Gold Coast City
Council, June,1998. - Cohen98 Aaron Cohen and Mike Woodring. Win32
Multithreaded Programming. OReilly and
Associates. 1998. - Gomez00 Miguel Gomez. Interactive Simulation of
Water Surfaces. Game Programming Gems 1. Edited
by Mark Deloura. Pages 187-194. - Finch04 Mark Finch. Effective Water Simulation
from Physical Models. GPU Gems Programming
Techniques, Tips, and Tricks for Real-Time
Graphics. Edited by Randima Fernando. Pages 5-29.
2004. - Garrison02 Tom Garrison. Oceanography An
Invitation to Marine Science. Wadsworth/Thomson
Learning. 2002. http//www.seafriends.org.nz/ocea
no/waves.htm - Giancoli85 Douglas Giancoli. Physics,
Principles with Application, 2nd edition.
Prentice Hall, Inc. 1985. - Isidoro02 John Isidoro, Alex Vlachos, and Chris
Brennan. Rendering Ocean Water. Direct3D ShaderX
Vertex and Pixel Shader Tips and Tricks. Pages
347-356. 2002. - IMDB04 Credits for Titanic. http//us.imdb.com/t
itle/tt0120338/. - Lake05 Adam Lake and David Reagin. Real-Time
Deep Ocean Wave Simulation On Multi-Threaded
Architectures. Intel developer services
www.intel.com/ids . - Longuet-Higgins76 M.S. Longuet-Higgins,E.D.
Cokelet. The Deformation of Steep Surface Waves
on Water. I. A Numerical Method of Computation.
Proceedings of the Royal Society of London.
Series A, Mathematical and Physical Sciences,
Vol. 350, No. 1660 (Jul 30, 1976), 1-26.
45References 2 of 2
- Longuet-Higgins80 M.S. Longuet-Higgins, A
Technique for Time-Dependent Free-Surface Flows.
Proceedings of the Royal Society of London.
Series A, Mathematical and Physical Sciences,
Vol. 371, No. 1747, Aug. 4, 1980. Pages 441-451. - Longuet-Higgins82 M.S. Longuet-Higgins.
Parametric Solutions for Breaking Waves. J.
Fluid Mechanics, 1982, vol. 121, pp. 403-424. - Mead03 Shaw Mead. Keynote Address Surfing
Science. Proceedings of the 3red International
Surfing Reef Symposium, Raglan, New Zealand.
June 22-25, 2003. P. 1-36. - Mihalef04 Viorel Mihalef, Dimitris Metaxas,
Mark Sussman. Animation and Control of Breaking
Waves. Eurographics/ACM SIGGRAPH Symposium on
Computer Animation, 2004. - Miller76 Miller R.L. Role of Vortices in Surf
Zone prediction sedimentation, and wave forces.
Beach and Nearshore sedimentation, pp. 92-114,
1976, Tulsa, Oklahoma. Soc. Of Economic
Paleontologists and Mineralogists. - Miller76 Miller R.L..
- Mead Shaw Mead and Kerry Black. Predicting the
Breaking Intensity of Surfing Waves. Special
Issue of the Journal of Coastal Research on
Surfing (in press). Pages 103-130.
www.asrltd.co.nz/Paper4Web.pdf . - Schneider01 Jens Schneider and Rudiger
Westermann. Towards Real-Time Visual Simulation
of Water Surfaces. VMV 2001, Stuttgart, Germany,
Nov. 21-23, 2001. - Tessendorf01 Simulating Ocean Water.
SIGGRAPH2001 Course Notes. 2001. - QuickMath04 http//www.quickmath.com/. November
4, 2004.
46Backup
47- Irribarren Numbercite
- B is slope
- Hb/Linf ratio of wave height to wavelength
48Wave Energy as a function of Period
49(No Transcript)
50(No Transcript)
51- When each vertex of wave reaches breaking point
- Classify vertex as FRONT, BACK, BOTTOM, TOP of
waveform - FRONT, BOTTOM and TOP are projected towards
virtual sphere to create vortex - As wave approaches shore
- Sphere decreases in size as wave approaches
shore. - Vertices increase their attraction to sphere
- BACK are projected to create natural arc on back
of wave
52(No Transcript)
53Breaking
- Takes as input the shallow wave that reaches the
breaking point - Curl front of waveform to simulate crash
- Back follows
54Velocity and wavelength are related
Image from Seafriends