Underwater fog, half in and half out

Hi,
in my game(first person) is possible to dive underwater, I currently have created a fog (exponentialheightfog) for underwater vision that I turn on-off whether the player’s head is above or below the water…It works well but there is a serious problem when the player’s head is underwater for half, if the fog is turned off I get a bad effect underwater and correct above, if instead the fog is turned on I get an unrealistic fog above and correct below.
It would be easily solved with a “box volume fog” but it seems to me that there are not in UE4.
I also tried using the postvolume effects but I have not solved the problem, it shows the effect on the entire screen when on and not a portion of the screen while coming in it…
Anyone have any ideas for solve this problem?
I remember this problem in popular games from a few years ago (maybe even early versions of Skyrim) but then they all resolved and there are many first person games that allow you to get in and out of the water, then I am confident there is an easy way to do it …

Hello renderboy,

What you are looking for is to have a Post Process volume bound to the surface of your waters edge. I wrote a tutorial for the Wiki that can show you how this is done and to also add a bit of a blur effect as well to increase the realism a bit.

Swimmable Water Volume Tutorial:

Your outcome underwater will look something like this

Let me know if you found this helpful, or if you still need some assistance.

Cheers,

Hello Andrew,
thanks you very much for your help, I followed your tutorial for the material, also I followed your tips for physic volume and this was very useful for me(I was changing the pawn’s physic by blueprint), unfortunately I have not solved my true problem, Post Process Volume has an effect on the entire screen, does not show a “slice” when the camera is in for half, I can just set a blend radius to have this effect gradually(better than nothing, but not what I want…).
Thanks again and sorry for my bad english.

You are quite welcome! And set your volume to “Bound” by unchecking the “Unbound” option within your post process volume.

It is functioning as intended. You just need to set it to bound and lower the volume a bit so when your head is out of the water you have a clear setting. And when you are underwater you have the blurred effect. Keep in mind to have that finite line, it will take a bit more tweaking and further set up.

The way a gave you is just a base on how to get a water-like effect to your scene.

I have already set my volume to “Bound” by unchecking the “Unbound”, If I set “Unbound” I see the effect anytime, anywhere…if set “blend radius to 0” it become on/off on the entire screen… What am I doing wrong?

Ok, I’ll try to adjust it to the best, but I do not think I will be able to get what I want, and I know that is a problem that had also famous games, for example Skyrim in early versions:

then solved:


thanks you very much

AndrewHurley,

Where are the example post processing effects for the underwater portion of the tutorial? I’d like to know what tint you used and what degree of blur you leveraged to get that fantastic underwater effect. I looked in the tutorial but I just don’t see it. Thanks,

Hey ,

I left that section of the tutorial a bit open ended so people could learn about the Post Process Volume through some trial and error. That in mind, I have posted a couple images of the settings I used for my underwater PPV.

Post Process Water Volume Effect

Try to pay attention to the visual changes being made when you are matching the settings I have here with yours. It will help you better understand how these functions work.

Cheers,

Thanks so much Andrew! This helped tremendously. I’ve been working on a dive scene and underwater can be challenging. From your image, I was looking how you got the grainy look. These settings did the trick! Now for the rest of the tweaking!

No problem! Good luck and if you have some cool Works in Progress (WIP) and would like to get some solid feedback from other users in the UE4 Community, try posting it on the forums!

Forums Works in Progress
https://forums.unrealengine.com/forumdisplay.php?11-Work-in-Progress

Alright Thanks a lot man!
I had been messing around with the settings of the post process box but it didnt quite give the effect of being underwater. Thanks a lot!

Excuse me, did you solve your problem? I have the same problem with you in the volume of water.

No, in UE3 I did it with with custom Fog Volumes(absent in UE4)…