Re: [osg-users] Trouble with LightSpacePerspectiveShadowMap artifacts.

2012-08-29 Thread Wojciech Lewandowski
Hi, Dario 0: Ops I was sure these methods are available Thats awkward ommission considering how old this technique is. We probably should add them. But as a temporal workoaround you can derive your own class from LispSM and add proper setter and getter for polygon offset... 1: Yes closed was

Re: [osg-users] Trouble with LightSpacePerspectiveShadowMap artifacts.

2012-08-29 Thread Dario Minieri
Hi Yes, polygonoffset methods are presents in ShadowMap class only, but I use a technique derived from StandardShadowMap which redefines the polygonoffset variables and here we have no methods to set. However, I've tried polygonoffset tweak and the final result is much better even if not

Re: [osg-users] Trouble with LightSpacePerspectiveShadowMap artifacts.

2012-08-28 Thread Wojciech Lewandowski
Hi, Dario, LispSM is setup by default to cast shadows using light space backfacing polygons. That approach works well if models are closed and build with face culling in mind. If your model does not utilize cull faces (and your truck looks like that case), all front polygons will cast shadows. So

Re: [osg-users] Trouble with LightSpacePerspectiveShadowMap artifacts.

2012-08-28 Thread Dario Minieri
Hi, Thanks for your reply. Yes, I see now the polygonoffsetfactor and polygonoffsetunits variables even if there are no methods to set them (osg 3.0.0), they are setted as attribute camera StateSet because shadow map generation. I can try to tweak these values in some way. You speaks about two

Re: [osg-users] Trouble with LightSpacePerspectiveShadowMap artifacts.

2012-08-27 Thread Dario Minieri
Hi, I've tried to use the CASTS_SHADOW_TRAVERSAL_MASK on my terrain but the final result is pretty the same. Code: GfxTerr-setNodeMask(m_GfxTerr-getNodeMask() ~CASTS_SHADOW_TRAVERSAL_MASK); hummmartifacts don't go away... Thank you! Cheers, Dario -- Read this topic

Re: [osg-users] Trouble with LightSpacePerspectiveShadowMap artifacts.

2012-08-27 Thread Robert Osfield
Hi Dario, On 27 August 2012 17:13, Dario Minieri para...@cheapnet.it wrote: I've tried to use the CASTS_SHADOW_TRAVERSAL_MASK on my terrain but the final result is pretty the same. Code: GfxTerr-setNodeMask(m_GfxTerr-getNodeMask() ~CASTS_SHADOW_TRAVERSAL_MASK); Run the debug shadow view

Re: [osg-users] Trouble with LightSpacePerspectiveShadowMap artifacts.

2012-08-24 Thread Robert Osfield
Hi Dario, The issue looks like one of depth precision of the shadow map such that the depth test makes an erroneous judgment about whether the front surface is in shadow or not, this often is a surface self shadowing itself. The normal solution is to use a polygon offset in the shadow map

Re: [osg-users] Trouble with LightSpacePerspectiveShadowMap artifacts.

2012-08-24 Thread Dario Minieri
Hi Thanks robert for your suggestion, yes this seems the case, the terrain is very very large. I wiil try your suggestion soon. Thanks! Bye! robertosfield wrote: Hi Dario, The issue looks like one of depth precision of the shadow map such that the depth test makes an erroneous judgment