Rendering a mesh on top of everything

I added this to the constructor:

	Mesh1P->ViewOwnerDepthPriorityGroup = SDPG_Foreground;
	Mesh1P->DepthPriorityGroup = SDPG_Foreground;

But doesn’t works:

Am I missing something, or is this bugged?

Depth priority groups aren’t supported in UE4 - the properties should probably be removed or marked at least marked as deprecated.

Hi Jefferson,

Thank you for your report. Luke is correct that depth priority groups are not supported in UE4. I have entered a report that the properties should be removed or marked as deprecated.

Thanks!
-W

Ok.

Any workaround for that case (rendering the 1st person weapon mesh on top of world geometry)? Or, any chance to have depth priority groups back?

Yeah, what kind of solution you plan to use in this case?

Hi,

Thank you for your patience as I investigated the issue. Our rendering developers are aware of this imitation and are working on a solution.

Until it is implemented, I would suggest for this particular issue, you may want to make the collision larger so that the gun does not clip into meshes. Even with depth rendering priority changed, the gun would still be inside the other mesh, so a more realistic option would be to include the gun in the collision.

Cheers!

Alexander

So 1.5 years later was there ever a solution implemented?

2 years :smiley:

I would actually really like something like this to work. Not for first person gun clipping but for using a subuv particle emitter that does not clip into walls. I’m trying to remake an old game from '96 and want it as accurate as possible, and this is a big issue with the clipping particles. If it could be rendered on top of everything, that would be perfect. Why take something out of UE4 that actually works?

It’s because UE4 uses deffered rendering. “With a deferred renderer like UE4, it is hard to handle ‘foreground’ objects totally divorced from the rest of the scene - it tends to break down with shadows, lighting, depth effects etc. Also, placing them in a foreground DPG makes it very hard to have them ever interact properly with the scene.”

So now…1 year later…there’s an option in 4.17 the ability to switch to forward rendering…can we haz depth priority groups now?