Hi Ben,

I fear that also means, in the second question below, that the CastsShadow bit _does_ need to be set for every parent along the nodepath. Otherwise, a "visitor" recursive descent of the scene graph will quit as soon as it encounters any node, like a Group or LOD, that does not have the CastsShadow bit set. Can anyone who understands osgShadow's NodeVisitors comment?

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.

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. 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 .

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. ShadowedScene does not have to be root node so its possible to create graph hierarchy where all non shadowing / non shadowed objects are put under one branch and those using and casting shadows are put under ShadowedScene in other branch of the scene graph.

Wojtek
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to