[osg-users] ParallelSplitShadowMap ....

Terry Welsh mogumbo at gmail.com
Thu Sep 27 15:23:39 PDT 2007


I can't say what the problem is, but I doubt it is PolygonOffset.  On
my own PSSM implementation and other simpler shadows that I have done
everything works well with factor = 1.1 and units = 4.0.  These
numbers come straight out of this document:
http://www1.cs.columbia.edu/~ravir/6160/papers/shadowmaps.ppt

Numbers as large as 10.0/20.0 really shouldn't be necessary, and I've
never heard of using negative numbers for PolygonOffset.  That's a new
one on me.  Anyway, I believe the problem lies somewhere other than
PolygonOffset.
-- 
Terry Welsh - mogumbo 'at' gmail.com
www.reallyslick.com  |  www.mogumbo.com

> Message: 8
> Date: Thu, 27 Sep 2007 13:41:51 +0100
> From: "Robert Osfield" <robert.osfield at gmail.com>
> Subject: Re: [osg-users] ParallelSplitShadowMap ....
> To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
> Message-ID:
>         <7ffb8e9b0709270541o2cae61d7v7674d63131ed70a4 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Thanks Adrian,
>
> Changes now merged and submitted to SVN.
>
> Visual quality is better with the suggested options in the README but
> still not great, in particular I loose shadows when near to objects
> and at shallow angles to the surfaces under shadow.  I've played
> around with the polygonoffset and found that changing units makes no
> difference for the models/views I've tested, but factor to to 4 or 5
> seems sufficient to avoid the z fighting.  The values you've chosen
> for NVidia look excessive.
>
> I am beginning to wonder about the value of using PolygonOffset in
> this context, its just not reliable enough across hardware.
> Alternatives to using PolygonOffset are tweaking the depth range via
> osg::Depth or via a small tweak to the projection matrix.  Replacing
> osg::PolygonOffset by osg::Depth might well be a useful thing to try.
>
> Robert.
>
> On 9/26/07, Adrian Egli <3dhelp at gmail.com> wrote:
> > Hi Robert,
> >
> > please update the PSSM, i did some bug fixes and added new features to move
> > the camera virtual against the view direction by applaying a simple distance
> > factor (a), which is calculated camera eye - camera center distance. and we
> > can move the "light camera" against the light direction (b).
> >
> > (a) some objects behind the camera can cast shadow
> > (b) object aboive the camera can cast shadow
> >
> > then i fixed the shadow map orientation, now screen x coordinate alinged
> > which improve the quality
> >
> >  /adegli
> >
> > --
> > ********************************************
> > Adrian Egli
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >



More information about the osg-users mailing list