[osg-users] PSSM: Latest Version : Please Test and Debug

Robert Osfield robert.osfield at gmail.com
Wed Sep 19 04:35:11 PDT 2007


Hi Adrian,

To help things along I have gone ahead and merged your ShadowPSSM
implementation, but renamed it to ParallelSplitShadowMap to be in
keeping with the naming of the other shadow techniques.

I have also added the PSSM enabling into osgshadow.cpp, but haven't
merged PSSM.cpp as I didn't know what to do with this.

When enabling --pssm in osgshadow I get shadows, but also z fighting
artificats that suggest the polygon offset needs to be adjusted a bit.
 Bascially glPolygonOffset is not a standardised quantity under OpenGL
so implementations vary, if you optimize for ATI it'll not work well
under NVidia and visa versa.  We've seen this issue with osgText
before and made some tweaks to try and cope with the variance.  See
src/osg/PolgyonOffset.cpp.  It could be that the code in there that
tries to account for ATI might not be work well with recent drivers.

Robert.

On 9/19/07, Adrian Egli <3dhelp at gmail.com> wrote:
> Sorry Robert,
>
> i still fixed an issue this morning, and added also for debugging a define
> for enable r,g,b for 3 split maps, to color them (DEBUG)
>
> regards adrian
>
> 2007/9/19, Adrian Egli < 3dhelp at gmail.com>:
> > Hi Robert,
> >
> > i did some changes in latest implementation, i now i have a PSSM variant
> which works quite well. I propose to check this implementation into
> osgShadow. Of course this is just the first version of our PSSM
> implementation, but we are still open to change the implementation is
> implemented it as a shadow technique as you mentioned. A future
> implementation can be the one Terry started some month ago, but i don't know
> when he will be able to post a adapted version to our shadow technique
> abstraction.
> >
> > in the attachment we have to VS2003 project:
> > * First my test case, may we can add this as new example.
> > * Second is the osgShadow example from the SVN with changes i did, marked
> with //ADEGLI
> > -> the source
> > -> test.bat, you can see what i tested, the test.ive is a database
> downloaded from
> http://www.vision.ee.ethz.ch/~pmueller/wiki/CityEngine/DownloadModelsPompeii
> >
> > others should test. some problem can cause the PolygonOffset, i tested it
> on two different system with different GPUs, all under windows, i ll test as
> soon as i have some minutes left also under os/x
> >
> >
> >
> >
> > /regards
> >
> > adegli
> >
> >
> > 2007/9/18, Robert Osfield <robert.osfield at gmail.com >:
> >
> > > Hi Adrian and Terry,
> > >
> > > New shadow algorithms need to be implemented as a subclass from
> > > osgShadow::ShadowTechnique for them to be considered for merging with
> > > SVN. All the hooks required to implement advanced techniques are
> > > available to the shadow techniques so it shouldn't cause any
> > > significant problems in implementing the PSSM as a ShadowTechniqiue.
> > >
> > > The use of ShadowTechnique is important as it allows end users to
> > > trial out different techniques very easily and find the route which
> > > best suits their hardware and scene type.  It is even possible that
> > > different techniques will be used by one application as they load up
> > > different scenes.
> > >
> > > I did review Terry's PSSM code and did consider porting it across to
> > > work as a ShadowTechnique, but alas I've just been snowed under be
> > > other work.  The same is the case right now, while I'd love to see a
> > > good PSSM implementation checked into osgShadow I don't have the time
> > > to help out in this effort.
> > >
> > > Robert.
> > >
> > >
> > > On 9/18/07, Adrian Egli <3dhelp at gmail.com> wrote:
> > > > Hi Terry,
> > > >
> > > > i don't know what robert requires of PSSM. The best and easiest would
> be to
> > > > integrate it as a shadow technique, so the user can just change the
> shadow
> > > > technique
> > > > and that's it. Or ?
> > > >
> > > > adegli
> > > >
> > > > 2007/9/17, Terry Welsh < mogumbo at gmail.com>:
> > > > > Do you know what Robert requires of PSSM to have it included in OSG?
> > > > > Does it just need to be integrated with osgShadow?
> > > > > --
> > > > > Terry Welsh - mogumbo 'at' gmail.com
> > > > > www.reallyslick.com  |  www.mogumbo.com
> > > > >
> > > > > On 9/17/07, Terry Welsh < mogumbo at gmail.com> wrote:
> > > > > > Well, I took a closer look.  There are a few problems, but I still
> > > > > > can't bring myself to try and fix them since they're problems I
> > > > > > already fixed in my own shadow code.  It would really be easier
> and
> > > > > > faster to work from that code instead I think.  How badly do you
> want
> > > > > > to get this working?  I can always send you the current version of
> the
> > > > > > shadow code I have here.
> > > > > >
> > > > > > To be more specific, it looks like the big problems are 1. Shadow
> maps
> > > > > > don't always cover all of the terrain (they leave some parts
> > > > > > unshadowed) (this seems to depend on scene size), and 2.
> Off-camera
> > > > > > objects don't always cast shadows.  There are some other minor
> > > > > > problems, but those are the big ones.
> > > > > > - Terry
> > > > > >
> > > > > > On 9/17/07, Adrian Egli <3dhelp at gmail.com> wrote:
> > > > > > > hi Terry,
> > > > > > >
> > > > > > > i hope you can test the latest version of PSSM. it would be
> greate as
> > > > soon
> > > > > > > as possible to integrate it
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > * GLSL Shader: generate automatically for 1..n splitting maps
> > > > > > > * some changes for better frustum splitting
> > > > > > >
> > > > > > > *** PLEASE test it on your databases ****
> > > > > > >
> > > > > > > attached some tests screenshots. if you have some bugs, please
> (A)
> > > > report it
> > > > > > > or (B) fix it and send me the updated source code.
> > > > > > >
> > > > > > > Tested on ATI X1600, 256MB, mobile macbookpro
> > > > > > >
> > > > > > > thanks for testing
> > > > > > >
> > > > > > > adrian
> > > > > > >
> > > > > > >
> > > > > > > 2007/9/15, Adrian Egli < 3dhelp at gmail.com>:
> > > > >
> > > > > > > > Hi latest version,
> > > > > > > >
> > > > > > > > (1) NVidea Cards, the setting of the Polygon offset seems to
> be not
> > > > > > > correct on my ATI it's seems to be correct (looks nice)
> > > > > > > >      please test and check for good values, i don't now a good
> value
> > > > for
> > > > > > > this
> > > > > > > > (2) GLSL shader has to be generated dynamic, if we change the
> number
> > > > of
> > > > > > > split planes
> > > > > > > >      the version no longer need any IF in the GLSL shader,
> this
> > > > makes the
> > > > > > > good a little bit different form the suggestion in the paper
> PSSM
> > > > > > > > (3) try it out and test
> > > > > > > >
> > > > > > > > pssm --help
> > > > > > > >
> > > > > > > > enjoy and have a nice weekend, i will be not online till
> monday. if
> > > > you
> > > > > > > have some ideas, fixes etc please send me the new code. then i
> will be
> > > > able
> > > > > > > to test it
> > > > > > > > out. i hope for next osg release we will have a good and
> robust PSSM
> > > > > > > implementation what would be greate.
> > > > > > > >
> > > > > > > > the next version of PSSM would have project maps, at the
> moment it
> > > > > > > supports just directional lights
> > > > > > > >
> > > > > > > > /adegli
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > 2007/9/14, Adrian Egli < 3dhelp at gmail.com>:
> > > > > > > >
> > > > > > > > > hi,
> > > > > > > > >
> > > > > > > > > i will post the first version of the PSSM for a sun as
> directional
> > > > > > > lights.
> > > > > > > > >
> > > > > > > > > Please help in test, debug, and optimisation, than we can
> > > > integrate it
> > > > > > > into OSG core, i would like doing this as soon as possible.
> > > > > > > > >
> > > > > > > > > call in a console...
> > > > > > > > > PSSM --help
> > > > > > > > >
> > > > > > > > > example
> > > > > > > > > PSSM.exe  dumptruck.osg  --noUpdate --mapcount 3
> > > > > > > > > PSSM.exe  dumptruck.osg  --noUpdate --mapcount 3 --NO-DEBUG
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > * we need a better GLSL shader ! My version isn't yet good
> enough
> > > > (and
> > > > > > > robust)
> > > > > > > > >
> > > > > > > > > * i guess there is still a little bug, the near-far clipping
> plane
> > > > for
> > > > > > > the each camera (shadow)
> > > > > > > > >
> > > > > > > > > * ...
> > > > > > > > >
> > > > > > > > > others
> > > > > > > > >
> > > > > > > > > thanks for help
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > / adrian
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > >
> ********************************************
> > > > > > > > > Adrian Egli
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > ********************************************
> > > > > > > > Adrian Egli
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > ********************************************
> > > > > > > Adrian Egli
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > ********************************************
> > > > > > > Adrian Egli
> > > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > ********************************************
> > > > Adrian Egli
> > > > _______________________________________________
> > > > osg-users mailing list
> > > > osg-users at lists.openscenegraph.org
> > > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > >
> > > >
> > > _______________________________________________
> > > osg-users mailing list
> > > osg-users at lists.openscenegraph.org
> > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > >
> >
> >
> >
> > --
> > ********************************************
> > Adrian Egli
> >
>
>
>
> --
> ********************************************
> 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