Hi Robert and All,
I am back from vacations. Ready to take the responsibility for my changes in
osgShadow::ShadowMap ;-). Does the problem Adrian refers happen only with
PSSM or standard ShadowMap as well ? Its not obvious from forum emails and I
am unable to replicate it with standard ShadowMap.
I looked once again at the my submitted osgShadow::ShadowMap code and I have
NOT changed polygon offset.
PolygonOffset remains untoched in several latest revisions.
However, I do have my objections against default ShadowMap cullface/polygon
offset settings. I remember that former (pre 2.0 osgShadow nodekit)
DepthShadowMap example was using frontface culling and polygon offset
factor=1.1 and units = 4. These were the settings that were also recommended
by NVidia ShadowMaping presentations ("ShadowMapping with Today's OpenGL
Hardware" Mark J. Kilgard NVidia). I use this as defaults in my work and I
am quite happy with them. I also noticed that Terry Welsh PSSM example also
used similar defaults.
But for some reason these recommended settings were changed when
osgShadow::ShadowMap was introduced. Whats more, I don't know in which
version exactly, but at some moment self shadowing and negative offset was
added (front face culling remained). See line 210 in
osgShadow::ShadowMap.cpp. In my opinion this is bit unusual method but I
understand that different databases and different render approaches may
benefit from different cull face/polygon offset settings.
Currently I work only with NVidia boards but I know that ATI may require
different settings. I used to play with Direct3D DepthBias on NVidia and ATI
some time ago and results were significantly different for the same depth
bias values. I guess its the same situation with PolygonOffset in OpenGL.
I am afraid that completely getting rid of PolygonOffset is impossible
because there is no substitute for slope bias (PolygonOffset factor). No
Depth range nor Perspective matrix tricks could replace it. MJ. Kilgard
Presentation I mentioned earlier has nice expalanation of this topic. (I can
send it if anyone wants to have a look)
Cheers,
Wojtek Lewandowski
----- Original Message -----
From: "Robert Osfield" <[EMAIL PROTECTED]>
To: "OpenSceneGraph Users" <[email protected]>
Sent: Sunday, March 16, 2008 2:31 PM
Subject: Re: [osg-users] osgShadow example and gerneral question
HI Sebastian,
I see the artificate on Nvidia hardware so this rules out an ATI bug.
So far it I looks like an osgShadow bug, exactly what's gone amiss I
don't know though...
Robert.
On Sun, Mar 16, 2008 at 10:15 AM, Sebastian Messerschmidt
<[EMAIL PROTECTED]> wrote:
>
>
>
>
> Hi Adrian,
>
>
>
> As I've pointed out in the osg-users list, there seems to be a bug in
> recent
> ATI drivers where the t-coordinate in the generated shadow texture is
> screwed up, i.e. inversed. Your screenshots don't look exactly like the
> artefacts I've seen but it might be related I reckon.
>
> To check this I recommend replacing the fixed function vertex shader by
> your
> own code which does the EYE_PLANE projection and play around with the
> coordinates.
>
>
>
> Cheers
>
> Sebastian
>
>
>
> ________________________________
>
>
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Im Auftrag von Adrian
> Egli OpenSceneGraph (3D)
> Gesendet: Donnerstag, 13. März 2008 21:57
> An: OpenSceneGraph Users
> Betreff: Re: [osg-users] osgShadow example and gerneral question
>
>
>
>
>
> some screenshots of the bug
>
> /adi
>
>
> 2008/3/13, Adrian Egli OpenSceneGraph (3D) <[EMAIL PROTECTED]>:
>
> Since the OSG 2.2 or event some version before, osgShadow is broken. I
> don't
> yet know why. but it doesn't work on ATI based computers as far as i could
> test it.
>
>
> 2008/3/13, Raymond de Vries <[EMAIL PROTECTED]>:
>
>
>
> Hi,
>
> All I know that the PSSM implementation was not changed, the last I
> looked at the svn version (some weeks ago), compared to 2.2.0. I will
> test the svn version example also asap, and let you know.
>
> Now that you mention PSSM, I've send a (small) patch some months ago and
> suggested to change the interface a little so that parameters can be
> changed at runtime (where it is currently only possible at startup).
>
> Also I've send a bug report to the list in which I showed an artifact,
> incl source code.
>
> Within some weeks I would like to dive into PSSM again, so hopefully we
> can join forces.
>
> Cheers
>
> Raymond
>
>
>
> Jean-Sébastien Guay wrote:
> > Hi Adrian,
> >
> >
> >> i have retested osgShadow and get some really strange behaviour. event
> >> PSSM doesn't work on my ATI x1600 based pc. was there changes and did
> we
> >> really test all options of osgshadow / implementation, or do
> >> i only have such a problem
> >>
> >
> > I remarked a while ago that osgshadow --pssm did not work for me on my
> > nVidia card (even with the --NVidea (sic) switch, I see no shadows). No
> > idea what's wrong, as I have no time to go into the details...
> >
> > I know I'm not much help, but at least you know you're not alone.
> >
> > J-S
> >
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
>
> --
> ********************************************
> Adrian Egli
>
>
>
>
> --
> ********************************************
> Adrian Egli
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org