Skip to main content
Up and Coming
October 15, 2015

ETA for Layers support in Unity

Hi !

Is there any estimated date when the layers functionalities ( https://developer.oculus.com/documentat ... der_layers ) will be available in Unity ?
This is one of the most important feature in my opinion, as it could drastically improves the tools developers have to optimize games and applications on the rift (rendering UI at a higher resolution but only updated when needed, rendering particles effect with a lower resolution to not destroy the fillrate, turning off stereoscopy for distant objects etc ...)

Thanks in advance,
Robin
    This topic has been closed for replies.

    11 replies

    Inspiring
    October 15, 2015
    I am guessing it's not coming to Gear VR any time soon :roll:
    Inspiring
    October 15, 2015
    You can already use OVROverlay for head- or world-locked quads such as movie screens or crosshairs.

    Basically you make a textured quad with an unlit shader and drag OVROverlay.cs onto it.

    If it's parented to the Camera, it will be head-locked, else world-locked.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Participant
    November 3, 2015
    Sorry to revive an old thread but....

    I can't seem to get OVROverlay to work in the 0.1.3 oculus utilities using native Unity integration. Ideally, I'd love to reduce the VRSettings.Renderscale and have my unity gui retain a render scale of 1.0 for text readability.

    I also tried a work around by setting the renderscale to 1 when the menu is active then setting it to 0.75 when the menu is dismissed, but that causes a screen flash and some nasty tearing.

    Any way to do what I'm trying to accomplish?
    Inspiring
    November 4, 2015
    "korjiro" wrote:
    I can't seem to get OVROverlay to work in the 0.1.3 oculus utilities using native Unity integration.
    Can you give more detail on what isn't working? What platform are you using? It works on PC. On Android, there are two known issues: (1) the quad gets flipped and placed behind you due to a matrix issue and (2) if you don't set alpha = 0 around the edge of your texture, excess geometry appears. We are fixing both issues for an upcoming release.
    "korjiro" wrote:
    Ideally, I'd love to reduce the VRSettings.Renderscale and have my unity gui retain a render scale of 1.0 for text readability.
    Sorry, but this is at least a month away. For now, I would recommend trying to get OVROverlay working. That is more likely to be a performance win anyway. Updating and compositing multiple eye buffers is likely to be more expensive than a single quad.
    Participant
    November 4, 2015
    Thanks for the reply Dave, apologies for not giving more details in my original post.

    I'm running the recommended version of Unity (5.2.2p2) and I'm targeting Android. Another important detail is that I'd like to do this on CanvasRenderers using the Unity GUI. I've modified OVROverlay to attempt to support CanvasRenderers by grabbing the main texture from that instead of a traditional Renderer, but still no luck. I'll steer clear of trying to adjust the renderscale at runtime and try mucking around with the OVROverlay.

    Thanks!
    Inspiring
    November 7, 2015
    To use OVROverlay with uGUI, you probably need to render the uGUI UI to a RenderTexture and then display that with a Quad. Otherwise, the different UV and model matrix conventions of uGUI will not work with OVROverlay. Feel free to reverse-engineer OVROverlay, but it will be a bit more work.
    Inspiring
    November 7, 2015
    There are also 2 issues with OVROverlay when used properly that you should be aware of:
    1) Up to 5.2.2p3, on Android, there were issues with the modelview matrix that caused the overlay to appear upside-down and behind the camera. This is fixed in 5.2.2p4, due out this week.
    2) You need to add a transparent pad around the edge of your texture to avoid excess pixels due to the way we render the overlay on mobile. We're currently looking at a way to avoid this.
    Participant
    December 4, 2015
    Dave I was wondering if the Android fix definitely made it into 5.2.2p4 (also doesn't work for me on 5.2.3) because I'm still experiencing problems with my quads. A single quad shows up correctly after I added the padding but I'm having trouble getting all of the quads I want to appear. I'm making a 360 photo viewer and when I enable between 1 and 3 quads I can only see one of them and enabling all 6 that comprise my cube only causes 3 to show up. I've tried arranging them in different ways and making sure they don't intersect but I'm a little lost as to my next debugging step and I just thought I'd check in to see if you guys might have any insight.

    Thanks so much in advance, and I can provide a bunch more data if that'd help you guys out.
    Inspiring
    December 5, 2015
    So far, OVROverlay is still broken on Android. We are currently working on a fix, but it has turned out to be quite involved. The soonest the fix could appear is mid-December. I'll post here when it's fixed.
    Inspiring
    December 5, 2015
    "Gforman123" wrote:
    A single quad shows up correctly after I added the padding but I'm having trouble getting all of the quads I want to appear.

    OVROverlay only supports one quad at a time for performance reasons. It doesn't support 360 video yet. I would recommend using a regular sphere for now if you need to do 360 video inside of Unity. If there is no 3D geometry in your app, you might want to use Oculus 360 videos instead of Unity.