Skip to main content
Up and Coming
May 18, 2013

stereo separation

I just imported the new SDK OVRCameraController into Unity, first time I tried it.
Had to change a bit in my game, but now it looks playable. BUT I have a very low stereo separation, how can I adjust that?

Sorry - pretty new to game design in general. :)
    This topic has been closed for replies.

    4 replies

    Inspiring
    May 19, 2013
    The stereo separation in the Unity integration comes from the actual positioning of the two cameras that belong to the OVRCameraController. Their X position values will be + and - half of the IPD, which by default is 64mm (so in Unity units 0.064), so you'll see CameraLeft's x pos is -0.032, and CameraRight's x pos is 0.032.

    Now, if it feels off, here's a few things I can think of to check:


    • Is the you have world scaled such that 1 meter = 1 Unity unit?

    • Do you need to adjust the IPD to more closely match your own? (To adjust you can either set the IPD by script using the camera controller component's SetIPD() method, or if you have an OVRMainMenu in your scene, you can use the = and - keys to adjust it in-game.)

    • Is your in-game "avatar" at the correct height above the ground? If there is a mismatch between your IPD and height that could also cause it to feel odd since it's differen than what you're used to.

    • Is your camera inside a hierarchy of gameobjects that has been collectively scaled to something other than 1.0? If that's the case and you need to keep it that way, you'll want to modify OVRCamera.cs a tiny bit. At the bottom of SetCameraOrientation(), there are two statements that update the camera's position using neck and eye position (which includes the x offsets for your stereo separation), and you'll want to update those to account for the camera's effective scale:

      gameObject.camera.transform.position = gameObject.camera.transform.parent.transform.position + NeckPosition * gameObject.camera.transform.lossyScale.z;

      gameObject.camera.transform.position += q * (EyePosition * gameObject.camera.transform.lossyScale.z);

      Note that here I'm just using one component of the scale vector (z) because I'm assuming that any rescaling being done is being applied uniformly across all 3 axes.

    • There may be other possibilities that I didn't list.


    Hope this helps!
    Titans of Space PLUS for Quest is now available on DrashVR.com
    Inspiring
    May 19, 2013
    Another thing to add here is that if you don't have a Rift yet (although I think you do, now that I think about it), you can sort of test by having it render a crosseyed mode by modifying OVRCameraController.UpdateCameras() to swap the two calls to ConfigureCamera() so that the x offsets are swapped.
    Titans of Space PLUS for Quest is now available on DrashVR.com
    GeraldAuthor
    Up and Coming
    May 19, 2013
    drash thank you very much - this is awesome. I guess I know now where the main issue is, because in my toon game I have not followed the 1 unit = 1 m rule. duh!
    And now I am able to implement IPD settings, that is awesome! Thank you so much :)
    check out my Mobile VR Jam 2015 title Guns N' Dragons
    Inspiring
    May 20, 2013
    Great! Glad you guys sorted this out.
    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