Transparent material that hides any mesh behind it?

Hello everyone!

I’d like to make a translucent material with “Disable Depth Test” ticked on for an optical illusion during gameplay. You wouldn’t be able to see it, but the player character gets hidden if they are behind it (sort of like an invisibility cloak).

For example, if this material was on a sphere just floating in the middle of a room and then the player stops behind it, it’d look like the player model has a hole in their chest. Hope that makes sense!

Thanks a lot in advance for the help!

You can do so by enabling Custom depth write for translucency in material of the Sphere(ocluder), enabling Custom depth in the actor properties of the ocluder. And then, inside the actors materials that should be clipped you can compare Pixel depth with Custom depth via scene texture node.

I’m not sure I get what you mean, sorry! Both the player character’s material and ocluder’s material have Custom Depth enabled, and also Disable Depth Test cause I wanna overlay them over the rest of the scene. However, the Sphere material only covers the player if it’s got a regular BaseColor or has full Opacity.