shawn75's picture

OpenTK Oculus Rift Distortion


I am currently writing my final collage paper on oculus rift and i stared using openTK kit. Its amazing.
But i have a few qvestions. I wonder where can i disable the distorsion that happens when the object
is near the edge and gets wider/longer. How can i enable barel distorsion so the image will not have
the fish eye efect. And can i change the angle or the view matrix of one of the eye views so i got the
3D effect.

Thnak you.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

OpenTK.Rift is currently using the libovr 0.2.x API, which expects you to implement the barrel distortion manually, using a fragment shader. You can find example code in the Oculus Rift documentation and the forums.

Starting with libovr 0.3.x, a barrel distortion shader is implemented as part of the API (you can still choose to override this.) A new OpenTK.Rift version for libovr 0.3.x is currently in progress (see, but no release date is set yet.

shawn75's picture

I am currently using the OpenTK.Rift api and it is amazing. Can u please tell me where can i change the different views for each eye so i will get more of a 3D effect ? Or is there already a difference between the eyes ?

What exactly does Rift.PredictionDelta do ?

I am sorry if i ask stupid questions but i am in a hurry to write my graduation work so i would like as help on this forum.

Thank you for your help.

the Fiddler's picture

IIRC, you can achieve a larger 3d effect by increasing the interpupillary distance in your eye translation calculations. If you are using the GL1 sample code, you can modify OculusCamera.cs:82.

PredictionDelta controls the time delta used for motion prediction (i.e. for PredictedOrientation etc.) The default value should work well enough for most systems; higher values may cause overshoot; lower values increase the apparent latency. Refer to the Oculus documentation for more information on motion prediction.