Hi Wojciech,

I've merged all your changes, tested and submitted to SVN.  I am
comfortable with your changes w.r.t texgen precision.

I am however, a bit uncomfortable with the extent of the changes that
are happening to ShadowMap without me fully understanding them all.
The issue here is that once things stop working I'm in a weak position
w.r.t guessing what might be broken and how to fix it.  It now feels a
bit like everybody is having a go at osgShadow implementations but
with this we're loosing coherency of the implementations, there are
also regressions happening.

W.r.t regressions, running

   osgshadow --sm --base

The result isn't right, the shadows from the base have a diagonal band
running across them that rotates with the eye point. I reverted back
before your changes and found the same issue so your changes aren't to
blame for this regression, but this regression as happened at some
point and I no longer know when.  I fear that the implementation now
works better on some models but worse on others and its implementation
will flit between what works well depending on whom contributed the
latest "fix".

The only solution this to expand the set of units test scene to use in
shadowing and to test them directly.  If users want to fix a problem
for their types of scene then adding a unit test to osgshadow example
and providing a test would be required.  At some point we'll need to
do a wholesale review of osgShadow implementations to reign in the
current divergence of implementations.  This is all a topic for
osg-users though..

Robert.

On Thu, Feb 28, 2008 at 3:50 PM, Wojciech Lewandowski
<[EMAIL PROTECTED]> wrote:
>
>
> Robert,
>
> This is second attempt on Shadow Texgen precision. This time its not view
> dependent but terrible tex coord jumps are eliminated. Effect was achieved
> by using special modelview matrix for texgen placement. There is a chance
> you may not like this idea, but it works for me.
>
> Cheers,
> Wojtek
>
>
> ----- Original Message -----
> From: Wojciech Lewandowski
> To: OpenSceneGraph Submissions
> Sent: Thursday, February 28, 2008 3:58 PM
> Subject: [osg-submissions] Fixes in osgShadow::ShadowMap
>
>
> Hi Robert,
>
> Attached is modified osgShadow::ShadowMap. I changed following things:
>
> 1:
> Shadow map camera sets ABSOLUTE_RF_INHERIT_VIEWPOINT refernce frame.
>
> 2:
> Light Direction  by matrix multiplications replaced with transform3x3
> multiplication.
>
> 3:
> I made DebugingHUD functional by adding special draw callback. Former
> version was simply drawing pale square.
>
> 4:
> I was tempted to make 4 th change but decided to not do it. Instead I put it
> whith #if VIEW_DEPNDENT_TEXGEN. If you decide you may let it go.
>
> When objects are not centered at 0,0,0 coord but in some distant location
> (for example at surface of earth ellipsoid) shadow texgen suffers from
> inadequate precision of float matrices. I changed that by premultiplying
> Texgen matrix (using OSG double matrices) with inverse modelview and
> applying it later with ModelView identity matrix. This tweak may be
> appropriate for OverlayNode texgen as well.
>
> I left former version because I suspect that this change will make
> osgShadow::ShadowMap view dependant. Currently texgen matrix remains the
> same no matter what View displays it. With my change it wuld be different
> for each view. This touches the subject of View Dependent Shadow Techniques
> that J-S asked recently.
>
>
>
>
> I suspect other  Shadow techniques could also benefit from some of above
> modifications. I have changed ShadowMap because I think I learned how it
> works. I don't know that much about other techniques.
>
> Regards,
> Wojtek Lewandowski
>
>
>
>  ________________________________
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
> _______________________________________________
>  osg-submissions mailing list
>  [email protected]
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to