Breaking ocean waves

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:

  • 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:

  • What kind of modification can be done to the above sin wave equation to simulate breaking waves?
  • Are there any other mathematical techniques that can simulate low amplitude and breaking waves?
  • 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.

Hello, I am also interested into developing myself something to make a realistic wave.
Concerning 1) I only have a nice ocean plane look using Gerstner waves instead of sinusoidal ones ( Trochoidal wave - Wikipedia ) using shader first.
I opened a post a while ago on the same topic Realistic Breaking Wave
Now I am reading pages of different theses and articles about animating a wave so that it breaks on the shore but still didn’t find an easy way to simulate in unity though… (2)
I don’t think it would be a good idea to do all this runtime with particle but you can still give a try with latest version of unity thanks to VFX Graph and Shader Graph maybe (I am currently playing a bit with both)

Thank you for the reply @StarChichk971. I was able to find a free mesh deformation plugin similar to Mega-Fiers. However, it was difficult to get the breaking waves using mesh deformation. But you can try that plugin on your end and let me know your thoughts.

Currently, I am trying simulate breaking waves using the metaballs and fluid dynamics. Is it computationally intensive to use metaballs for ocean simulation?

I saw same free asset Deform on the store, I didn’t tried yet tough.
I would not consider using fluid dynamics because it is too much expensive in term of performance, especially for a complete ocean surface.

By the way I found this interesting video from another thread, it is a 3D software approach but looks the best for the moment…

Thank you for your reply. I looked at that approach earlier and looks good for simulating breaking ocean waves. But I need an approach where I can modify static ocean mesh from low amplitude rolling waves to high amplitude breaking waves in real-time.