Custom Render Passes Object Reference in blueprint

Hello, I’m working on a project that would include global post processing change of saturation, contrast and gamma, turns off directional light and turns on spot light over my character while specific trigger is active. I created specific material for custom depth and I would like to exclude it from rendering when trigger is on. The issue is that whenever I try to create some blueprint logic, sooner or later I need to provide a reference to Custom Render Passes Object and even though I set Render Custom Depth to true and added Post-Process Material Instance to the Post Process Material array in Post Process Volume, while I hit the trigger it still includes the material. It behaves differently from the rest of the scene, but nevertheless it does not keep it’s original values. Does anyone have any idea how to either get Custom Render Passes Object Reference (from actors, actors with tag, primitive objects or anything) or how to bypass this with some alternative logic?



Ok, issue solved. It took some time to process through all of the available information, but if anyone is interested, I used custom stencil instead of custom depth (and very simple post-process material):

in general it seems like Unreal sometimes has way too many options and it takes ages to find suitable tutorial. This video helped the most with setup: https://www.youtube.com/watch?v=PiQ_JLJKi0M