Hi Virginia, In the latest Parallel Split Shadow Map source code, i added a new method to set a user defined light, means just a light for PSSM to calculate the shadow. the light just cast shadow, it's only a position in the worldspace and a direction.
so i guess this would be exactly what are you looking for. see topic for PSSM from today, i post the latest source code. it's not yet in SVN version of OSG, but will be soon. i hope i could help you adrian 2008/5/22 Virginia Holmstrom <[EMAIL PROTECTED]>: > > 1. Can parallel split shadow map handle an omnidirectional light in the > center of a scene? (Such as the sun in the solar system?) > > Taking the osgShadow example, if I move the positional light setting from > far away to within the scene the shadows are not located where one would > expect given the light source. They still appear as though the light was > directly above. > > (i.e change the line in osgshadow.cpp from: > > lightpos.set(bb.center().x(), bb.center().y(), bb.zMax() + bb.radius()*2.0f > ,1.0f); > > to: > > lightpos.set(bb.center().x(), bb.center().y() + 3, 2.5 ,1.0f); > > and run: > > osgshadowd.exe --pssm --SingleThreaded --screen 0 --no-base-texture > --positionalLight --noUpdate -3 > > at the command line.) > > > 2. How does pssm chose the light to generate shadows from with multiple > light sources? The algorithm in ParallelSplitShadowMap::cull appears to > chose the last light in > orig_rs->getPositionalStateContainer()->getAttrMatrixList();. I am not > familiar with this container, what is it supposed to contain? What does > chosing the last light in the container mean as a default? > > 3. Are there plans to add a setLight functionality? > > Thank you, > Virginia > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- ******************************************** Adrian Egli
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

