Ocean Wave Generation in Rhino

Are you trying to have a dynamic rippled surface or simulate how a wave forms and breaks as it moves from deep to shallow water?

It would be great if Kangaroo or Flexhopper could be used to simulate this and experiment with different sea floor designs. Interesting for wave pool design too but perhaps just too complicated?

There was a similar discussion where @DanielPiker suggested a very simple way to twist a flat surface into a wave shape. (I’ll find the link later) this translated nicely into oak…

Perhaps not what you are trying to simulate here but I always wonder whether this type of ocean surf wave could be simulated in GH when a wave topic appears!

Torsional wave


Sort of wave direction can be added. Wind is one parameter of many tools.
here I added some directional movement depending on the high of the wave so it simulate sort of wind

test water noise.gh (165.7 KB)



Could you link to these shaders? It’d be interesting to see more of them.

I’ll try to get the displacement hooked up via GhShaderNodes too - displacement obviously works for Raytraced (:

This is becoming quite a nice definition. If you feel like it you could add vertex color information for foam. I could create a custom ocean shading material that would use this vertex color layer for adding foam shading. The Blender ocean modifier can do that too. The foam data is essentially just a gray scale where white means foam, black no foam.

(edit: except I suddenly remember that vertex color retrieval is a bit broken - but once that is fixed too it should work a treat.)

The definition you posted gives 40k quads currently for the surface it creates. That should give quite nice control over foam detail on and between waves.

8000 m diameter disk - I guess that is quite overkill.

Right, I’m rather interested in the resulting polygon count. But of course, if you’re working with a model in mm, and then have a disc with diameter 8000m then that’ll be rather big yes, especially if you’re going for 1 unit edge length or something like that.

There are 17308032 quadrilateral polygons and 0 triangular polygons in this selection
There would be 34616064 total triangular polygons in this selection after forced triangulation

Yes I am working in mm for the models. Now that I think it seems this is not the right approach. I will try something like Lukasz’s idea of having an inner circle with displacement and an outer circle with bump only.

Hey Nathan,

I don’t have precise link to these shaders, as I am not using blender I made a quick search and tried to replicate one.

My definition has a selection so it can output 40k or a more bigger mesh (1 Million)

For the foam it is quite like what I did in the GH Shader Node

and what seem to seem to be here

Here a GH shader node
test water.gh (15.0 KB)

Here’s another nice ocean shader example


this one seems quite simple to code. Because at the end it is interesting to be able to make it for “real”.
Yes that was simple,


Wavelength is Pi/2 units, if you need 50 waves you need to make a 50 * pi / 2 grid.
Iterations is the number of frequency, the less the smoother.
Speed is hardcoded, so play on time to move the wave. The period is PI because the speed is 2.

Lower the iterations and grid size to tune the sea you want.

ocean wave water shader.gh (13.7 KB)


I did not expected that after 2 years this topic will get some love. Anyway I am happy to see it is going forward with devs help. Those shaders look promising :smiley: And if there will be some option for foam based on wave shape and wave wake pattern map this could be mind blowing.

As Nathan already answered for static mesh use any extension which supports mesh. For animated meshes use .abc files (alembic).

Maybe this discussion should stay on shaders?

I can delete this if its felt it is diluting the discussion but it feels like the expertise is in the room and might take the bait :slight_smile:

Ocean waves (swell not ripples) can be described like this…


They change shape as they approach land and the depth of water gets less…


As the wave approaches land from deep ocean the wavelength shortens and the height increases as the ocean depth decreases. Waves where there is a sudden change in depth are different to when there is a gradual change in depth.

There is an orbital movement of water particles that is perhaps what causes the the wave to break (and sometimes “barrel”) when the wave gets to a certain height, speed and wavelength.

This can be looked at as a 2d problem but it gets interesting when its viewed as a 3d problem and the wave direction is at an angle to the land which gives a “peeling” wave where the breaking section seems to peel along the wave.

I wonder if this could be a particle physics simulation or perhaps easier would be a mesh displacement like the Ripple discussions on this forum but that also incorporates a torsional displacement that is a function of water depth too?

It would be interesting to see how different sea beds effect the shape of the wave… gradual depth change, sharp depth change, step change, undulating change etc.

Any thoughts?


… naaaah.
We all know that’s not going to happen :rofl:

For that thread i did try to study/research about wave simulation/prediction.
At the end I just gave up. It was too much for the effort I wanted to put at that time.
I wan’t even able to find a complete procedure to calculate the wave propagation speed starting from fluid properties (density and viscosity) and height/depth.
There are capillary waves, Gravity–capillary waves, and Gravity waves … depending on the size and level of detail wanted.
But it feels (to me) the formulas need some initial practical/experimental data to “kickstart”, from which, then, you can extrapolate more info and simulate similar contexts.
I’d like to be proven differently. I’d like to see more about this!

Related: Attempting to script a breaking wave in kangaroo, but there's a solution exception i don't understand

1 Like

I started something earlier but it’s 2degC in my workshop and I’m back in the house on my phone for now…

I made 2 mesh planes, 1 above the other, and sloped the lower one like a sea bed.

I was going to add a ripple wave to the top plane (sinusoidal or other) and try and change the wavelength and height according to the height above the sea bed mesh.

If that worked I was going to try and add the same torsion effect as in that link you shared.

1 Like

This is along the right lines but needs some refinement to the wave function and ultimately adding t, time to the equation so it can be rolled forwards and backwards and animated with a slider.

I want to be able to get lines that represent the axis of each wave so I can apply a rotation around each axis that is also related to the depth of water to cause the waves to break (or peel)

A nice way to choose preset sea bed surfaces or set new ones would be great too.

Being able to import sea bed mesh scans of actual beaches would be fun.


Feel free to contribute, comment…

Test with Kangaroo

kangaroo test.gh (18.2 KB)


The discussion that @Joseph_Oster linked to above has some nice Kangaroo ripple simulations… Especially, IMO, the one with the duck and ability to anchor boundaries.

Flexhopper has also some nice dynamic simulation capabilities. I tried some to play with many particles. As it is dynamic the problem I didn’t solve (but I didn’t try a lot) is to capture states!!

Flexhopper looks interedting. I thought about using it to create whirlpools and turbulent flows like “stoppers” in rivers.

Stopper Image

For large bodies/deep water, it still isn’t practical to simulate the entire volume as particles, even with any acceleration techniques. If the surface can be treated as a heightfield it can be much more efficient.

I found this work really nice:

and here a slightly older simpler approach:

For splashing/breaking waves, heightfields alone aren’t enough, but there has also been some interesting work on combining grid based volumetric simulation with particles for the surface layer.