Hi! I need to normalize SceneDepth to only outline NOT hidden geometry.

I’m newbie in Unreal development and I want to draw an outline only around some actors on my level.

I have found a lot of tutorials about it, and all of them draw the outline using Custom Depth buffer. Here are some of the tutorials that I have found:

[Custom Depth in Unreal Engine 4][1]
[Tutorial – Creating outline effect around objects][2]
[Creating an Outline with Post Process ][3]

Now I’m working on the last one (youtube), and as you can see on second 0:43, the steps’ is hidden by the player:

96106-customdepth03.png

This is because both, the player and the steps, have Render Custom depth checked.

This doesn’t happen on my level, because my player’s gun doesn’t have checked Render Custom Depth. Look:

96107-customdepth01.png

But here, I have checked it on two squares:

96108-customdepth02.png

The furthest square doesn’t draw its outline in front of the nearest square.

My problem here if I check Render Custom Depth in all of my actor, even in the ones that I don’t need it, I will have all of the outlined.

I need to normalize SceneDepth to only outline NOT hidden geometry. Any idea about how to do it?

Yes, I think so, too. Scene depth is causing me a lot of problems and there is a warning about use post production materials on unreal documentation. Because I’m new, I haven’t understood so much in your answer but I will investigate about how to do what you are suggesting me. By the way, I’m trying to create a procedural mesh with its perimeter highlighted. I have a set or vertices and I need to draw a polygon with them, and the best approach is to use procedural mesh. But I only need to show line that joins all the vertices, this is why I want to highlight the perimeter.Thanks.

Lion032 posted a solution for this in this thread…