3
$\begingroup$

Problem:

I want to make a water material in the Eevee engine that gets progressively murkier as objects beneath the surface get deeper.

Things I've tried:

The closest approximation I've found so far: I use a plane with the basic screen space refraction/transmission setup with 1.333 IOR (and a bump node for the small waves) used in most regular eevee water shaders with some increase of the material's transmission roughness and the edge fading of the scene all the way up, and with this material it can kind of create the murky/foggy water effect that I'm after, but only when viewed from lower angles. when viewed from higher angles, the effect falls apart because it's relying on the edge fading as a means of making objects in the water to appear to vanish the deeper they get.

Using volume scatter/absorption materials beneath the surface plane does not work from what I've tried. The water's refraction seems to make volumetric shaders on the other side completely invisible. Same goes for using a stack of alpha clip/blend/hashed planes beneath the surface which otherwise would achieve a similar effect.

Is there a way around this?

$\endgroup$

1 Answer 1

4
$\begingroup$

You could use the Volume Absorption node, with a Separate XYZ node on Z as factor, plug a ColorRamp in both the Color and the Density input:

enter image description here

If you want to add a god ray effect, mix it with a Noise Texture in 2D that you rotate in the Mapping:

enter image description here

Volumetrics doesn't seem to wok behind a Glass shader but you could instead mix a Transparent with a Glossy:

enter image description here

$\endgroup$
4
  • $\begingroup$ To reiterate, I want to keep the surface refraction. This is great for mist or smoke, but when viewed from above the water's surface, any volumetric materials become invisible. Here is a picture of what I mean $\endgroup$
    – nuk
    Commented Nov 20, 2023 at 19:38
  • $\begingroup$ I see, so maybe you should use a mix of Glossy and Transparent with a Layer Weight as factor? (see my edit) $\endgroup$
    – moonboots
    Commented Nov 20, 2023 at 20:16
  • $\begingroup$ The issue is that there still isn't any refraction effect going on. Here is what I mean: in this picture, I have two materials mixed, one transparent, and one with screen space refraction enabled. You can see that the distortion that refraction inflicts onto the objects below the plane. This material is just to show the discrepancy. $\endgroup$
    – nuk
    Commented Nov 20, 2023 at 21:24
  • $\begingroup$ yes, Eevee has some limitations and you can't do anything about it except find some tricks $\endgroup$
    – moonboots
    Commented Nov 20, 2023 at 21:38

You must log in to answer this question.

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