Skip to main content
Inspiring
April 15, 2014

SDK v0.3.1 Unity 4 Pro Integration discussion

New topic. Oculus SDK v0.3.1 Preview Unity 4 Pro Integration general discussion.

What are your thoughts? My initial impression is that I like how the FOV edges fade/blur off. But after playing in tuscany for a little bit, I'm noticing slight distortions on lines that I should perceive as vertical, but do not while rolling my head left and right.
    This topic has been closed for replies.

    32 replies

    Participant
    April 17, 2014
    @cybereality: I don't think Neck Position will work, since im not modelling the Rotation of the Rift around the Neck, but around the position of a Razor Hydra attached to the headstrap:
    https://www.youtube.com/watch?v=LdTEmp3W7FE
    To do this i set everything (neck, eye ...) to 0, made the Hydra Controller a parent of the Rift and moved it to the appropriate relative position.

    But its not a real issue for me, since the Hydra Headtracking is a workaround for the DK1 anyway and i still can change the eye center in the config utility as a quick workaround. I just wanted to report the issue, so it can be fixed in future releases. Also im not even considering it a real bug, because the "eye center" settings of the Config Utility should only be overwritten if it is enforced.
    New Participant
    April 17, 2014
    "excelynx" wrote:
    Another note: This SDK seems to completely break a number of Unity's Image Effects. Bloom and Tonemapping don't work by themselves. They cause the camera/view to go black. For some reason if I enable Ambient Obscurance both the Bloom and Tonemapping then work, but the AO itself does absolutely nothing.


    I ran into the same issue, setting the cameras "Rendering Path" to "Deferred Lighting", or changing to it in "Project Settings->Player", re-enabled them for me.

    also noticed the OVRCameraController prefab is not working. if you detach the one from the OVRPlayerController it is working fine...
    Up and Coming
    April 17, 2014
    "Slartibartfast" wrote:

    I ran into the same issue, setting the cameras "Rendering Path" to "Deferred Lighting", or changing to it in "Project Settings->Player", re-enabled them for me.

    also noticed the OVRCameraController prefab is not working. if you detach the one from the OVRPlayerController it is working fine...


    Thanks for the suggestion! Seems like it still happens on my end, as I already had my rendering path set to Deferred Lighting and changing it doesn't have any effect. I also tried changing it on the individual cameras too.

    If I place a new OVRPlayerController in a new scene in a new project with just enough geometry to see, and then drop a Tonemapping Image Effect on to the camera it works fine. If I do the same thing with my existing project (with a new scene) then the camera goes black. I didn't have this issue with 0.2.5c and thus far I've been unable to figure out where it's breaking. I'm used to Unity bugs being weird, but this one is pretty strange.
    VisiR - Virtual Reality Music Visualisation
    New Participant
    April 18, 2014
    The reprojection method of the unity 0.3.1 preview involves some ovr lib internal GL.Clears which breaks any option to render multiple camera's at the same time.

    Is there going to be a workaround for this in the new sdk as a lot of space simulations and large scenes require multiple camera's for depth layering and some custom gui's like to use the multiple camera options as well for orthographic purposes as overlay on perspective projection ?
    Up and Coming
    April 18, 2014
    You need to do all that rendering before the distortion pass, otherwise the SDK can't do its job properly. The distortion and re-projection needs to happen at the last possible moment before the image is passed to the display, after you are totally finished with the frame.

    You can still have all the cameras you want, just make sure they render before that.
    New Participant
    April 18, 2014
    "owenwp" wrote:
    You need to do all that rendering before the distortion pass, otherwise the SDK can't do its job properly. The distortion and re-projection needs to happen at the last possible moment before the image is passed to the display, after you are totally finished with the frame.

    You can still have all the cameras you want, just make sure they render before that.


    I got a test scene with a cube and a sphere.
    SphereCam is an OVRCameraController prefab.
    CubeCam is an OVRCameraController prefab.

    Sphere is on a layer called 'sphere'.
    SphereCam has CamLeft and CamRight's culling mask set to the sphere layer.
    They both render depth 0 and 1.
    Clear flags is skybox.
    On the OVRCamera controller component, lens correction and chromatic are false (unchecked).
    I even disabled OVRDistortion Camera script just to see if it worked, but it didn't make a difference.

    Cube is on default layer.
    CubeCam has CamLeft and CamRight's culling mask set to everything except the sphere layer.
    The both render depth 2 and 3.
    Clear flags is depth only.
    On the OVRCamera controller component, lens correction and chromatic are true.

    Tried a lot of combinations and shifted things around, but whenever I enable the second pass with the cube, my first sphere pass gets erased.

    :(

    Edit: on the older sdk's I have no problem accomplishing this setup and all works fine, so it has something to do with my understanding of the screen quad cams. How can I let the first pass draw its results on the quad of the final distortion result camera or something like that.
    sh0v0r
    Up and Coming
    April 21, 2014
    "dvanhaazel" wrote:
    The reprojection method of the unity 0.3.1 preview involves some ovr lib internal GL.Clears which breaks any option to render multiple camera's at the same time.

    Is there going to be a workaround for this in the new sdk as a lot of space simulations and large scenes require multiple camera's for depth layering and some custom gui's like to use the multiple camera options as well for orthographic purposes as overlay on perspective projection ?


    Yes, this is a big problem for Lunar Flight which uses multiple camera controllers.

    I use one for the Cockpit which has a very low Nearclip so you can see your body and another that renders the world with a larger nearclip so that there are no ZBuffer problems due to the draw distances.
    sh0v0r
    Up and Coming
    April 21, 2014
    "boone188" wrote:
    We have a fix in place for the distortion issue. We've also made some performance enhancements. We're hoping to get a fix release out soon.

    I will look into implementing a near/far camera solution.


    Cool! 8-)
    sh0v0r
    Up and Coming
    April 21, 2014
    "dvanhaazel" wrote:
    "owenwp" wrote:
    You need to do all that rendering before the distortion pass, otherwise the SDK can't do its job properly. The distortion and re-projection needs to happen at the last possible moment before the image is passed to the display, after you are totally finished with the frame.

    You can still have all the cameras you want, just make sure they render before that.


    I got a test scene with a cube and a sphere.
    SphereCam is an OVRCameraController prefab.
    CubeCam is an OVRCameraController prefab.

    Sphere is on a layer called 'sphere'.
    SphereCam has CamLeft and CamRight's culling mask set to the sphere layer.
    They both render depth 0 and 1.
    Clear flags is skybox.
    On the OVRCamera controller component, lens correction and chromatic are false (unchecked).
    I even disabled OVRDistortion Camera script just to see if it worked, but it didn't make a difference.

    Cube is on default layer.
    CubeCam has CamLeft and CamRight's culling mask set to everything except the sphere layer.
    The both render depth 2 and 3.
    Clear flags is depth only.
    On the OVRCamera controller component, lens correction and chromatic are true.

    Tried a lot of combinations and shifted things around, but whenever I enable the second pass with the cube, my first sphere pass gets erased.

    :(

    Edit: on the older sdk's I have no problem accomplishing this setup and all works fine, so it has something to do with my understanding of the screen quad cams. How can I let the first pass draw its results on the quad of the final distortion result camera or something like that.


    They need to share the same render texture somehow I'm guessing that is the problem?
    Inspiring
    April 21, 2014
    @excelynx: I have filed a bug for the image effect / black screen issue.
    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