Hi J-S,

I was sure you would answer my question :-)

You got me. Say magic word "shadow" and I will crawl up from my den  ;-)

Simplest method I can think of: is modification of osgShadow:: LisPSM techniques and related to give well defined unique names to rtt cameras they create. Its maybe not particularly bright idea but its simple and effective.

I think names like "osgShadow_StandardShadowMapCamera" and "osg_MinimalDrawBoundsAnalisisCamera" could do the trick...

Heh... Matching by name always strikes me as a hack. :-) It will work of course. The cameras are actually already named "ShadowCamera" and "AnalysisCamera".

I have forgotten they are named already.

I thought of something else, perhaps not that much better but a bit more general: adding the ShadowTechnique as the UserData of the camera(s). Then if the camera has userdata and the userdata's libraryName matches osgShadow / ViewDependentShadow then it's a shadow camera. It will work for all shadow techniques...

I bet if we think about it we could come up with something even better. But for now it will do. Thanks,

Actually, I like the approach with node names and I don't think this is a hack. Node naming is possible in many modelling tools and this is what make them quite useful. We often use names to mark special nodes. When such models are loaded we run traversals, find special nodes and do some extra work there. So names work well as simple link between modelers and programmers. I don't see a reason programmers should avoid to use them in the same way.

Cheers,
Wojtek

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

Reply via email to