OK, I'm trying now using local cameras as proposed by Robert. What I do :
I put somewhere in my scene graph a camera, setting it as PRE_RENDER, and setting its setReferenceFrame to RF_RELATIVE. When doing this, I notice the local cam get the main cam matrix, which is a good behavior for me (at beginning I was setting it to RF_ABSOLUTE, and so need to write a cullcallback when I grab the main ca matrix and copy it to my local cam...). What I notice is : I DO NOT need to set the ClearMask on the viewer's master Camera to just clear the depth buffer, maybe because OSG do like this : 1. clear the buffers corresponding to main cam attributes 2. clear the buffers corresponding to local cam attributes 3. render the nodes which are child of my local cam 4. render the other nodes Maybe this behaviour occurs because my local cam is a child on the root to which the main cam is applied, isn't it ? I'm now in front of another problem : the z buffer precision, because, if I understand well, such a scene graph do that my main camera take ALL the scene to computes its near and far planes... - to refresh your mind, the nodes under the local cam are designed to be very far in the scene - Is there any simple way to tell to the main cam to avoid traversing the local cam's children when computing its near/far planes ? I know that the osgdepthpartition is a good point to start, but it's a bit complicated and single threaded designed (don't know where the problems appear with multi threads in this example). thanks Eric ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17421#17421 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

