Error in stereo.conf

Michael Dürig <[email protected]> Tue, 09 May 2006 13:49:59 +0200
Newsgroups gmane.comp.graphics.chromium.devel
Message-ID <[email protected]>
Regarding the stereo*.conf files which come along with Chromium I think 
there is an error in the calculation of the viewing frustum.
Shouldn't it be

# Projection matrix
p = crmatrix.CRMatrix()
if eye == 0:
   left = s * ((halfWidth * -aspect) + EyeSep);
   right = s * ((halfWidth * aspect) + EyeSep);
else:
   left = s * (halfWidth * -aspect - EyeSep);
   right = s * (halfWidth * aspect - EyeSep);

instead of

# Projection matrix
p = crmatrix.CRMatrix()
if eye == 0:
   left = s * ((halfWidth * -aspect) - EyeSep);
   right = s * ((halfWidth * aspect) - EyeSep);
else:
   left = s * (halfWidth * -aspect + EyeSep);
   right = s * (halfWidth * aspect + EyeSep);


For the left eye the scene is shifted to the right by EyeSep. This 
results in a right shift of the corresponding near plane by s*EyeSep.

I verified the above in our CAVE environment by displaying a vertical 
line exactly at the focal distance. Moving the line back and forth along 
the z-axis it will always display in negative parallax in the first 
case. In the second case however it will correctly display in 
negative/positive parallax depending on the z-coordinate being behind/in 
front of the focal distance.

Michael




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642