View Full Version : Water Depth

Richard Hebert
09-04-2011, 12:14 PM
Hi everyone,

I'm creating a dock scene and want to slowly decrease the ability to see through the water. Can someone direct me to a tutorial on water shading that will give me this effect? The camera is flying over the harbor and I do want to see the harbor floor just not so clearly. I want the visibility to slowly drop off when viewed from above. Shallow areas being more visible than deeper areas.

Thanks for any direction,

09-04-2011, 12:47 PM
Have you tried with a gradient applied on the transparency channel?

09-04-2011, 01:14 PM
Try the dielectric shader?


09-04-2011, 01:32 PM
Transparency gradient with the input set to surface thickness.

09-04-2011, 03:36 PM
What skonk said works just perfectly. Ive done exactly that: an island scene with a dock and I wanted depth-based transparency.
In order to be able to use "Suface thickness" as input parameter in your sea surface be sure to model a big square for the sea, as opposed to a flat plane. Because Surface thickness needs...thickness, duh!

PS: dielectric with absorption will work as well, but render times will be muuuuch higher.

09-04-2011, 03:59 PM
What XswampyX said - the Dielectric Shader node will make it look purdy. In the attached test frame on the extreme left you can see the colour and perceived transparency of the blue water alter, depending on the depth of the step under the water.

Richard Hebert
09-04-2011, 06:48 PM
Thanks for the direction, I'm looking into both of these the next couple of days. This forum thing is pretty cool. It's a great way to rub shoulders with some of the 'Greats' out there.


09-04-2011, 08:22 PM
Also, if you take a look in the Shaders tab of the surface editor, you'll find a LW_Water shader there. That is, if you're using LW9.x or higher. I don't think it was in LW 8. It's not a new shader. It was just MIA for a long time and was initially (LW5.x?) part of a set you had to pay extra for.

There was another liquid shader that Antii wrote a long time ago named "coffee" that might work for you. I used it for something in 9.2 or thereabouts so it might still work if you're using the 32bit Windows version of LW.
http://www.lwplugindb.com/Plugin.aspx?id=9968a15c - http://koti.mbnet.fi/anttij77/Plugins/Coffee.html

The other suggestions will probably work perfectly for what you're doing. I just like people to know about the options. :D

Richard Hebert
09-04-2011, 08:28 PM
I recall trying that particular shader out and it didn't give me what I was after. I believe I was trying to get an 'absorption' effect. It has been awhile and I have upgraded my computer very recently so that may have been another limiting factor at the time. I'll revisit that shader with the new system. Thanks for the memory jog.


stiff paper
09-05-2011, 08:50 AM
Can someone direct me to a tutorial on water shading that will give me this effect?



Scroll down to post #30.

09-25-2011, 11:43 AM
Try the dielectric shader?


where can I get this to lgw 10 ??

09-26-2011, 07:36 AM
This tutorial may help. I found it a good starting point and adjusted settings as needed.


09-26-2011, 08:00 AM
Let's think about it more.
Why sand and ground below water is so clearly visible? Because it's fully lightened by lights. And everything is done by water surface on top of it- hiding part of it using transparency. In nature it would not be everything. Sand surface when hit by ray is sending rays to the all lights checking how much they influence spot (if there is nothing between spot and light source, it's fully influencing spot). But your water surface has its normal vector pointing up, so rays which are coming from sand to light sources travel without any problems through it! They should hit water surface from below, and therefore calculate in both ways lights influence (so water is casting shadow on sand and ground below water).

09-26-2011, 08:06 AM
Erm... all the shader options look great, but they can be expensive. Simplest option: Y-axis gradient on the sand's Diffuse. Or paint the sand so it's darkest where it's deep. Unless you have other objects to show under the surface, this is quick, easy and cheap.

Yes, it's cheating. So is using LightWave.