How to disable depth test for 3D UMG widget ?

Is it possible to disable depth test on 3D UMG widget ? (so that it renders over any geometry in the scene)

Thanks

I am also looking for this!! grumble grumble grumble lol.

There is some good stuff in the reply I got here: https://www.reddit.com/r/unrealengine/comments/4gzcdd/custom_depth_pass_how/

Unfortunately none would work for mobile VR and 3D widget (UMG) :frowning:

Epic, please help mobile VR devs :o

So, if it’s not feasible to achieve with current UE4, please let us know and it would be filed as feature request :o

Bumpy bump

Look for Material’/Engine/EngineMaterials/Widget3DPassThrough.Widget3DPassThrough’ material in the engine content folder (make sure the content is visible by going to the view options on the bottom right corner of the content browser) Open up the material and turn on disable depth test, save and you are done.

Note: It will make all 3D widgets have depth test disabled from now on.

Thanks, but I only need to disable depth testing on a few 3D widgets that are used as 3D gui elements (in VR, mobile). Is it not possible?

Widgets in the world act different to ones attached to camera. Those will act normal, only those attached to camera, like a HUD will have Depth Disabled. And dont forget in Widget attached to camera to set depth etc. 0 far 100+ closer…

EDIT:

For HUD Widgets - Set to Translucent and check Render Custom Depth Pass and Set your Translucency Sort Priority (again ) far away 100+ higher is closer…

For World Widgets - Set to Masked and check Render Custom Depth Pass (no need to set Translucency Sort Priority - 0 is fine)

This should help…

UI-UMG in World will now fall behind objects etc.
And your HUD will be depth disabled - and over everything…

Hi. I’m aware this thread is a few years old, but I’m hoping some of you might have an answer.

​​​​​When disabling depth test, how can I get the line trace to hit only those objects? My menu system is depending on the line tracer, but when the menu is spawning inside a wall, the tracer still stops at the wall or floor etc. I’d appreciate any hints here. Thank you.

Hello, WilliamHooper, I can’t get the following to work:

“For World Widgets - Set to Masked and check Render Custom Depth Pass (no need to set Translucency Sort Priority - 0 is fine)”

I have a camera in a blueprint (motionControllerPawn), and I created a widget as a child of that camera, then set “details>rendering>renderCustomDepthPass”. however, the widget is still occluded by scenery, etc.

Can you offer any suggestions?

Hi everyone,

I was struggling with this sometime and I wanna share something. “Disable Depth Test” in the Material work for me, but it was necessary to set the Material to Translucent in all the instance materials related to the Material used in the widget (In my case, the default material was an Instance of an Instance of a Material). I make a copy of all the instances and the material and change each of them to translucent.

2 Likes

Years old, but again for future if anyone sees this and has the same question. Id suggest going to project settings, collision, then create a new trace channel which ignores everything by default and tell the menu to block it. That way if you fire the line trace using that trace channel, itll ignore everything but the menu.

3 Likes

If you can put the widget into a BP actor, the widget has a material assigned to it, and then change that material to disable depth test.

years after, for anyone looking, another way that has worked for me is to place a solid object behind the 3d UMG widget, like a plane. I was experiencing problems when using a UI material on a 3d screen, however once i placed the plane behind it, my depth issues were solved.