Hi, I am trying to setup 2 cameras viewing the same scene but with different cull masks. Some nodes have nodemask 0x1, others 0x2.
It only seems to work if I use 0x2 as a cullmask for one of the two cameras, and the other camera doesn't see anything unless i set it's cullmask to 0xf. but I want it to see only the nodes with nodemask 0x1. here is the graph setup: Code: [camera1]---------[group]------------------[scene] . . . . . . . . . . . \-----[camera2]--------/ Camera1 is the main viewer's camera. (a CompositeViewer with only one view, if that matters). It's CullMask is set to 0x1. Camera2 is a RTT camera with CullMask set to 0x2. Both cameras have their inheritanceMask set to( osg::CullSettings::ALL_VARIABLES & ~osg::CullSettings::CULL_MASK ) In the scene, there are nodes with NodeMasks set to either 0x1 or 0x2. There is a shader on the main camera that takes the resulting buffers for camera1 and 2 and sends them to the red and green channels respectively... but I don't *think* that has anything to do with the problem. ---- Just to be clear, lets say we have node1 (mask=0x1) and node2 (mask=0x2) a camera with cull mask 0x1 doesn't seen anything (bad!) a camera with cull mask 0x2 sees node2 (good) a camera with cull mask 0xf sees nodes 1 and 2. (also good) what I don't understand, is that I have done something identical in a test program and it works fine, and I really can't see what is different in my current program. are there pitfalls that I should know about? there isn't much information about the subject out there. Cheers, Louis ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49947#49947 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org