When using a default VR camera rig with Target Eye set to "Both" the IPD is automatically applied to the left and right views. Is this still the case when you setup a custom rig with two separate cameras that have Target Eye set to "Left" and "Right"? In other words does each camera automatically get offset by half of the IPD or does the offset have to be manually applied by the transforms in the custom rig? Is there any documentation that covers how IPD is applied? I'm guessing it's been done by a modification to the view matrix but I'd like to get some more details.
I created a test scene in which I made two camera rigs, one stock and one split into left & right cameras. I did not attempt to manually apply any IPD adjustment; the cameras in both rigs were setup at 0, 0, 0 with scale 1, 1, 1. I switched between the two cameras and captured the output in the SteamVR headset mirror using the "Both Eyes" setting. In both cases the images were similar and both had clearly different left and right eye views so unless I can find any documentation that indicates otherwise it seems the IPD is applied automatically regardless of whether you're using a stock or split camera rig.
I dug into this with a little test script: Code (CSharp): Vector3 cameraPositionDiff = leftCamera.transform.localPosition - rightCamera.transform.localPosition; Matrix4x4 leftMatrix = leftCamera.GetStereoViewMatrix(Camera.StereoscopicEye.Left); Matrix4x4 rightMatrix = rightCamera.GetStereoViewMatrix(Camera.StereoscopicEye.Right); In the debugger it was clear that cameraPositionDiff was always zero while leftMatrix and rightMatrix were different. Also wanted to point out that the Editor's camera preview can be misleading here; it doesn't seem to reflect the left eye or right eye view matrices even when they are split into two different camera objects with Target Eye set. I'm guessing that it's setup to always show the "center" eye. The SteamVR headset mirror is the easiest way to get an accurate preview.
Hello, I'm interested in this as well. Have you discovered if there is a different between having two separate eye cameras vs "both" in terms of the final composited image? Also, is there a way to adjust the IPD at runtime through script? In the documentation: https://docs.unity3d.com/ScriptReference/Camera-stereoSeparation.html It says "Note that most VR devices provide this value, in which case setting the value will have no effect."
Hi there When using the XR Rig, is there any way to make the scene feel smaller or bigger? I've tried scaling the camera, which works in principle but then I need to scale all my in game UI, and the hand controllers. It would be great if we can just set this IPD and then the only difference would be what one would expect it to be. Anyone else have any insight into how this is done? Thanks in advance Brian