Ocean Wave Generation in Rhino

Dear Rhino Users and Developers,

from some time I am thinking about best methods for generation of quite realistic ocean waves in Rhino, or outside of it. We have displacement and we have bump for rendering effects which both used wisely can generate nice results.

However in Blender for example there is implemented open source Houdini Ocean Toolkit, which I believe really can provide better quality, and is adding some animation capacilities. Link below:

http://anusf.anu.edu.au/~drw900/houdini/ocean/docs/

My question is, is there some implementation of this or similar tool into Rhino/Grasshopper? Together with grasshopper this could provide some nice animation capabilities inside Rhino.

1 Like

Not sure, never used it but i think Flexhopper plugin may be what you are looking for.

If someone was interested, we have ended up with buying Vray render engine, which allows to import ocean mesh animation during rendering only as alembic proxy mesh. Mesh is preparred in Blender, material is added in Rhino.

I am interested!

How is it looking for an infinite ocean surface? Doe’s it work?

Vray infinite plane could be used, but it only supports bump map, as far as I remember. Transition between infinite plane, and detailed mesh with displacement in scene center is quite tricky.

Right, also there is no ocean procedural bump. A clear defined task without solution. I wonder that there is no direct ocean shader.

@DanielPiker did some nice work with water back in September:

And shared a link to this AWESOME interactive page:
http://madebyevan.com/webgl-water/

3 Likes

Hi Lukasz, can you elaborate your workflow for exporting Alembic meshes between Blender and Rhino / Vray? At the moment I am only trying a still image, so animation is not really needed.

To get an ocean mesh from Blender to Rhino just save it as OBJ or FBX and import in Rhino.

I did that recently for

Thanks Nathan, I tried exporting the mesh directly, but because I’m working with a large mesh, it bogs down Rhino / Vray quite a bit. I am trying some alternative methods to see how I can reduce the polygons. The black line in the horizon with HDRIs is always a problem, as I’m trying to find a solution to getting good results with quick renders (without post processing).

The first render on that other post, is it just a normal map? Because then I get a flat waterline, so even though the result looks good, it’s not realistic. That’s why I’m going to the displacement route. Also do you think that material would work with Rhino 6? It is just a placeholder if I import it.

How big is the ocean mesh you’re working with?

Hey @nathanletwory one solution could be to use one of the shader developped by the blender community redo it in Cycles in Grasshopper. Here a try, without displacement as it is not implemented.


In order to do it on a material, it seems simple to replicate the noise displacement making a similar noise component as in Blender.
I reuse Noise from

Noise with Details and Roughness from there
https://developer.blender.org/diffusion/B/browse/master/intern/cycles/kernel/shaders/node_noise.h
For the distortion source here
https://developer.blender.org/diffusion/B/browse/master/intern/cycles/kernel/shaders/node_noise_texture.osl

@piac I think it could be a good add to the noise (4Dnoise) component to add Details (octave) Roughness and Distortion as in Blender. The main difference I think is that blender as a Noise from [0 to 1] and your component is [-1 to 1].

1 Like

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

2 Likes

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)

Frame-

4 Likes

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)