Underwater volume effect post process

You could achieve this by using a post process material.

I just mocked this up quickly, its not complete, but it might give you an idea to start from. You can swap to add instead of multiple for a very different effect.

This is the method im trying to implement, but when i try this, everything gets the color blue or light blue, but i just want a far away blueffect and blackness in the things you cant see, but this makes everything inside the post process volume blue and black.
Does anybody know how to make it not change textures close by and have a depth that only changes in range?

.unrealengine.com/latest/INT/Engine/Rendering/Materials/ExpressionReference/Depth/index.html#scenedepth
.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/DepthOfField/

These gave no answers

I have tried making this BP for my post process material and I cant get past the error on the Multiply, this is the effect I am looking for. Any help would be appreciated to get the same effect. I am using ue4.19.2

Hi,

i “break” it - it worked. But i do not know how to add these Distance and Contrast nodes :slight_smile:

the distance and contrast nodes appear to just be scaler parameters. hold the s key and click on the graph and you should get one. then you just need to name it and set its value.

Thanks Kasi-Laubfrosch and ThompsonN13… I have something else on my mind if you would like to have a go… I have tried and tried and just cant get it to work… So I got my post processing volume for my underwater working ok now…

But its really about going deep into the ocean… So the deeper you go the darker it goes until your so deep its total darkerness and the only way to light the scene around the player would be a local light, such as in a submarine or diver flash light… Is this possible with a post processing volume, so as the player goes deeper along the Z axis in the post processing volume it gets darker?

you may give this: .unrealengine.com/en-us/Engine/Rendering/Materials/ParameterCollections a read.
a bit more straight forward may be this: WTF Is? Material - Actor Position WS in Unreal Engine 4 ( UE4 ) - YouTube

You could do this in a blueprint by creating a float variable in the underwater control blueprint and connect it as the output from a MapRangeClamped(float) node that outputs a 1-0 scale multiplier based on the ocean surface Z height (multiplier = 1) and the Z height level for when you want no lighting to be visible, say -500m underwater for example (multiplier = 0). You’d then input the controlled character or vehicle’s current WorldLocation.Z height value and then multiply the current LightIntensity by the output of this node to automatically adjust the sun light intensity (and sky light, all lights really). In the image below the arrow is pointing at the lower end of the scale, as in how far below the surface should be pitch black, adjust this to your own preference.

I run the [Community Ocean and Sky Project][2] over on the forums and we used a similar technique outlined in the images posted above for underwater in our PostProcess material, however we also uses both the stencil and depth buffers, and perform the sun intensity manipulation within the material itself. Feel free to download the project and have a look at:

Ocean\Materials\Underwater\M_Underwter_PP and Ocean\BP_Underwater

to see how we wen’t about it. If your game will be mostly below water it could give you a better look doing it through blueprint since you are removing all light rather than hiding it. This way you can focus your PP material on the look you want while deep underwater with a flashlight/headlamp, rather than needing to fade out the sun as well.