Rendering priority

Hello every one,
Can a rendering priority be made for a transparent object over an opaque object? I want the transparent object to always be rendered above the opaque object. Is this possible?
thanks.

Hi ,

its possible via a Postprocess Material and a custom depth stencil. There are some Tutorials out there discussing this topic, mainly for outline effects.

Best

Thanks for your reply. I will read this discussion.
Is there a solution other than post-process material? Because all the actors in my scene are dynamic, this is why post-processor materials usually have bad effects on it.

what you would do is give the actors you want to take account in your postprocess volum a custam Stencil and then its completley dynamic. Think of it like a realtime rendered mask.
If it should always render above everything this could possibly also be done in a Material.

Maybe you tell us a little bit about what you wanna archive, maybe there are other ways as well.

In my scene, there are different Opaque dynamics actors and only one transparent one. I want this transparent actor to render always higher than just one of the Opaque dynamics actors and render it by default on all other actors.

if you check ‘disable [the] depth test’ and ‘allow custom depth writes’ in the translucent material then use this for opacity it will sortof do what you’re saying. it will appear over anything with custom depth turned on.

Edit:Tweeked mat in pic

make sure the translucent item has custom depth on.

if the switch bool is true anything with custom depth on will block, if false the reverse.

I appreciate your suggestion.

2 Likes

Man you are a life savior.

At first I was a little lost but your material works absolutely perfectly. I can have my translucent material always visible except when the hands of my FPS Character are in front.

This is exactly what I was looking for (2 hours of research on the net). Thank you !!! <3