How to properly set eye offset for stereo rendering in OpenGL
Hi,
I am trying to integrate Oculus Support to a 3D modeling software.
The software has its own Camera structure and rendering loop written in OpenGL.
I figured the solution for stereo rendering is to change the position of the camera by a difference of IPD when rendering for each eye?
My question is that the camera is located at some far distance OpenGL unit from the scene, e.g. at (0, 0, 5000).
Then I would try to set the camera offset distance using ovr_GetRenderDesc() to calculate HMDtoEyeOffset by ovr_CalcEyePoses().
And add HMDtoEyeOffset to the camera position for each eye rendering?
But the offset I calculated using the Oculus SDK is relatively minimal, since I think one Oculus unit is 1 meter so calculated offset is about 0.032 units for each eye because IPD is 64mm.
Is the assumption wrong that adding such a small offset to the camera located at (0,0,5000) viewing an object rendered at (0,0,0) would not matter enough to produce stereo effect? i.e. such a small offset is same as not moving camera at all.
Could anyone answer how I could convert the offset unit calculated by the Oculus SDK to scale to the units in a OpenGL program?
Thank you.
I am trying to integrate Oculus Support to a 3D modeling software.
The software has its own Camera structure and rendering loop written in OpenGL.
I figured the solution for stereo rendering is to change the position of the camera by a difference of IPD when rendering for each eye?
My question is that the camera is located at some far distance OpenGL unit from the scene, e.g. at (0, 0, 5000).
Then I would try to set the camera offset distance using ovr_GetRenderDesc() to calculate HMDtoEyeOffset by ovr_CalcEyePoses().
And add HMDtoEyeOffset to the camera position for each eye rendering?
But the offset I calculated using the Oculus SDK is relatively minimal, since I think one Oculus unit is 1 meter so calculated offset is about 0.032 units for each eye because IPD is 64mm.
Is the assumption wrong that adding such a small offset to the camera located at (0,0,5000) viewing an object rendered at (0,0,0) would not matter enough to produce stereo effect? i.e. such a small offset is same as not moving camera at all.
Could anyone answer how I could convert the offset unit calculated by the Oculus SDK to scale to the units in a OpenGL program?
Thank you.
