How to make water gradually transparent?

Hello guys, I want to make the water around the island get gradually LESS transparent with the depth, so that you can see a little of the sand below the surface of the water and make it gradually disappear, instgead of just seeing the whole island like on the second picture.

This is how it looks with basic principled bsdf shader:

This is how it looks when I mix it with transparent shader:

Is there a way to control the level of transparency based on Z value or something? I would be very grateful for any help.

How To Create Realistic Water in Blender - YouTube

I think this can give you a hand. The final result is quite nice. :slightly_smiling_face:

My water is a plane with an ocean modifier, not a cube like this:(

Then… add a cube beneath it and try how it looks… ??

Somekind of hard to make something less transparent depending on depth… when there is no depth.

( :thinking: …this may sound harsher than it is meant…)

Hmm… maybe using some height map for the island to control the mix of your shader examples ?

It’s a similar environment to what you’re working on, but I think the writing here will help

Island House - Artwork / Finished Projects - Blender Artists Community

The Making of Island House with Blender - Learn - Talk at Ronen Bekerman’s Blog Community

Optically Realistic Water - GLSL

GitHub - muckSponge/Optically-Realistic-Water: A Unity port of Martins Upitis’ fantastic ocean water shader, which was originally coded in GLSL for Blender.

Blend Swap | water/underwater shader preview v0.99

Interesting… (the making of the island)… but also:

This can be easily replicated in 3D software using volume absorption.

There has to be some measurement of any depth between the surface of the water and the ground of the see and then use this to somehow change the resulting shader…

1 Like

Daaaamn, I wish I saw this thing when I started the project :sob: I will try to recreate some stuff here, thank you!

1 Like