> ----- > From: Wojciech Lewandowski [EMAIL PROTECTED] > Sent: Wednesday, May 14, 2008 10:29 PM > > Hi Ben, > > > CastsShadow bit _does_ need to be set for every parent along > > the nodepath. > > If it's true, then that's a very big consideration in how scene > > graphs must be constructed to use osgShadow, and i can document it. > > Yes its true, but defaults for Node mask are 0xffffffff and NodeVisitor > mask is also 0xffffffff. If one changes masks, he does it with deliberate > intention to limit traversals to some portions of the scene.
Thanks. I understand how it works now, however: > For most typical scenario where all parts of the graph cast shadow > and can receive shadow, Cast and /Receive masks should be left at > default 0xffffffff setting. I fear this is not typical. Due to the scale limitations of osgShadow, i suspect that 'most' scenarios involve enabling shadow only for certain nodes. > Scenarios where some portion of the scene graph does not cast or > receive shadows are unusual and indeed may require careful > selection of node masks. I think they are not 'unusual', rather, the case where the shadow flags should be set for every node might only exist in a tiny example like osgshadow. This means that integrating a single shadow-casting node into an existing OSG application involves the entire application changing its node masks, with code throughout. It's unfortunate, but it is at least possible. > If one does not want some portion of the scene to cast or receive shadows > he may also choose to not attach them to ShadowedScene node. Many (most) nontrivial 3D applications have scene graphs which are already quite structured for reasons such as LOD; moving nodes around to put them under ShadowedScene would break things completely. The only solution seems to be to put ShadowedScene high up in the graph, and change the code all over the place to carefully disable shadows. This is a lot of grief that could be spared if the shadow mask logic was opposite; a bit set to NOT cast a shadow. Then, adding shadow code to an application would involve only small localized code changes. <shrug> But that's the design, and it can be documented, and i can work with it. -Ben _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org