Forum Discussion
AndyDeveloper
6 years agoExplorer
OVROverlay hides controller models
HI all, I am attempting to build a UI using OVROverlay in Unity. It looks great BUT on mobile the overlay renders in front of any scene geometry, thus occluding the controller models and pointer rays. The same behavior can be observed in the OVROverlay scene in SampleFramework. A message in Player Settings indicates that the shared depth buffer is not available on mobile, so I am thinking it might be a limitation.
However, the Oculus Home scene and video player apps don't have this issue.
Any ideas?
However, the Oculus Home scene and video player apps don't have this issue.
Any ideas?
7 Replies
Replies have been turned off for this discussion
- MikeSwansonProtegeYou need to configure the OVROverlay as an underlay. See: https://developer.oculus.com/documentation/unity/latest/concepts/unity-ovroverlay/
- AndyDeveloperExplorerThanks Mike, it worked!! I set the OVROverlay as an underlay, and added a quad with the Impostor shader to "punch a hole" in the eye buffer.
Unfortunately my overlay is dynamic, translucent, and has irregular edges. I tweaked the Impostor shader to handle the texture's alpha, but the edges flicker a lot. This doesn't happen in overlay mode, perhaps because it's getting the alpha from a clearer texture. - yesbirdExplorerHi guys !
I am trying to do the same thing but can not figure out how to do it.
Doc says: "Use theUnderlay Imposter.shader(VR/Resources) on your to draw imposters in the delta space after all opaque textures are drawn, but before the alpha."
The questions are:
1. What object should use "Underlay Imposter.shader" ? I am using special toon shader for all my objects in scene, should I switch them to "Underlay Imposter" ?
2. How to implement "after all opaque textures are drawn, but before the alpha." What is the method to controls this order ?
Please, provide more details or point to appropriate information source. Any working Unity example could help a lot also.
Thanks in advance. - daniel_gorgen_9Honored GuestI had the same problem. Maybe it helps somebody.
In order to "punch a hole” in the eye buffer do the following.
Lets assume you have a quad with an OVROverlay-underlay on it.
- Create a quad with same size and add it to the same position in the scene. Make sure that it comes after your original quad in the tree.
- Create a new material with the "oculus/underlay imposter" shader.
It is important that the color is all black. Set smoothness and metallic to 1. It even works if you set it to 0, but then the result seems to be too bright. Best is to just try it.
- Add the material to the new quad
Thats it! - Heaney-555Heroic ExplorerThis doesn't work for me. I'm doing exactly as described and yet I still see avatar hands behind the underlay, not in front.
Does anyone have a sample they can share or a possible solution? - EclectusExplorer
This does work, for me - I used a new material with the "oculus/underlay imposter" shader, for my Lighting --> Environment --> Skybox Material.
There is a warning about the material not supporting skybox rendering - but it works fine, my Equirect underlay compositor layer is 'punched through to' by this shader, but rendered geometry (in the eye buffers) appears in front of it as I intend it to, see railings below.
Let me know if you need more details.
- RoxGameProtege
nothing worked for me i tried everything !
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 7 months ago
- 2 months ago
- 10 months ago