Download

Opacity for murky water - your opinions?

Hi guys

I am creating a shader for a murky water surface and have tinkered around a bit on how to drive opacity. I have come up with:

http://www.team-imx.com/images/water_opacity.jpg

The result I get is this:

http://www.team-imx.com/images/water_opacity_example.jpg

What do you think? Is there a better/smarter way to get a decent depth fade for murky water?

Cheers,
Michael

I think a depth fade and also refraction would help, but also the base colour of the underlying material helps give this effect as well. If you still have the UDK toolset installed, take a look at the last years GDC level where they had a waterfall and a standing pool which had a murky looking water included (I used this as a base to create some and it looks even better with refraction in UE4).

Hi Ghiest

The Depth Fade node takes care of the places where translucent materials hit opaque ones (creating a softer transition), I have done some tests with it already but didn’t really get what I wanted (I got better results with Scene Depth).

Refraction is a good point though, will get right to that :wink:

Cheers,
Michael

Another good option would be to use a subsurface material

Here’s the refraction setup I’ve come up with:

http://www.team-imx.com/images/UE4/ue4_animated_refraction.jpg

I’m pretty happy with the results so far. The lerp alpha is driven by the distortion setup, giving the refraction a nice animation:

https://vimeo.com/90116704

@TheJamsh: Haven’t gone into subsurface materials yet, but will have a look :wink: Thanks!

Cheers,
Michael

Try having a look at the Fresnel node. It goes a good way to emulating the facing ratio effect you get when viewing reflective/refractive surfaces - that is, the more glancing the angle, the more apparent the reflection/fogging.

@Crow87: Yep, I’ve seen the fresnel node, haven’t implemented it into the material yet though - but I’ll definitely have a look at it. I do get a similar effect already (angle dependent reflectivity) through the opacity network (I know its only a fake) but I’d like more control over it. I’ll give it a shot :slight_smile:

Actually that behavior is coded into the shader out of the box :wink: its called schlicks fresnel equation and its a standart part of UE4s BRDF. You just need to put in the correct index of refraction value for water into spec (to make it ridiculously accurate :P) and that should do the trick.

Well, that’s where I get the effect from then :wink: Thanks for pointing that out.

Cheers,
Michael