Jump to content
  • Advertisement

Recommended Posts

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.

Share this post

Link to post
Share on other sites

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

Edited by Green_Baron

Share this post

Link to post
Share on other sites

Hi, not sure if you know but there are 4 great types of whater simulation:
-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)


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!