Hi Carsten,
Thanks for the information. That will give me a few more things to test. For
the results I already presented, I'm using a PerspectiveCamera which has a
ShearedStereoCameraDecorator attached. Additionally, we're using
PassiveViewports for drawing. For feeding data to the camera I use:
osg::Matrix osg_mat;
osg_mat.setValue(Navigator()->getWorldTM().getData()); // using GMTL
osg::NodePtr cam_beacon = m_scene->getCamera()->getBeacon();
osg::TransformPtr cam_xform =
osg::TransformPtr::dcast(cam_beacon->getCore());
osg::beginEditCP(cam_xform);
cam_xform->setMatrix(osg_mat);
osg::endEditCP(cam_xform);
I tried a FlyNavigator in place of my navigator code and saw the same effects,
but didn't see it through Tutorial #10 - Loading. So, if the above doesn't
yield anything useful, I'll probably break down the system piece by piece and
rebuild it checking everything along the way.
Thanks again for the help and keep the ideas coming (if there are any more).
E.
---
Eric Maslowski
Research Computer Specialist
University of Michigan 3D Lab
email: [EMAIL PROTECTED]
-----Original Message-----
From: Carsten Neumann [mailto:[EMAIL PROTECTED]
Sent: Friday, November 21, 2008 14:49
To: [email protected]
Subject: Re: [Opensg-users] Occlusion Culling & Flickering Objects
Hello Eric,
Maslowski, Eric wrote:
> Thanks Carsten,
> So, if I understand correctly for stereo when using a MatrixCamera we have
> to generate projection & modelview matrices ourselves (every frame if it's an
> asymmetric, off-axis frustum like those found in ProjectionViewport)?
>
> Regarding the larger issue here, I did some deeper digging into what might be
> happening with the perspective camera and I noticed that the matrix I feed
> OpenSG isn't the same as what I receive back through: Camera->getViewing().
> It's not even the inverse, which I was expecting. I'm currently feeding
> "getViewing()" a matrix to fill, and the pixel width/height from the current
> viewport. Is this the proper method to use for this? Here's some sample
> output showing the in/outs.
>
>
> -------
> ref = matrix generated by my navigator and fed directly to OSG
> inv = the inverted version of "ref", never submitted to OSG
> osg = the matrix I receive from OSG using "getViewing()"
>
>
> ref: 0.559012 0.353901 0.749840 -1.327405
> 0.000000 0.904337 -0.426819 1.448839
> -0.829159 0.238597 0.505536 -0.178932
> 0.000000 0.000000 0.000000 1.000000
>
> inv: 0.559012 0.000000 -0.829159 0.593673
> 0.353901 0.904337 0.238597 -0.797777
> 0.749840 -0.426819 0.505536 1.704189
> 0.000000 0.000000 0.000000 1.000000
>
> osg: 0.559012 0.353901 0.749840 -0.000000
> 0.000000 0.904337 -0.426819 0.000000
> -0.829159 0.238597 0.505536 -0.000000
> 0.593673 -0.797777 1.704189 1.000000
> -------
>
>
> What is even weirder about this is that the REF rotational values transfer
> over, but the positional values are the same as the inverted matrix. My
> matrix math is beyond "rusty" but can anyone explain what could potentially
> cause this? I'm at a loss.
Camera::getViewing() normally returns the inverse of the camera beacon's
getToWorld() matrix (or leaves the matrix unchanged if no beacon is
set). For MatrixCamera it returns whatever is set with setModelviewMatrix().
OpenSG sets GL_PROJECTION to p * t where p is getProjection(p,w,h) and t
is getProjectionTranslation(t,w,h) with w,h being width and height of
the viewport. GL_MODELVIEW is set to v where v is obtained by
getViewing(v,w,h). Decorators or derived classes may override this though.
Are the above values from a MatrixCamera? Is it decorated? How do you
"feed" the values from your navigator to it?
Thanks,
Carsten
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users