🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Breaking ocean waves

Started by
2 comments, last by GNPA 4 years, 8 months ago

I am working on a project where I have to approximately simulate the ocean waves. Currently, I am using a mesh modification approach. I am able to simulate low amplitude waves using the following equation:


yVal = Mathf.Sin(180 * Mathf.Deg2Rad / freqUpdated + Time.time * speedOFWave) * halfWaveHeight;

Now, I want to extend this equation to simulate breaking waves for a high value of "wave height".

 

Approach tried:

  1. I tried creating code similar to this plugin but the smooth transition between low amplitude waves to these breaking waves is not possible with that approach.

 

I have the following questions:

  1. What kind of modification can be done to the above sin wave equation to simulate breaking waves?
  2. Are there any other mathematical techniques that can simulate low amplitude and breaking waves?
  3. Is it feasible to do this type of ocean simulation using water particles?

 

I would appreciate any suggestions and thoughts on this topic. Thank you.

Advertisement

Yep, particle simulation is feasible i read. The surface on the open ocean is driven by the force, direction and fetch (length of effect) of the wind.

I can't (yet) help with programming these things, but breaking waves are rare on the open ocean, even if they tower many meters high due to strong winds that blow for many 100s of km. They occur at the transition between deep and shallow waters, where the orbital movement of water particles is compressed, e.g. near the continental shelves or in epicontinental or shallow seas. That's where the breaking news originate ?

Hydrological institutes and weather services have wave prediction models, maybe you can get more info there ...

Hi, not sure if you know but there are 4 great types of whater simulation:
(Navier-Stokes-based)
-Eulerian aproach (Jos Stam sable fluids and a few others are the main works regarding this 2D/3D)
-Shallow water equations (near shore waves and rivers 2.5D)
-Particle simulation (breacking waves, foam, etc)

(LBM-based somewat statistic-based approach)
Grid simulation with no breaking waves or other effects exclusive to particles

Some links with code or books for your consideration:

Fluid Simulation for Computer Graphics, Second Edition
code available for chapters of book 1 at
https://github.com/g-amador/incremental-fluids-java (I ported to java and include links to c++ original author code)

https://www.cs.ubc.ca/~rbridson/fluidsimulation/
http://matthias-mueller-fischer.ch/realtimephysics/

This topic is closed to new replies.

Advertisement