Forum Discussion
HeyDonny
10 years agoHonored Guest
Handling UI with left/right cameras
I'm displaying stereoscopic images with left and right cameras successfully. The issue I have is how to best display UI elements within the same space. I've created a third camera that targets both eyes solely for UI. But the elements still appear more blurry compared to when I disable the left and right cameras. How can this be resolved?
4 Replies
Replies have been turned off for this discussion
- vrdavebOculus Staff> But the elements still appear more blurry compared to when I disable the left and right cameras.
You could use layer masking to make the UI visible to both of the left/right cameras while the stereoscopic content for each eye is only visible to the camera for that eye. Also consider rendering the UI to a RenderTexture and applying it to an OVROverlay for sharper sampling. You can use OVRRTOverlayConnector for that. - HeyDonnyHonored GuestThanks vrdaveb. Could you provide a little more detail on the layer masking please? I'm quite new to Unity. By UI, I'm currently just using a modified SelectionSlider referenced on this page: https://unity3d.com/learn/tutorials/topics/virtual-reality/interaction-vr?playlist=22946. So several of these Selection Sliders are placed within the scene to navigate (for example room to room).
- vrdavebOculus StaffI assume you are showing per-eye content similar to this example. To make your canvases appear for both eyes there, set their GameObjects' Layers to "Default" (or another new layer of your choosing) and make sure the layer mask for each camera includes that layer (already the case for Default). Here's an example with a simple Quad primitive:
- HeyDonnyHonored GuestThanks for this vrdaveb. I have tried using this approach as well prior to using 3 cameras. I found with 3 cameras the text was a bit better when compared.
Looking at the 360 Photos application, I've found that maybe a proper solution isn't available yet. As the application toggles between stereoscopic - when viewing the images, and monoscopic - when opening the menu to move between images. I think I'll just use a similar approach for now.
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
- 5 months ago
- 7 months ago