Forum Discussion
hesham
13 years agoProtege
OpenGL Stereo Camera Setup and Convergence
Edit: I think that my baseline needs to change to get rid of the 0.5 up front, but everything else still broken: float const baselength = near_ * std::tan(M_PI * (fov_/2.0 / 180.0)); I've been stuc...
hesham
13 years agoProtege
Note: my update from the MTBS3D forums where I got some help in case this is useful for anyone else doing OpenGL Rift development. I would love any comments as to why this works or if this is wrong in any way as well.
You guys will love this :) All of it works now. tbowren mentioning the translation matrix multiplied by the projection implied to me translation needed to happen first. Here is my final rock solid tracking :) The key thing to note is that I'm doing the IOD first, followed by the projection matrix followed by the Rift rotation. When rotating I was getting sheer and I fixed that by dividing the physical screen width by 2 (I was doing 1280/800 instead of 640/800). One thing I will say that is painful is that it is very hard to get perfect focus because of the size of the pixels. I can read the text in ibex when up really close and there is only so much you can do when a letter is many physical pixels wide :) Either way thanks everyone! If anyone has any more comments or questions please let me know or ask here! I will say using a VR desktop can be painful at the current resolution.
You guys will love this :) All of it works now. tbowren mentioning the translation matrix multiplied by the projection implied to me translation needed to happen first. Here is my final rock solid tracking :) The key thing to note is that I'm doing the IOD first, followed by the projection matrix followed by the Rift rotation. When rotating I was getting sheer and I fixed that by dividing the physical screen width by 2 (I was doing 1280/800 instead of 640/800). One thing I will say that is painful is that it is very hard to get perfect focus because of the size of the pixels. I can read the text in ibex when up really close and there is only so much you can do when a letter is many physical pixels wide :) Either way thanks everyone! If anyone has any more comments or questions please let me know or ask here! I will say using a VR desktop can be painful at the current resolution.
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glTranslated((i2 == 0) ? IOD: -IOD, 0, 0);
gluPerspective(90.0f, width/2.0/height, 0.01f, 1000.0f);
glMultMatrixd(orientation);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 12 years ago