I have been looking through the use of OSG::Camera's beacon, and as far as I
can tell, OSG::MatrixCamera does not use its beacon. In OSG::Camera, the
beacon is used in getViewing(), but OSG::MatrixCamera::getViewing() simply
returns its own modelview matrix. I have not come across other places where
the beacon influences the rendering. Does setting the beacon for an
OSG::MatrixCamera have any effect, or is its beacon completely ignored?

I ask this question because I am trying to find something "in between"
OSG::MatrixCamera and OSG::ProjectionCameraDecorator for asymmetric viewing
in a cluster. What I want is to be able to perform navigation operations on
one data object and have all viewports render the scene correctly. My
original approach was to use OSG::ProjectionCameraDecorator in the server
viewports and OSG::PerspectiveCamera in the client viewport via the simple
scene manager. OSG::ProjectionCameraDecorator is great because its
projection matrix is not influenced by its decoratee. This is not true of
OSG::MatrixCameraDecorator.

For better or worse, I cannot use OSG::ProjectionCameraDecorator because I
do not have the projection corners needed for it to work, and trying to
derive them from the limited information that I have about projector
configuration may not yield accurate results. OSG::MatrixCameraDecorator can
work, but if the decoratee is an OSG::PerspectiveCamera, then I have to keep
its projection matrix from interfering with the projection matrix that will
be computed by the matrix camera decorator. I end up passing in the inverse
of the perspective camera's projection matrix as the pre-projection matrix
and then using a matrix constructed from OSG::MatrixFrustum() as the
post-projection matrix. This works, but it is fragile because I have to keep
the pre-projection matrix in sync with the perspective camera's projection
matrix.

One alternative that I am considering is keeping the modelview matrix for a
collection of OSG::MatrixCamera objects (one per server-side viewport) in
sync with the viewing matrix of an OSG::PerspectiveCamera, but that gets me
right back to updating things manually. Setting the beacon of the
OSG::MatrixCamera objects to that of the OSG::PerspectiveCamera has no
effect, and that is why I asked the question above. If I could simply have
the cameras all relative to the same beacon, I would be in good shape.

The only other alternative that I have thought of is to move the world
instead of moving the camera(s). I had planned on making that possible, but
I was hoping to have the option of doing either just in case moving the
world turned out to have unwanted side effects. If it is the case that the
easiest/only way to do this is to move the world instead of the camera, then
that is what I will do.

 -Patrick


-- 
Patrick L. Hartling
VP Engineering, Infiscape Corp.
http://www.infiscape.com/

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to