Top-most or HUD 3D rendering

I’m looking for a way to render 3D objects on top of the scene, for menus and inventory manipulations. These are the solutions I see :

  1. Have a separate render pass, like what Unity 3D allows you to do via layers and multiple cameras. Unavailable in Unreal AFAICS.
  2. Clear the depth buffer before rendering the top objects. Would probably screw up other systems like shadow mapping though, so a pretty involved mod of the engine.
  3. Use the Disable Depth Test flag, but that’s only available for Translucent materials, and those have nasty temporal AA artifacts unless that was improved recently. Translucent is probably also costlier?
  4. Depth offset added to scene objects, and render top objects close to the near plane, so that scene objects never overdraw ‘HUD’ objects. Found no way to customize that in Unreal’s APIs.

Basically, the challenge is to prevent scene objects from flickering on top of the HUD. Slate must already be using a separate pass, so it must be feasible, although in this case some limited lighting is also needed.

Anyone implemented something similar? Any tip appreciated!

I didn’t tackle that problem myself. But i saw an example that did it with screen capture. [WIP] End Of Transmission - Showcase - Unreal Engine Forums

Thanks for the link. Must be somewhat inefficient but might be okay, on the order of layer rendering in Unity.

I’ve been experimenting with just drawing stuff close to the near plane along with some camera collision to prevent other stuff from getting too close, because I need to do physics queries on the HUD objects (selection mostly)

Ehm, you want to have a Model/Mesh in your HUD like a Character or Weapon Model?

UMG had something like this in it. In the “documentation” of UMG was a widget that provides the ability to render scenes in front of the HUD.

The other method would be to have the Scene somewhere else and capture it with another camera. Than use a texture stream to show what the camera shows. :X