Do you need to have OSG recompute the near/far planes? If not, I would
disable it if I were you, and instead use the top-level bounding volume in
your computation of the global projection matrix.

I used to maintain an application that had OSG as well as other renderers. I
did as described above: I created a projection matrix used by all renderers
based on the bounding volumes of all geometry in all renderers, and I told
the osgUtil::SceneView to not compute the near/far planes.

(The bigger problem I ran into was managing state between all the renderers,
but that's another thread.)

Best of luck with this,
   -Paul


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> [EMAIL PROTECTED]
> Sent: Tuesday, September 26, 2006 1:15 AM
> To: [email protected]
> Subject: [osg-users] Near/Far Clipping Plane when integrating 
> OSG withexternal renderers
> 
> Hello,
> 
> we would like to combine OSG with other renderers, which are 
> called independent from OpenScene Graph. The Problem is, that 
> for this to work, all renderers have to use the same near and 
> far clipping planes.
> 
> To do this, we collect the near and far clipping planes, 
> required by the different renderers, before we start 
> rendering and combine them to an projection mMatrix, which is 
> then used by all renderers.
> 
> At the moment I'm using osgUtil::SceneView to render the Scene Graph.
> The problem is, that the clipping planes are calculated in 
> SceneView::cull. But after calling cull it seems to be 
> impossible to change the projection matrix again, as it is 
> already stored in the renderLeaf objects and a change has no 
> effect, before cull is called a second time.
> 
> Is it possible to get the clipping planes independent from 
> the culling?
> Or is it somehow possible, to change the projection matrix 
> after culling? Or would you generally recommend a completely 
> different approach to combine OSG with other renderers?
> 
> We already considered integrating the other renderers in 
> Scene Graph nodes, but would prefer, to keep them apart to 
> reduce the dependence on each other.
> 
> Best Regards,
> Roland
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to