Download

Confusion About Blend Weights on Post Process Effects for multiple actors

I hope that the images explain what I’m talking about… Perhaps I’m just a nub and I’ve missed something really obvious. The jist of this is as follows: I want my player to be able to toggle a wall hack where they can see all (all as in behind walls or not) enemy outlines up to a certain distance. I’ve tried setting/toggling visibility for the post process component and toggling custom render depth pass on the mesh, but these don’t work. I tried setting blend weight to 1 to enable, 0 to disable. It sort of works, the issue being as follows (excuse the stock mixamo models):

The SWAT guy standing at the back shouldn’t have his outline rendered; the max distance to render outlines is the horizontal red line (visible on the right side). As a matter of fact, the text on the side shows that the blend weight for the post-process outline effect is 0 for the guy at the back. The effect only disables if I have neither of the SWAT dudes within my range. The code which controls the on/off effect is below. [FONT=courier new]ForceOutlines is a bool which is set to true when the player presses an [FONT=courier new]Enable_Maphack key, [FONT=courier new]Minimum_Distance_to_Enable is just a configurable float value (set to 1200 here), not touched anywhere else. Distance from Player Check just returns how far away an actor (self refers to the SWAT guy) is from the player. And yes, I have checked that the guy at the back is at > 1200 units away, so its not an issue with this function.

That’s not how post process volumes work. They don’t post process actors in the scene, they affect the camera. The blend values exist so you can transition smoothly from one PP settings to another. This outline shader you’re using affects the entire screen, not individual objects. If you want it to fade using a distance, you need to modify the postprocessing material to read the sceneDepth and use it to fade out the pixels based on it.