Realistic Water Shader - CYCLES volumes

I’ve not seen many realistic cycles water shader tutorials on youtube or anywhere, so i tried to make one…
If you copy this node tree and add it to a plane with the ocean modifier applied to it to get the wave shapes.
Feel free to adjust it, it has many possibilities.




9 Likes

Hey! This looks awesome, much better than simple Transparent+Glass shader mix that I have been using. I hope that You don’t mind if I “borrow” the node setup? :wink:

Wait. You can use the Mix Shader in volumes???

^^ Yep - since day one.

I am sure that volume shaders had nothing to do in this nodegroup. The plane of the ocean is flat and have no volume at all.

I am using this:






Video: https://onedrive.live.com/redir?resid=4BD98EF9AF712B2F!1333&authkey=!AGVXV7xH8czsbZI&ithint=file%2Cavi
You should notice that textures is also animated.

1 Like

Did some changes in material and replaced sun lamp with point lamp. And changed the scale and repeat of the ocean.




Wow sono2000, the sub surf with volume really kick it to the next level! I wonder what it looks like with a sandy beach below… must test. Great work and thanks for the shares

Do you not understand the fact that volume shaders works only for non-flat objects that HAVE volume?Ordinary shaders work with surface of the object and volume shaders work with inside content of the object, i.e from backface to backface, and if backface don’t have a pair, volume is useless. You may make backface have a pair by using solidify modifier, which makes the mesh manifold.Non-manifold meshes don’t work with volume correctly. You may experience the same effect by just placing black plane below.

And yes, did you not notice how small is the fraction of sss?First, SSS node is mixed with Glossy, where Glossy is 91% and SSS is 9%.Then they both mix with Transparent which is 92%, and they are 8%.And it all mixes with Translucent which is 36%, and all other shaders is 64%.Now, let’s calculate. 0.0910,0820,641=0,004783142 , half of percent, and I don’t see any point in using sss in that small proportion.

Personally I’m think that you have used mist. May I look at composite nodegroup?

As far as I can tell (and depending on the scene), cycles volume shaders work very well if the mesh is flat. If a ray goes through a plane and hits another object behind it, the distance between plane and second object will define the effect the volume shader has on the rendered pixel.


In sono2000’s example the water-object is flat and the pool is the second object, which creates a very nice volumetric water effect. Can’t find anything wrong with that :slight_smile:

3 Likes

Thanks for taking the time to check that, helge.

What? You used volume shader on cylinder and sphere, but not on the water. When I’m doing volumetric water, i place water plane at 0 height and a volumetric cube at -1 - -24 height, and ground at -25 height. Result of that is, the deeper you go down in cube, the darker you see, and far object is darker that near.

Two another versions of shader.
One with less diffuse and less bump (.2 big .1 small), other with no diffuse and bump (.333 big and small).




ADD:

1 Like

Ehm, huh? Cylinder and sphere looks pretty emissive to me…

The last two looks a bit too silvery for my taste. As if both reflection and refraction reaches the environment.

Here, some volumes. Volumes is useful for underwater and smoke/fire/clouds, for other things it’s useless.

The same from the top.


Emission is volume shader, bot some people use it as surface shader, and this is possible, too, but only useful with flat emission plane.

From the manual:
“Lambertian emission, to be used for material and lamp surface outputs.”
Btw, the background shader is also an emission shader.