Here’s another nice ocean shader example
Cool
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 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
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
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!
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.
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.
OCEAN_WAVE_MESH_DISP.gh (14.6 KB)
Feel free to contribute, comment…
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.
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:
http://visualcomputing.ist.ac.at/publications/2017/WWP/
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.
I studied the ‘grasshopper’ file, but failed to implement it like ‘gif’. Could you please upload the file?
Hello
welcome to this forum.
I don’t really understand where is your problem ?
There is a grasshopper file published so if you want an animation you need to animate the slide of time.
Right click on the button and choose animate. That will copy a series of image at a specified location.
The to make a gif there are some tools online or with Grasshopper to do that.
I’ve been exploring realistic ocean wave generation lately. While Rhino’s displacement and bump mapping work well, Blender’s Houdini Ocean Toolkit seems to offer higher quality and animation capabilities.
Do you know if there’s a similar tool for Rhino/Grasshopper? It could be great for creating surf simulations.