I’m working on a player blindness effect, and I thought it would be easiest to make a post-process material using the depth fade to lerp between PostProcessInput0 and black. However, the player holds a lantern with a translucent material on it, which causes anything behind it to not be affected by the material, like this:
Any ideas how I could solve this? I think the problem is that the depth buffer writes the lantern mesh as though it was opaque. I could use a local fog volume instead, but I’d prefer something I have more control over.
Hmm, unreal does typically not write translucent materials to the depth buffer unless specifically asked, with for example “output depth and velocity” in the material settings.
Also worth checking the blendable location of your post process material. Unreal applies some of the translucent materials after dof in a “separate translucency” pass. If your fog is applied before that, the lantern here might be overriding that result potentially?
Hmm, good idea, although it doesn’t seem like it makes a difference whether I set the PPM to Scene Color Before/After DOF or my master translucent material to Before/After DOF. I appreciate the suggestion still! I’m not familiar with how Unreal writes to the depth buffer, so for the time being I’ll investigate the documentation of that.