Render occluded actors

I think you are looking for this change:

https://github.com/EpicGames/UnrealEngine/commit/4cfa4288d42a0d08aff12832a8a28bc3e07a2ffb

bool FSkeletalMeshSceneProxy::CanBeOccluded() const
 {
-	return !MaterialRelevance.bDisableDepthTest;
+	return !MaterialRelevance.bDisableDepthTest && !ShouldRenderCustomDepth();
 }

It is not in the official builds neither in the promoted branch.

Similar to https://answers.unrealengine.com/questions/54283/render-occluded-actor-in-custom-depth.html

I wanted to render actors with an outline through walls, but extending the bounds scale seems like to much of a hack and reduces performance. If there isn’t another supported way to do this, can anyone lead me in a direction where I can modify the engine to always render to the custom depth?

Neat. I’ll look into this later, but I think it does what I want. Thanks.

Yeah, that totally works. Now I have sweet character outlines through walls :smiley:

Hi, I’m on 4.8.2 now and can’t get bRenderCustomDepth to work with neither StaticMesh nor Skeletal. It should be just the setting of the property on the actor, right?

Debugging the code showed that it should be working, it goes through the code path to render the specific meshes I have marked for custom depth pass. But I still cannot see them behind walls. And I was wondering if you could help?

Thanks!
Wessam