Working with the Rift requires per-eye manipulation of both the modelview and projection matrix. The modelview matrix needs a horizontal translation that gives objects a sense of depth by providing a different viewpoint for each eye. The projection matrix takes a different horizontal translation that provides the correct per-eye field of view and also serves to center the the scene under the lens axis, instead of in the viewpoint center.
Matrix manipulation can be a bit of a pain, though and getting the manipulation wrong is pretty easy to do. For this reason my initial examples working with the Rift in any language or toolkit always involve rendering a small colored cube of a specific size very close to the viewer. This type of scene serves as a useful test for a variety of ways it's possible to screw up the matrices or their application to the scene.
I'm going to look at why that is, and what the effects of incorrect matrix manipulation look like
Articles related to virtual reality with a focus on software development, by the authors of Oculus Rift in Action.
Showing posts with label modelview. Show all posts
Showing posts with label modelview. Show all posts
Monday, March 10, 2014
Monday, October 14, 2013
Understanding Matrix Transformations for Rendering to the Oculus Rift
If you look at the examples in the Oculus SDK or in my example, you may notice that in the normal course of rendering, there are modifications to both the model-view matrix, as well as to the projection matrix. Each matrix is translated on the X axis by a small amount, but it's not really immediately obvious why. This article will attempt to make the issue a little clearer by going into the purpose and effect of each translation.
Subscribe to:
Posts (Atom)