Custom Depth for opaque material

Hey guys,

I am trying to use unrealAR plugin to develop sth. I want to achieve the occlusion between real and virtual objects. One viable way is to pre-render the mesh of real objects into depth buffer and then render the virtual objects which should pass that depth buffer. I ve tried CustomDepth but it does not available for opaque material.

I achieved following effect. I want to know how to give the chair an opaque material instead of translucent. Any idea?

Another viable optioin is to control what part of the object should be rendered. Is that possible?

We really need this too. There should’t be any technical reasons to not to allow this. Custom depth is totally separate rendering pass so there isn’t any dependencies. Seems that only reason is that CustomDepth is under the scene texture which can be used for scene color and other buffers that are only available after basepass.

I don’t see any reason either why you would not be able to read custom depth in material, that is not writing to it. Should be fixed.

+1 to this!

Same, this would solve my problem so easily. Is there a way to force it?

does it fixed now in 2022?

Any updates?

Here you can use vertex distance from camera to create a depth map

If you want to mask a whole object better use distance from camera per object like so