Roger, I had similar dilemma at some point. I was thinking about overridding cull visitor but had problem how to substitute original cull visitor with my class in the middle of cull traversal. Finally I adopted other approach. Once Cull Visitor traverses the scene all drawbles land in render bins. Instead of overriding cull visitor I scan generated render bins and compute Bounding box around drawables that landed in renderd bins. If you are interested in details look at MinimalCullBoundShadowMap code. Its there.
Cheers, Wojtek ----- Original Message ----- From: Roger James To: OpenSceneGraph Users Sent: Friday, October 17, 2008 12:55 PM Subject: [osg-users] Simple sunlight shadow technqiue I am experimenting with a simple sunlight shadow technique using the osgShadow model and basic depth shadows. I would like to set up the shadow casting camera so that I end up with a shadow texture that is a near as possible "filled" with the shadow casting objects as culled by the LOD nodes in the scene using the the inherited viewpoint. It seems to me that the best place to set up this bounding information is during the main scene cull traverse that is done in my(most) shadow technique prior to the render to shadow texture cull traverse. I want to avoid having to manage the placing and removing of cull call backs on every shadow casting geode, which may be different as the user manipulates the scene. The only way I can think of doing this is to derive my own CullVisitor and override the Geode apply function. Have I missed something here? Is there a better way to do it? I know the LISP shadow techniques have a number of complex ways of doing this but I am trying to implement something simple that uses inbuilt OpenGL functionality wherever possible. Roger ------------------------------------------------------------------------------ _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org