I’ve already read a couple of threads about this issue, but I’m encountering it as well using UE 5.0.3. I’ve selected my character mesh and enabled both Depth Mask and Custom Depth Mask, but whenever I select ‘Use custom depth as mask’ all I get is a green screen with no mesh visible. :-\
I will say you do definitely need custom depth-stencil pass enabled. I don’t know what you’re doing with it, but you’ll probably want it enabled with stencil.
You should test to see if this works on stuff other than your player. Add some static mesh, and enable it there. Then, while still not playing, enable Custom Depth visualization:
However, when ticking the box to use the custom depth as mask, nothing goes green, so I’m not getting a render of the model on its own. :-\ I’ve also tried using a camera and enabling/disabling Constrain Aspect Ratio, but - same result.
I’ll assume you’re using it in a post-process material. In that case, you’ll want to make sure you have Custom Depth-Stencil Pass set to enabled with stencil. Then, change CustomDepth Stencil Value on your player character to any value higher than 0.
To preview it, here’s the setting and how it should look:
Sorry, I might be misunderstanding, but I take it the Post Process material is a separate thing from the Post Process Volume…? I have the latter and my character is stood inside of it. Would I need to add those nodes within my current character’s materials?
I’ve absolutely no idea what I’ve done differently, apart from re-setting up my character’s material instance and adjusting some parameters. But I’ve re-enabled the Stencil Depth in the Project Settings, hit the checkbox for the character, and the checkbox ‘Use custom depth as mask’ and it’s working correctly!