"Interesting.. I saw this post of 6 months ago and its identical to the
problem
I'm having now."

Ultimately, I wound up creating a descendant of
OsgUtil::SceneView::ComputeStereoMatricesCallback,  and setting it with

sceneView->setComputeStereoMatricesCallback( new MyStereoMatrixCallback );

The math is basically simple geometry.  Essentially the angle the eye should
be looking at can be calculated from the interocular distance and the
convergence * (zFar-zNear).   I just used that angle to make a rotation
matrix and half the interocular distance to make a translation matrix, and
applied those to the projection matrix.

This gave me results much closer to what I was expecting. Especially in a
head-mounted display.

It's possible I was just making things hard for myself, but I just couldn't
get OSG to give me reliable stereo matrixes once I started adjusting values
like the interocular distance, or the convergence distance.

-Andy

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to