Hi all,

I was wondering if someone could help me out with respect to correcting my understanding of shadows and node masks. I am using OpenSceneGraph 3.0.1.

I have created a scene, including a osgShadow::ShadowedScene. I have set the node mask for receiving shadows (via setReceivesShadowTraversalMask) to 1, and the mask to cast shadows (via setCastsShadowTraversalMask) to 2. I am using ShadowTexture- I have not been able to get the other techniques to work properly.

I have some text (osgText::Text) that I wish to attach to an animated model, screen-facing. I neither want to cast nor receive shadows from this text. The text is attached to a osg::Geode, which is attached to a osg::MatrixTransform, which the model is also attached to, indirectly. Up the tree a little bit, the osgShadow::ShadowedScene can be found.

If I leave the Geode as-is, it takes the default all-bits-set node mask, and casts a shadow. If I set it to 2, it casts a shadow. If I set it to 1, it doesn't cast one, but receives shadows from objects in the scene.

If I then set the Geode node mask to 0, or 4, both of which should indicate no shadow casting or receiving (as bits zero and one are not set), the text vanishes entirely.

Now, obviously it shouldn't do that.

I saw similar symptoms when playing with osgEphemeris, but didn't dig into it further when I shifted away from using it.

If believe that if I reparent the scene so that it lies outside of the ShadowedScene, it appears correctly. This is because I have a scene fadeout using RTT, and I reparent the scene so that it does not touch a ShadowedScene in this case, and the text appears again during the transition.

I am wondering if my understanding of node masks and how they interact with osgShadow is correct. If not, if someone could indicate where and how I am using them incorrectly, it would be appreciated.

I was also wondering with respect to modern-day usage, which parts of osgShadow would be considered most reliable and mature.

Cheers,
Garth
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to