3
$\begingroup$

I created an Island with water around it. I want to make the water around the island get gradually LESS transparent with it's depth, so that you can see a littlebit of the sand below the surface of the water but make it gradually less visible as it goes down. How can I achieve this?

This is how it looks, as you can see the sand is just there, I would love for it to gradually disappear

$\endgroup$
8
  • $\begingroup$ Hello, there are many ways, you could paint a b&w image in order to use it as a mask in a Mix Shader, to make the sea gradually transparent $\endgroup$
    – moonboots
    Commented Aug 18, 2023 at 13:39
  • $\begingroup$ Would you be able to give me a more detailed explanation? I'm very new to Blender and I don't understand many things:( $\endgroup$
    – Biers
    Commented Aug 18, 2023 at 13:51
  • $\begingroup$ please show some screenshot of your current object and its material $\endgroup$
    – moonboots
    Commented Aug 18, 2023 at 13:51
  • $\begingroup$ Well, the way real water does this is volumetrics, so I would use a volumetric shader. $\endgroup$
    – TheLabCat
    Commented Aug 18, 2023 at 13:58
  • $\begingroup$ @moonboots I added a screenshot to my original post. $\endgroup$
    – Biers
    Commented Aug 18, 2023 at 13:59

2 Answers 2

8
$\begingroup$

You can use a Principled Volume node for the effect (also have a look at Volume Absorption and Volume Scatter nodes). Most simply just create a cube and apply the shader to it and place it below your ocean plane. With the Density value you can control the "depth transparency".

enter image description here

If you want to have a better volume than a cube, duplicate your plane with the Ocean modifier, apply the modifier and then extrude the ocean mesh (but this can be a little bit heavy).

enter image description here

You can also combine surface and volume shaders:

enter image description here

$\endgroup$
3
  • 2
    $\begingroup$ Note that would be a rendertime-expensive solution. $\endgroup$
    – Lauloque
    Commented Aug 18, 2023 at 15:23
  • $\begingroup$ i was never able to use volume shaders, wont work for my setup 😅 $\endgroup$
    – Harry McKenzie
    Commented Aug 18, 2023 at 15:50
  • 1
    $\begingroup$ Hello, thank you so much for your help. This seems to have done the job! $\endgroup$
    – Biers
    Commented Aug 21, 2023 at 0:35
6
$\begingroup$

You can use a black and white image as a mask that you plug into the Mix Shader, then plug your shaders into the 2 inputs of this Mix Shader. I've made it simple (a mix between a Glossy and a Transparent shader) but of course it can be a more complicated mix of shaders. Depending on the black and white of your mask, you'll see either more of the first input or more of the second:

enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks man for help, I really appreciate that. In the end, @Taiyo 's answer seems to be the solution in my case, but I'm really grateful for your answer as well! $\endgroup$
    – Biers
    Commented Aug 21, 2023 at 7:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .