Game Development Community

Oculus - ajust 3D deformations?

by Michael Kriegs · in Torque 3D Beginner · 09/03/2013 (1:44 am) · 1 replies

When looking around in my game environment with the Oculus Rift, I have the effect, that everything that comes to the center of the display appears to come closer. It looks a bit like a fish eye effect.

For example, when I look to the horizon the distance to the ground whereon I stand seems to be as it should be (ca. 1.5m). But when I look straight down to the ground the distance to my eyes is felt like only 40 cm.
Walking on a flat ground by looking downwards the ground raises up when it comes closer to the center of the display and lowers again when it goes futher from the center. It looks a bit like a bulb. The effect is the same with every object. The closer an object is the more this effect comes out.

My question:
Are there any options for the Rift to ajust for example
- the eye distance (stereo camera distance)
- the stereo cameras angle
- deforming the render output, more fisheye, less fisheye
- others...

It does not matter if the ajustments have to be done somewhere in C++ or in Torque's C# Scripts

Thanks, Michael

About the author


#1
09/03/2013 (9:41 am)
That doesn't sound right at all. The view within the Rift should look fairly true to life. Looking at T3D's output without using a Rift would certainly give you a fisheye feeling. On your Rift does T3D's output appears to be significantly different than that of the OculusVR SDK's Tuscany demo?

If you want to play with the settings you'll need to make some code changes as nothing is currently exposed. It all comes from what the SDK provides, which if you compile with at least SDK v0.2.3 should come from your default profile you set up with the SDK's OculusConfigUtil. Here is where the data is read from the Rift and the work is done:

  • Engine/source/platform/input/oculusVR/oculusVRHMDDevice.cpp: OculusVRHMDDevice::set() is where the values are read from the SDK. OculusVRHMDDevice::calculateValues() is where values are calculated based on the input from the SDK, including vertical FOV and eye offset.
  • Engine/source/platform/input/oculusVR/barrelDistortionPostEffect.cpp: This is where the parameters are set up for the barrel distortion shader.
  • shaders/common/postFx/oculusvr/barrelDistortionP.hlsl: This is the barrel distortion shader that performs the warping of the final image for the Rift's lenses.
Hopefully that will get you started.

- Dave