Download

Rendering a billboard in front of everything except specific actors possible?

I know I can set “Disable Depth Test” in the material properties to make it render in front of EVERYTHING.

My question is; is there a way to make it render in front of everything, except when a specific actor is visible, in front of it; to the active camera?

Scenario:

  1. Billboard Actor represents enemy location
  2. Player can’t see enemy location directly due to wall blocking it (Billboard Actor is rendered in front of wall, as it does normally with “Disable Depth Test” enabled)
  3. Player moves so that they can directly see Billboard Actor in their line of sight and Enemy Actor is in between Billboard Actor and Player. The Billboard should now be behind the enemy actor.

*Covets: If Enemy Actor is not rendered (behind a wall for example), but is between Billboard Actor and Player the Billboard Actor should render as if “Disable Depth Test” was enabled.

Any thoughts?

Bump, also looking for how to do this.

You could flag the occluder objects to render to the custom depth buffer. Then in your billboard material you could read from this buffer and manually check for occlusion.