Layered Rendering

Hello,

I’m trying to create a character occlusion effect, similar to who occlusion works in Divinity Original Sin 2.
It seems that their implementation of this was created with multiple render layers, masking out the centre when depth is bellow a set value.

This would be simple to create in Unity with a multiple camera/layer set up, but I cant figure out a nice solution in UE4 without applying a masked material to all meshes.

Any ideas how this could be implemented? or is this a more complicated engine change?

Thanks

1 Like

Its not possible to have camera layers in Unreal. The easiest approach is to use masked materials. One consideration, if you are using baked lighting there is no problem, but for static objects you may want to use this ( “return IsShadowDepthShader();” to diferentiate the shadow render and apply a different value to the opacity mask) in a custom node to ensure that shadows still there even when the object is not visible.