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

Adrian Egli 3dhelp at gmail.com
Fri Sep 21 08:40:19 PDT 2007


Thanks Paul,

fixed in my private working directory.

/adegli

2007/9/21, Paul Melis <paul at science.uva.nl>:
>
> Adrian Egli wrote:
>
> > For those you are interest in see how the latest version looks like...
>
> There is a slight compile issue with gcc:
>
> ShadowPSSM.cpp: In member function 'virtual void
> osgShadow::ShadowPSSM::init()':
> ShadowPSSM.cpp:196: error: 'class osg::Texture2D::FilterMode' is not a
> class or namespace
> ShadowPSSM.cpp:196: error: 'LINEAR' was not declared in this scope
>
> Line 196 of ShadowPSSM.cpp needs to refer to osg::Texture2D::LINEAR.
>
> Paul
>
> >
> >
> > 2007/9/21, Adrian Egli <3dhelp at gmail.com <mailto:3dhelp at gmail.com>>:
> >
> >     No problem, i played arround and got new variant of shading. the
> >     latest version is using antialised shadow mapping, of course it
> >     needs some calculation's for doing this, but the result looks much
> >     nicer.
> >
> >     latest pssm code will be posted as soon as i will have more time
> >     left. i will send just the latest implementation, robert you don't
> >     have to merge it. i will do it next week.
> >
> >
> >     /adegli
> >
> >     2007/9/21, Robert Osfield <robert.osfield at gmail.com
> >     <mailto:robert.osfield at gmail.com>>:
> >
> >         Hi Adrian,
> >
> >         I understand the technique enough to comment I'm afraid.
> >
> >         Robert.
> >
> >         On 9/21/07, Adrian Egli < 3dhelp at gmail.com
> >         <mailto:3dhelp at gmail.com>> wrote:
> >> Hi Roberts
> >>
> >> i am working on the texture selection in GLSL, but
> >         unfortunately the
> >> gl_FragCoord.z is not for all situation between 0 .. 1. I n
> >         some cases,
> >> if a triangles, has a visible part in the [near,far] range
> >         and a hidden part
> >> behind the current viewing camera near, the value is from
> >         x..1, with x > 0.
> >> Why is the value not
> >> from near .. far allways 0..1, is this an know ATI bug or do
> >         i something
> >> missunderstand. Or should i add a special matrix? or how can
> >         i fix this
> >> issue in fragment shader.
> >>
> >> /adegli
> >>
> >>
> >>  2007/9/19, Adrian Egli <3dhelp at gmail.com
> >         <mailto:3dhelp at gmail.com>>:
> >> > Thanks robert,
> >> >
> >> > i will working on NVidea System (Friday) and i hope that i
> >         can fix the
> >> problems.
> >> > The z fighting is a know problem, but i don't yet know
> >         wether it come with
> >> ati / nvidea.
> >> >
> >> > i will fix it friday.
> >> >
> >> > regards adrian
> >> >
> >> >
> >> > 2007/9/19, Robert Osfield <robert.osfield at gmail.com
> >         <mailto:robert.osfield at gmail.com> >:
> >> >
> >> > > 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
> >         <mailto: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
> >         <mailto: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
> >         <
> http://www.vision.ee.ethz.ch/%7Epmueller/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
> >         <mailto: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
> >         <mailto: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
> >         <mailto: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
> >         <http://gmail.com>
> >> > > > > > > > www.reallyslick.com
> >         <http://www.reallyslick.com>   |  www.mogumbo.com
> >         <http://www.mogumbo.com>
> >> > > > > > > >
> >> > > > > > > > On 9/17/07, Terry Welsh < mogumbo at gmail.com
> >         <mailto: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
> >         <mailto: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
> >         <mailto: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
> >         <mailto: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
> >         <mailto:osg-users at lists.openscenegraph.org>
> >> > > > > > >
> >> > > >
> >>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >         <
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org>
> >> > > > > > >
> >> > > > > > >
> >> > > > > > _______________________________________________
> >> > > > > > osg-users mailing list
> >> > > > > > osg-users at lists.openscenegraph.org
> >         <mailto: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
> >         <mailto: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
> >         <mailto:osg-users at lists.openscenegraph.org>
> >> > >
> >>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-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
> >         <mailto: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
> >         <mailto:osg-users at lists.openscenegraph.org>
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-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
> >
> >
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
********************************************
Adrian Egli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070921/242164af/attachment-0003.htm>


More information about the osg-users mailing list