HI Dat, I didn't implement this specific head mounted elements, it's what an end users submitted for his setup. I don't have any head mounted displays to tests against. This code is also pretty old and not part of the standard stereo setup.
I do however I lot of experience with driving projection based stereo systems, head mounted displays aren't a far stretch from this but there are differences as I said in my previous email. Personally I'd set up the slave cameras myself and totally ignore the screen distance as it is has no relevance to HMD's. The only thing of relevance is that inter-occulare distance which requires a horziontal translation of the view matrix. Robert. On Sat, Dec 20, 2008 at 6:43 PM, tien dat <tienda...@gmail.com> wrote: > Hi Robert, > I don't totally agree with your answer. In these two functions > computeRightEyeViewImplementation() and > computeLeftEyeViewImplementation(), you do use iod, screen distance > and fusion distance in computing the view matrices. And you don't > check to see if the display mode is HEAD_MOUNTED_DISPLAY or not - as > you do in computing the projection matrices. So I still think that you > do use these variables in computing the view matrices when the display > mode is HMD. > Could you give me a little more explanation for that. > Thanks, > Dat > > On 12/20/08, Robert Osfield <robert.osfi...@gmail.com> wrote: >> Hi Dat, >> >> The screen distance and fusion distance are relevant to monitor or >> projection based stereo systems, not for HMD's. The OSG doesn't use a >> convergence angle as this is not appropriate for proper stereo effect >> in monitor or projection based stereo system, instead the OSG uses the >> mathematically correct system of shearing the projection matrix. >> >> Things a bit different for HMD, as the projection matrix is identical >> for both eyes, and only the view matrix is offset (and perhaps >> rotated). One method to accurate control this is to use a >> SceneView::ComputeStereoMatricesCallback, but now with have the >> osgViewer it's probably easier just to manually create two slave >> Camera's with the appropriate view matrix translation to account for >> the inter-ocular distance. >> >> FYI, osgViewer hasn't yet taken over management of all stereo modes >> from the lower level SceneView, but this is my plan - to migrate all >> stereo support into the high level class, and then provide >> configuration file support for it. This will be done well after 2.8. >> >> Robert. >> >> On Sat, Dec 20, 2008 at 3:37 AM, tien dat <tienda...@gmail.com> wrote: >>> Hi all, >>> >>> I have a question about controlling stereo with HMD in OpenSceneGraph. >>> >>> Basically to setup stereo display you need the distance of two eyes >>> and the convergence angle. When I take a look at OpenSceneGraph code >>> for setting up stereo with HMD, I see two other variables which are >>> screen distance and fusion distance. There is also a matrix to >>> multiple with each view for each eye that uses these variables. So >>> could any of you tell me what they mean and what happens if I change >>> these variables. >>> >>> Thank you very much, >>> >>> Dat >>> _______________________________________________ >>> osg-users mailing list >>> osg-users@lists.openscenegraph.org >>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >>> >> _______________________________________________ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > > > -- > ------------------------ > Dat Tien Nguyen > Email: tienda...@gmail.com > Address: 218/74/7 Tay Son Dong Da Hanoi Vietnam > Phone: 844-5370595 > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org