cancel
Showing results for 
Search instead for 
Did you mean: 

stereo separation

Gerald
Expert Protege
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. 🙂
4 REPLIES 4

drash
Heroic Explorer
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!

drash
Heroic Explorer
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.

Gerald
Expert Protege
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 🙂

cybereality
Grand Champion
Great! Glad you guys sorted this out.