Translucent depth buffer

How can i achieve this in unreal 4?
A transparent material that hides object’s parts which are behind other parts.


I had a very similar issue, however mine involved ocean waves being displayed on top of waves closer to the camera, and got some help from TheBeej on how to correct this. I am not positive this is the best way to solve your specific issue, but is worth trying.

Basically you will need a duplicate mesh with a second material that is not rendered in the main pass, instead using the RenderCustomDepth pass as explained in this post:

You will then need make a basic material without any params (unless you use displacement), then create a blueprint and add 2 of your meshes to the same location, set one with your translucent material, and one with the depth material, then change thes settings in the Rendering tab for the depth only mesh (see attached). After that, add in the nodes shown in the link above and hook it up.

Again I am not sure if there is a simpler method for your situation, due to the rendering setup currently in use this is not as simple as it could be, but I can confirm this solution does work. :slight_smile: