I wrote post about using Custom Depth in Unreal 4 and hit a few bumps that I hope you guys could look into.
Issues
The built-in occlusion culling does currently not play nice with Custom Depth – this means that a mesh you wish to highlight behind other geometry will get occludedregardless. A workaround is to increase the Bounds Scale under Rendering properties for a given mesh, this is very undesirable.
Objects that use transparent meshes are not rendered into custom depth. While I know why this happens - I find it highly undesirable and would like to just render a solid color opaque material when drawing into custom depth. This adds a huge burden when using this on skeletal meshes (having to keep a 2nd mesh in a blueprint and syncing all animations is not something you wish to do)
I reported the occlusion issue earlier and it was said it was fixed - using 4.4 it’s still occurring for me.
I find it highly undesirable and would like to just render a solid color opaque material when drawing into custom depth
This is how I handled Translucent objects in Custom Depth, I added some code to allow me to check from the Scene Proxy if its currently rendering Custom Depth, and if my object is translucent I swap out the material for a basic opaque material.
That’s what I’ve been using up to this point. Any chance the Custom Depth will be changed to use simple opaque material when the flag is set on a translucent object?
To anyone interested: the transparent mesh not drawn in custom depth was solved with a flag in the material: “Allow Custom Depth Writes” within “Translucency”.