I’ve been able to work around this, but last night I noticed when adding a UI page to a scene that the vertical plane (or the perpendicular axis, in my case Y) is drawn at 0. There seems to be no way to raise the UI page. If I have a sprite or 3d object at -.1 or more it is drawn above the UI when the UI moves through/under it. Changing the transform on the UI page toggling Billboard on/off and re-orienting the entity does not appear to affect this. Am I missing something or is the UI page always drawn at the zero plane? I was able to bump my child elements down to get around this, but I could find no way to affect the UI page transform.
Could you add screenshot to illustrate your case? It is hard to follow with just a description.
Hmm, can’t do a screenshot at the moment, but I can try to restate the problem:
UI Page draws at the zero plane. If you add the UI page to a scene in an empty entity or make it a component of an entity, changing the Z transform position does not change the elevation of the UI page. I had other sprites at -.3 Z and they were rendered above the UI page. I had to push the entire scene down +1Z through a parent entity transform position (based on my relative position Z is the world Y position). So the problem I was seeing is that there was no way to change at what depth the UI page was being rendered.
I’m still not sure what your setup actually is. But I am guessing you have the UIComponent set to Full Screen? If so, looking at the code the entities world transform is essentialy ignored for Full Screen UIComponents.
If you want to make sure this UIComponent is rendered above all other elements in the scene then you would have to change it’s render group and modify your composition so that group is rendered last and that it ignores/clears current depth buffer.
I am currently not on a machine with Xenko on it so I can’t give you step-by-step instructions at the moment. If you still are having trouble I might be back
You can also render as billboard with fixed size.
So I came across this again, although this time I don’t want to offset the parent scene. Basically the problem is when I create an entity and add a UI Page component, any sprites in the scene render above that UI Page. If I offset the scene by some negative value (pushing the scene “down”) then the UI Page will render “above” or “after” the sprites. I’d like to resolve this at the renderer layer but I’m not so good with graphics rendering pipeline. I hope to get to more of this when I work with fog of war.
Here you can see on the left my UI is underneath the HQ sprite, which is merely lying on top of the platform.
I have tried using billboard for the UI Page and the problem persists. I’ve also played around with fixed size.
Here is a link to a short video demonstrating the scenario.
Any thoughts on how to do this, or perhaps an easier way to do this?
Thanks in advance.
I’ve tried setting the UI to Render Group 1 and then modifying the compositor through Game Studio but haven’t had any luck yet. It’s unclear to me how to create the Game Renderer composition.
I set the sort mode to none for the Transparent Render stage and now the UI is properly on top of all sprites. I noticed that it was sorting based on depth or location but couldn’t figure out how to modify the UI to ensure it was always on top. This did the trick for now, couldn’t figure out how to change the render order to do so based on render groups.