[osg-users] PSSM fix, suggestion and questions
Raymond de Vries
reedev at xs4all.nl
Wed Jan 2 08:07:48 PST 2008
Hi Adrian,
In a follow-up to my PSSM experience, I have adapted the osgshadow.cpp
example so that the effect can be seen with simple shapes as well. I
suspect that it is a math issue since the light direction and view
direction are +/- orthogonal. But I don't know how to fix this (yet).
Also, I think it's not the shadow texture generation itself since
texture boundaries are not shown.
Please find my patches to the ParallelSplitShadowMap files and the
stripped osgshadow example (there is no need for command line options or
so, and I hardcoded it for nvidia) attached to this e-mail. Hopefully
you know the solution to this issue.
btw this issue is present in 2.2.0 and svn.
bye
Raymond
Raymond de Vries wrote:
> Hi,
>
> I am using PSSM and are trying to find proper values. I am using osg
> 2.2.0 on Windows XP (the PSSM svn version does not show any relevant
> changes), on an nvidia card.
>
> First of all, I have fixed a small issue which prevented the use of
> dirty(), see the attached ParallelSplitShadowMap.cpp.diff.
> Furthermore, I would to suggest some small changes so that flags can
> be toggled, instead of only be set. See ParallelSplitShadowMap.diff
>
> Also, I see an error. I am not sure what is causing this so I would
> like to ask your advice. It seems to me that the split frustums are
> not always calculated properly. As you can see in the attached images
> it seems to me that the split frustums are not always adjacent to
> eachother, when the view is rotated in a certain way.
>
> Some values about the size of the world:
> calculateFrustumCorners() zShadow0 0.161428
> calculateLightNearFarFormFrustum(), zShadow0 near 2 far 47.147
> calculateFrustumCorners() zShadow1 0.510139
> calculateLightNearFarFormFrustum(), zShadow1 near 2 far 91.0805
> calculateFrustumCorners() zShadow2 1
> calculateLightNearFarFormFrustum(), zShadow2 near 2.00001 far 152.797
>
> I am new to PSSM so I am might still miss some things...
>
> Thanks a lot already!
> Raymond
>
>
> btw changing the number of splits changes things but does not solve them
> btw both linear and non linear mode expose this behaviour
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PSSM_bug_report-20080101.rar
Type: application/octet-stream
Size: 3439 bytes
Desc: not available
Url : http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080102/07b2b94c/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PSSM_error.jpg
Type: image/jpeg
Size: 10865 bytes
Desc: not available
Url : http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080102/07b2b94c/attachment.jpg
More information about the osg-users
mailing list