Hi Alan,

Are you stuck using 1.2 or can you upgrade to 2.2?  The support for
RTT in 2.2 is more flexible, using osg::Camera (renamed and improved
version of CameraNode).  2.2 allows  you to place RTT cameras in the
scene graph (like what you are probably doing) as well as place them
in the viewer.  When you attach an RTT camera to a viewer it is
assigned a Renderer, and the Render "has a" SceneView, so if you do
need to grapple with low level details you can do it.

The Camera also has its own projection matrix and if you switch off
the the near/far compute it'll be valid for the all OpenGL ops.
Alternatively you could use a cull callbcack that catches the
CullVisitor after it has passed through setting up the Camera, and
then cast the NodeVisitor to CullVisitor and get its current
projection matrix from it.

As a general note on versioning, 1.2 was made a year and half ago, so
for myself remembering all the ins and outs of what functionality was
supported/what wasn't/what gotchas or workarounds to use is very hard,
next to impossible without downloading 1.2 and reviewing it all in
attempt at providing accurate support.  I'm afriad simply don't have
available time for this.

Porting from 1.2 is 2.2 shouldn't be that hard, most of the OSG
classes are still in place, the viewer library is the biggest change,
but to ease transition you can still use osgProducer via the separate
repository for it.  If you just use SceneView for your viewer then
it'd be even easier as SceneView is still there.

Robert.

On Dec 3, 2007 10:51 PM, Alan Purvis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> CameraNodes unlike SceneViews don't appear to have a getCullVisitor()
> function, I'm guessing they're visited by the same CullVisitor as the
> root SceneView that contains them. Without access to this "root
> SceneView", is it possible to get access to the exact projection
> matrix applied to the contents of a CameraNode with an absolute frame
> of reference (and no projection transforms attached to its children
> other than the one set on itself)?
>
> I have a (heavily) multi-pass scene graph set up doing per fragment
> depth of field with some RTT pre-render passes and rendering textured
> quads to various destinations with shaders attached. One requirement
> of the algorithm I'm working on is access to the projection matrix
> used to render the original "scene texture" by the quad that is used
> to render that scene texture to the frame buffer (or another FBO
> depending), this is required to reverse the non-linear transform
> applied to values in the depth buffer among other things. Simply
> calling getProjectionMatrix() on the CameraNode after it has rendered
> its image returns the original matrix I passed it though, is the
> actual matrix used for rendering retained after culling and drawing
> have completed? If so, then where might I find it? and if not is
> there some callback or something I can use to grab it while it's
> floating around the scenegraph?
>
> Thanks,
> Alan
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to