Re: [osg-users] shadows and LOD scale
On 10/19/07, Terry Welsh <[EMAIL PROTECTED]> wrote: > Hi Robert, > My own PSSM code and osgshadow both exhibit this problem. The code > you wrote that makes shadow cameras measure LOD distances from the > main camera's position works fine... until you introduce a LOD scale > on the main camera. The shadow cameras keep using a LOD scale of 1.0 > instead of using the LOD scale that you set on the main camera. > > I am able to work around the problem by explicitly setting the LOD > scale on all of my shadow cameras, but this won't work for people > using osgshadow unless they are given access to all of its shadow > cameras. OK I understand better where you are coming from now. I don't have a solution though :-) Perhaps the osgShadow::ShadowTechniques could check the LOD scale and adjust things accordingly. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] shadows and LOD scale
Hi Robert, My own PSSM code and osgshadow both exhibit this problem. The code you wrote that makes shadow cameras measure LOD distances from the main camera's position works fine... until you introduce a LOD scale on the main camera. The shadow cameras keep using a LOD scale of 1.0 instead of using the LOD scale that you set on the main camera. I am able to work around the problem by explicitly setting the LOD scale on all of my shadow cameras, but this won't work for people using osgshadow unless they are given access to all of its shadow cameras. - Terry > Message: 10 > Date: Fri, 19 Oct 2007 07:16:08 +0100 > From: "Robert Osfield" <[EMAIL PROTECTED]> > Subject: Re: [osg-users] shadows and LOD scale > To: "OpenSceneGraph Users" > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi Terry, > > I have played with LODScale at the present osgShadow techniques, but > the concept of EyePoint and ViewPoint methods in NodeVistor are > intended to help with this issue - it was written in response to your > original request for such a feature when you did your original PSSM > code. I can't recall the details off the top of my head, so could you > check you old PSSM code and compare to the osgShadow techniques? > > Robert. > > On 10/18/07, Terry Welsh <[EMAIL PROTECTED]> wrote: > > Hi Robert, > > Remember the View class and the code you wrote so that Cameras for > > shadows could inherit the same LOD information as the user's eyepoint? > > I believe this is a related issue. LODScale set for the main > > eyepoint does not appear to be used by the shadow cameras, causing > > shadows to not match the objects that cast them if the objects have > > multiple levels of detail. > > > > So far I have looked over the code for View, Camera, and CullSettings > > with no luck. _inheritanceMask in CullSettings defaults to > > ALL_VARIABLES, so I would expect LODScale to be inherited properly. > > Not sure where else to look for this problem. Any ideas? > > > > This problem is easy to demonstrate by adding this line to osgshadow.cpp > > > > viewer.getCamera()->setLODScale(10.0f); > > > > and then running with a model that has some LOD nodes in it. > > - Terry > > ___ > > 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
Re: [osg-users] shadows and LOD scale
Hi Terry, I have played with LODScale at the present osgShadow techniques, but the concept of EyePoint and ViewPoint methods in NodeVistor are intended to help with this issue - it was written in response to your original request for such a feature when you did your original PSSM code. I can't recall the details off the top of my head, so could you check you old PSSM code and compare to the osgShadow techniques? Robert. On 10/18/07, Terry Welsh <[EMAIL PROTECTED]> wrote: > Hi Robert, > Remember the View class and the code you wrote so that Cameras for > shadows could inherit the same LOD information as the user's eyepoint? > I believe this is a related issue. LODScale set for the main > eyepoint does not appear to be used by the shadow cameras, causing > shadows to not match the objects that cast them if the objects have > multiple levels of detail. > > So far I have looked over the code for View, Camera, and CullSettings > with no luck. _inheritanceMask in CullSettings defaults to > ALL_VARIABLES, so I would expect LODScale to be inherited properly. > Not sure where else to look for this problem. Any ideas? > > This problem is easy to demonstrate by adding this line to osgshadow.cpp > > viewer.getCamera()->setLODScale(10.0f); > > and then running with a model that has some LOD nodes in it. > - Terry > ___ > 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
[osg-users] shadows and LOD scale
Hi Robert, Remember the View class and the code you wrote so that Cameras for shadows could inherit the same LOD information as the user's eyepoint? I believe this is a related issue. LODScale set for the main eyepoint does not appear to be used by the shadow cameras, causing shadows to not match the objects that cast them if the objects have multiple levels of detail. So far I have looked over the code for View, Camera, and CullSettings with no luck. _inheritanceMask in CullSettings defaults to ALL_VARIABLES, so I would expect LODScale to be inherited properly. Not sure where else to look for this problem. Any ideas? This problem is easy to demonstrate by adding this line to osgshadow.cpp viewer.getCamera()->setLODScale(10.0f); and then running with a model that has some LOD nodes in it. - Terry ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org