Simulation and Rendering of Real-Time Breaking Waves - PowerPoint PPT Presentation

About This Presentation
Title:

Simulation and Rendering of Real-Time Breaking Waves

Description:

Title: PowerPoint Presentation Author: CMP WS Last modified by: atlake Created Date: 4/21/2004 4:23:17 PM Document presentation format: On-screen Show – PowerPoint PPT presentation

Number of Views:156
Avg rating:3.0/5.0
Slides: 55
Provided by: CMP88
Category:

less

Transcript and Presenter's Notes

Title: Simulation and Rendering of Real-Time Breaking Waves


1
Simulation 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

2
Motivation
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

3
Getting water right requires
  • Geometry
  • Overall shape must be correct
  • Shading
  • Lighting and shading
  • Additional Geometry/Texture
  • Capillary waves, foam, etc. must be modeled

4
Goal
  • 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

5
Basic 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

6
Part I of III Deep Ocean Simulation
7
Deep 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

8
Normal 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!

9
Wave Speed and Wavelength Relationship for Deep
Ocean Waves
Eqn. from Garrison02
10
Wavelength to Velocity Relationship for Deep Waves
Figure from Garrison02
11
Deep Ocean Wave Demo
12
Nature 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

13
Threading Lake05
  • Task Level Decomposition
  • Thread A Simulated Game Workload
  • Thread B Compute Wave

14
Performance with threading
15
Part II of III Shallow Wave Simulation
16
Breaking Waves
Image from Seafriends.
17
Shallow 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

18
Shallow 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!

19
Shallow wave speed and wavelength relationship
Eqn. from Garrison02
20
Shallow Waves demo!
Image from Seafriends04
21
Part III of III Breaking Waves!
22
Breaking Waves
Image from Seafriends.
23
Types of Breaking Waves
Image from Mead03
24
Side view of breaking wave
Image from Miller76
25
Side view of breaking wave after collapse
Image from Miller76
26
Breaking 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

27
The Vortex
Image from Mead03.
28
Vortex Ratio
  • Ratio of length to width in practice is often
    between 1.73 and 4.43 Mead03.

29
Cubic form of vortex
  • Cubic form of Vortex is expressed as
    Longuet-Higgins82

Note Not actually needed for implementation!
30
Classification of surfing wave breaking Intensity
31
Breaking Algorithm
  • Input is positions from shallow wave simulation
  • Pass 3 of the algorithm
  • Pass 1 deep wave
  • Pass 2 shallow wave
  • Pass 3 curling

32
Breaking 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

33
Wave Breaking Algorithm
  • Classify vertex state
  • TOP, BACK, FRONT, FLAT
  • Floating point gotchas, especially FLAT!

34
So, how do we approximate this shape?
Image from Mead03.
35
Vortex 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

36
Image of Vortex Sizes, etc.
37
Wave 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

38
Results 1/3
Only showing FRONT and TOP
39
Results 2/3
40
Results 3/3
41
Breaking Wave Demo!
42
Areas 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

43
Acknowledgements
  • 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.

44
References 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.

45
References 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.

46
Backup
47
  • Irribarren Numbercite
  • B is slope
  • Hb/Linf ratio of wave height to wavelength

48
Wave 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)
53
Breaking
  • Takes as input the shallow wave that reaches the
    breaking point
  • Curl front of waveform to simulate crash
  • Back follows

54
Velocity and wavelength are related
Image from Seafriends
Write a Comment
User Comments (0)
About PowerShow.com