Skip to main content
Inspiring
June 16, 2015

Unity 5.1 and the Oculus Integration (Official Info)

Howdy,

A lot of changes are occurring with Unity VR development quickly, so we wanted to be sure to give you a clear heads up about what is happening, when it will happen, and what it means for developers.

= Unity First-Party Support =

Unity 5.1 introduced first-party support for virtual reality, making it easy to substitute a stereoscopic VR camera for your main camera by selecting the "Virtual Reality Supported" check box in Player Settings. The initial release of v 5.1 provides support for the Oculus Rift only.

On June 12, Unity released version 5.1.0p1, adding Gear VR support. All developers wishing to update to Unity v 5.1 should select this release, which is available for download here:
http://unity3d.com/unity/qa/patch-releases

For details on implementing Unity's first-party VR support, see the Unity manual: http://docs.unity3d.com/Manual/VROverview.html.

= Unity 5.1 and the Oculus Integration =

Unity 5.1 first-party VR support is incompatible with legacy versions of the Oculus Unity Integration (versions 0.6.0 and earlier). Projects using legacy versions of the Integration will only work with Unity v 5.1 if the "Virtual Reality Supported" box in Player Settings is not selected. In that case, they should work normally.

Oculus will be shipping an update to our Unity Integration shortly. If you import the new Oculus Integration version into a legacy VR project, it will work normally with Unity 5.1.

Once you update to this version, our Integration will work for the Rift and Gear VR if "Virtual Reality Support" is enabled.

= Known Issues =

Moving to Unity 5.1 is a substantial upgrade for VR development, and we recommend carefully choosing your timeframe for making the update. There is always risk in moving early to a new major release that you may encounter problems related to VR performance or otherwise.

Please let us know about any issues you encounter in the Oculus Unity forums, and keep your eye out for updates.

We are currently aware of the following issues with 5.1:

• All moonlight scripts, including platform UI, CPU/GPU levels, and overlay, are currently incompatible with 5.1.0. Updated versions will come with 0.6.0.1. The following features will no longer work:
• MediaSurface
• TimeWarp sub-stepping (only supports 60, no longer 20 or 30)
• Linear lighting (sRGB) and eye texture MSAA currently don't work. This will be fixed in Unity 5.1.0p2.
• VR.VRSettings.renderScale has no effect on Android.
• There is currently no way to render separate content (stereo video) to each eye. This may come back in a future Unity version.

For release notes and known issues in Unity 5.1:
https://unity3d.com/unity/whats-new/unity-5.1
    This topic has been closed for replies.

    108 replies

    Up and Coming
    September 1, 2015
    What would really be useful is a shader constant that tells us which eye is currently being rendered. Then we could use static branching to change whatever properties we want for each eye, such as a UV offset in a vertex shader to show different regions of a texture atlas.

    Though it would be much better if Unity supported texture arrays, then that constant could just be used as an index.
    New Participant
    September 3, 2015
    "VISIONSBOX" wrote:
    "cybereality" wrote:
    • There is currently no way to render separate content (stereo video) to each eye. This may come back in a future Unity version.

    Any news on this? This is a feature needed, when you want to use 3D content combined with stereoscopic panoramic content.


    I was just trying to set a different skybox for the left and right eye (rendered in Octane as stereocubemap).
    I know that Virtual Desktop can display those rendered stereo cubemaps, but that still leaves a floating computer screen.
    With the Unity Integration package this could work in Unity4.6?
    I would love to have some import wizard in Unity that just loads these and press play and view in Editor. Or an exe where you can select those cubemaps with the Rift on.
    I have them on my GearVR in the ORBX viewer, looks great. But I want to able to look on my workstation with DK2 too.
    Inspiring
    September 3, 2015
    Yes. The Unity 4 integration always uses separate cameras for the left and right eyes, so you should be able to switch RenderSettings.skybox in a script's OnPreRender() function.
    Up and Coming
    September 4, 2015
    It also appears that specular lighting is computed with the "center eye" position now, so specular lighting is not stereo-correct, but appears "painted on" the surface. Its a pretty huge visual downgrade from Unity 5.0, makes it look like a cheap post-production converted 3d movie.
    Inspiring
    September 4, 2015
    That may be fixed in 5.1.3p2, but I haven't tested it yet to be sure.
    Participant
    September 29, 2015
    Hey,
    We recently switched from Unity5 to 5.1 with the Oculus Integration.
    In Unity5 we used eyeTextureAntiAliasing = 2 to smooth edges and nativeTextureScale = 1.25 or 1.5 and virtualTextureScale = 1 to sharpen the wohle image. It made a big difference.

    In Unity 5.1 with the Oculus Integration those variables are mapped to AntiAliasing = 2 in Quality Settings and VRSettings.renderscale = 1.5;

    But the visual difference in 5.1 is hardly visible. Even switching between renderscale = 1 and renderscale = 4 (tried it at runtime and between starts) hardly sharpens the visuals, specially compared to using the same values in Unity 5..

    So I don't think renderscale and nativeTextureScale are the same?*
    Is there a way to access the original attributes or get the old behavior back? The AntiAliasing works fine, but renderscales behavior changed for values > 1.


    *I know that renderscale uses virtualTextureScale when you set a value that is lower than the current nativeTextureScale. But even if you only go for bigger values 1 -> 4, so only nativeTextureScale is set, the visual difference is not the same.
    Writer for Bloculus.de the German Virtual Reality Developer Blog Professional software developer for VR, Collector of old Gaming Hardware
    Inspiring
    September 29, 2015
    QualitySettings.antiAliasing and VRSettings.renderScale (>1) map to exactly the same values that were set by OVRManager.eyeTextureAntiAliasing and OVRManager.nativeTextureScale. I just tested them here and they seem to work. Are you maybe using deferred rendering? Do they work in a fresh project with no special scripts present?
    September 30, 2015
    Hi I just got my DK2 and positional tracking works in all the demos I try but not in my own unity project.
    Inspiring
    October 1, 2015
    @TheWhiteReaper: What are you using for your camera and player controller? Oculus Utilities? What Unity version?
    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
    October 1, 2015
    "cybereality" wrote:
    @TheWhiteReaper: What are you using for your camera and player controller? Oculus Utilities? What Unity version?



    Standard Camera with Unity's integrated VR support. (I notice opening a new project with nothing done to the camera only VR mode on does the same thing) Latest version of Unity 5.


    I developed my Dream Knights project everyday before-hand on a DK1 (Just got my DK2 today); could it be using my DK1 before hand has screwed my Unity VR mode?


    Rotational tracking works fine I love the picture quality VS DK1, its just like I said positional tracking isn't working in dream knights but positional tracking does work on any of the Oculus demo scenes or the few demos on oculus share that have the new 0.7 etc.