Custom render order for objects

Hi there!

In Robo Recall, when you pause the game, the widget stays on top of everything except the player’s hands and the line trace. Example:

In order to replicate this feature, I’ve tried 2 things:

First: disable “Depth Test” on the widget material, so that it could be rendered on top of everything. This works, but it also stays on top of the hands.

Second: keep “Depth Test” disabled, and create a post process material that uses “Custom Stencil”.
Here’s the material:

I explain my understanding of the material below.

Now, using that Robo Recall picture as a reference, in the hands mesh (controller), I enable “Render CustomDepth Pass” and set the “CustomDepth Stencil Value to 3”, do the same for the particle system (ray tracer) but change the value to 2, and I also have a little sphere that is at the end of the particle system, in which I do the same and change the value to 1.

From my understanding, using the above material on a post process volume would allow the hand to be on top, the particle system next, and then the sphere (the bigger the CustomDepth Stencil Value, the object is rendered on top of the values below).

So, with what I currently have, only the sphere stays on top of the widget. Basically, only the object that has “CustomDepth Stencil Value to 1” is above the widget. But the hand is above the sphere and below the widget, which is not what I want.

Why is the hand mesh and the particle system not on top of the widget? If you know other way to accomplish this feature, I would be glad to hear it.

could you put the widget in the player model, but a distance away, and have the player model always render on top?

you could also try reaching out to the robo recall developers, either through their site or through a site like polycount or artstation.

How can you force some components inside the player blueprint to render on top of other components in the same blueprint? Is it still using this technique?

If you put the pause menu in the player camera blue print and move it back I’m space I side the blue print it would be all one piece. You should then be able to have the rendered components of the actor always appear in front of other things. I don’t know if you can add widgets to actors, I’ve never tried it, but you could certainly do it with a custom model. That would be a poor solution though.

I wanted to do the same thing and managed to accomplish this by simply setting the opacity to 0 for my indicator if there’s anything in the custom depth pass closer than the horizon since (in my project) the hands are the only things that show up in the custom depth scene texture anyway.