In our game, I am applying a global post processing material to the player camera (which is first person) that acts sort of like night vision would. As it stands now, this post process completely brightens the view of the player so that anything that isn’t obstructed by some mesh is now lit and visible to them. If something is already well lit, the post processing is super bright and “whites out” the player view (just like you would expect with night vision). After some play testing, we realized that this isn’t quite what we want. We need to limit the range of this post process so that it only effects a limited range in front of the player.
I’m assuming you are familiar or at least have heard of the game Outlast. Just in case you haven’t, here is a video (I apologized ahead of time for linking to a Markaplier video):
At about 12:10 in that video, you can see a great example of the sort of effect I am looking for. He enters a room with his night vision camera applied and he can see directly in front of him but after a certain point, his view is just darkness (with far off lights visible). At about 12:26, he walks around with his night vision camera on and displays the effect beautifully.
In my post process material, I have attempted to play around with pixel depth and scene depth (essentially lerping those values with a black color constant based on some arbitrary number as the “range”). I know this wouldn’t be exactly what I wanted (as it would make all of the view beyond a certain point completely black with no regard to lighting), but I figured it was a start. Those things didn’t work and it seemed like no matter what I did, the entire view of the player was just completely black. Do those depth values not work since I am applying a global post process rather than some material on a given object in the world?
Just to be clear, I am not talking about a vignette effect. Also, I tried messing with the blend radius values on my PP volume but with no success. Do you have any tips on how to get that Oulast-like effect? I feel like there is something easy I may be missing here.
Any advice? Thank you in advance!