Re: [osg-users] osgShadow 3.6.3
Hi Catalin, None of the osgShadow technique support shadows that surround a point light source as you have in your scene. This limitation is due the way that projective texturing is used for the shadow map, essentially you are limited to FOV from the light source to less than 180. The only way to remove this limitation is to use multiple shadow maps, such as using a cube map for the shadow map. None of the osgShadow techniques support this though so you'd need to implement this yourself. The osgShadow shadow techniques are also limited to a single light source, to enable support for a number of light sources you have to built a separate shadow map for each light source. For you application I would suggest handling spot lights with a single shadow map, and point lights that are within the volume as a cubemap, if you have directional lights then potentially you could use a single shadow map, though it's likely you'd want to make the the shadow map view dependent to avoid under sampling when you zoom into local areas. I'm afraid general purpose shadowing is hard, it's a huge topic, it won't be just a case of tweaking bits of an existing implementation. Cheers, Robert. -- You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/85c74239-037c-497b-9fe2-cb1285f1bf18%40googlegroups.com. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgShadow 3.6.3
Hi, We are trying to test the shadows using OSG, We have multiple lights, but for now we are playing with only one light, a point source light type. We are some weird effects, the shadows are cut, a mirror scene as shadow behind the light. See the video. https://www.youtube.com/watch?v=hyFBX0jGjaw osg::ref_ptr shadowedScene = new osgShadow::ShadowedScene; shadowedScene->getShadowSettings()->setLightNum(1); shadowedScene->setReceivesShadowTraversalMask(GetShadowNodeMask()); shadowedScene->setCastsShadowTraversalMask(GetShadowNodeMask()); osg::ref_ptr st = new osgShadow::SoftShadowMap; st->clearShaderList(); st->setAmbientBias(osg::Vec2(0.5,1.0 - 0.5)); shadowedScene->setShadowTechnique(st.get()); view->addChild(shadowedScene); shadowedScene->addChild(scene); // Set the Scene Data mViewer->setSceneData(view); Any points that you may have, might help us. Does osgShadow supports multiple lights? Greetings, Catalin -- You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/mailman.70892.1582030546.7169.osg-users-openscenegraph.org%40lists.openscenegraph.org. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/mailman.70892.1582030546.7169.osg-users-openscenegraph.org%40lists.openscenegraph.org.