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.

Thanks

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 12:36
To: [email protected]
Subject: Re: [Opensg-users] Occlusion Culling & Flickering Objects

        Hello Eric,

Maslowski, Eric wrote:
> Hello all,
>   Looks like I have to deal with this issue of odd frustums again and it 
> appears that others might be having similar problems. (recent: disappearing 
> object thread) So, as a first step I wanted to switch over to MatrixCameras 
> so that I have direct control over the modelview and projection matrices. 
> Unfortunately, when I replace my PerspectiveCamera with MatrixCamera, I get a 
> runtime error every frame:
> 
> FATAL: ShearedStereoCameraDecorator::getProjection: can only decorate 
> PerspectiveCameras!
> 
> Has something changed in the core? In the documentation for 1.8 under 
> "Windows and Viewports / Decorators" it says that:
> 
> "In our example you could exchange a perspective camera with a matrix camera 
> and the stereo setup won't be destroyed"

I'm sorry that is an error in the documentation, I just did a cvs 
annotate on the source and that check (and message) is in there since 2002.
The matrix camera gives you full control, but at the price of the system 
not really knowing what is going on (e.g. it is not even clear that you 
do a perspective projection, could be orthographic).

        Sorry,
                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

Reply via email to