Hi Steven, The CullSetting::setCullMask settings the traversal mask for the osgUtil::CullVisitor, but only once the Camera has been entered so only affects the traversal of the Camera's children. The check of Camera's NodeMask is done against the CullVisitors traversal mask on entering the Camera::accept() method, at this point the traversal mask has the value set by the parental chain of the Camera in question, which in your case will be the viewer's Camera.
Perhaps what you need to do is back up a little and work out what you are actually trying to achieve. Having the viewer have a Camera with another Camera directly below it makes one of the cameras a bit redundent, why not not ditch the one in the scene graph and use the viewer one. Don't forget with osgViewer you have a few choices in how you manage your views of the scene - you can have one View managed by osgViewer::Viewer, or multiple View's managed by osgViewer::CompositeViewer, and in both cases you have build the View up from a single master Camera or multiple slave Cameras that are controlled relative to the master Camera. So there is lots of flexibility in how you can put viewers together. Since the osgViewer library uses exactly the same Camera class as the type you're used to put in the scene the code set up will easily map across. The upshot of all this is range of problems that were really awkward in the 1.x series of the OSG, and now quite straightforward in the 2.x series. Robert. On Jan 14, 2008 9:27 PM, Steven Powers <[EMAIL PROTECTED]> wrote: > > > > > I am having problems with CullMasks using OSG 2.X. > > > > I have a CameraNode that I set the CullMask as setCallMask(0x10) and a node > that I set as setNodeMask(0x1). > > > > My understanding is that a node is evaluated like: > > > > CullMask & NodeMask > > > > If the result is true it will traverse the node. This is not happening for > me. Unless I set the Node with setNodeMask(0) the node is traversed and > rendered. > > > > I am using osg::Viewer with the camera Node added to the scene graph below > the root node and before the scene. > > > > Is there something in my technique that is wrong or am I missing a function > call somewhere. > > > > Thanks in advance. > > > > Steven Powers > > > > > > > _______________________________________________ > 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

