Ioquake3 stereo view v2

Thilo Schulz arny at ats.s.bawue.de
Sun Apr 20 17:16:32 EDT 2008


Hello,

as the last patch was an early version quickly hacked together, the 
stereoscopic projection was not done correctly yet. The method first used to 
do this inherently resulted in a negative parallax which means that all 
rendered objects seemed to be in front of the screen plane, with points going 
towards infinity reaching the screen plane.

However, over the weekend I did the maths and modified the GL projection 
matrix such that objects can appear to be in front of the screen as well as 
behind it.
You can see the results here (all new pictures as the old ones are obsolete):
http://thilo.tjps.eu/bilder/screenshots/quake3/

And here is the diff again to make it happen:
http://thilo.tjps.eu/download/patches/ioquake3-rev1323_anaglyph_v2.diff

Following values will now affect the stereoscopic effect:

r_anaglyphMode - set this to one to get anaglyph stereoscopic rendering

r_stereoEnabled - set this to one to get in theory stereoscopic rendering for 
shutter glasses. However, I haven't tested this as I don't have the hardware. 
There probably needs to be done some initialization stuff to tell OpenGL it's 
rendered stereoscopically..

r_zProj - set the distance of the observing camera to the projection plane, in 
quake3 standard units. Objects at the distance of the projection plane will 
appear to be sitting directly "on" the screen as parallax is zero there.

r_stereoSeparation - set the separation of the eyes in units. Note, the nearer 
the projection plane to the camera, the more this will result in shifted 
picture, so if you change r_zProj value, you may need to change this one, 
too.

Have fun!

-- 
Thilo Schulz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://icculus.org/pipermail/quake3/attachments/20080420/5e1b31e5/attachment.pgp>


More information about the quake3 mailing list