Hi everyone, I have implemented an isolation view (i.e. show only a selection of nodes, and render the other ones transparent) by creating one node above the root that contains an override StateSet which sets all nodes transparent and then creating "exception" nodes which have override _and_ protected set to "protect" the isolated geodes. And for reverting the isolation I simply remove those in-between nodes again.
First of all: Is this a good approach? Or do you have a better one? (My goal was to not modify existing nodes, so that I don't need to remember and restore a previous state. The way it is now I can just check if there are nodes matching a certain naming pattern "*-ISOLATE" and remove those) But my actual problem is: For some reason the isolated geode changes its color minimally. In normal view it is 24,23,24, and in isolated view it's 22,21,22. That color change is definitely not caused by the top-level override. So it must be caused by the protection which I do like this: Code: osg::StateSet * stateSet = new osg::StateSet(*(node->getOrCreateStateSet())); stateSet->setAttributeAndModes(dynamic_cast<osg::Material*>(stateSet->getAttribute(osg::StateAttribute::MATERIAL)), osg::StateAttribute::OVERRIDE | osg::StateAttribute::PROTECTED); parentNode->setStateSet(stateSet); So basically I just take the material of the node that should stay visible, copy it to the parent node and set it to protected. I don't see why this changes the color. Please help. Thanks in advance[/code] ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56175#56175 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

