Hi Wojtek,
1: fix for a issue with MinimalShadowMap and
LightSpacePerspectiveShadowMapVB techniques ignoring minLightMargin
parameter.
I have tested your changes to LightSpacePerspectiveShadowMapVB in our
simulator, and it seems that taking into account the minLightMargin
parameter makes it have the same artifacts as the other two techniques
(CB and DB) in our simulators. Initially we had selected VB because it
did not present these artifacts, but it now seems likely that the
artifacts were a result of bad settings on our part, and the fact that
minLightMargin wasn't taken into account just masked the problems... So
perhaps I can describe the situation and with your help, eventually
solve it?
When walking in an avatar, if we look in a given direction the shadows
will look great, but then if I just turn around a bit, they will
pixelate a lot, or seem clipped in front of the avatar, possibly even
disappear completely at some angles. We're using a shadow map size of
2048x2048.
I tried tweaking the minLightMargin and maxFarPlane parameters, which in
the CB and DB cases should work. The values I tried were:
minLightMargin: 0 to 500 in increments of 100
maxFarPlane: 1000 to 5000 in increments of 1000.
It seemed to me that none of these made any difference at all. (I was
using DB in that case).
Admittedly, having the camera close to the floor is a tough case for
LiSPSM, but I don't think it should be that bad. I can send you a small
video showing the effect if you want.
The shadow casting objects (and indeed, the whole scene apart from an
osgOcean which casts no shadows) are in an area about, say, 120x100x100
meters in size.
I've turned on DebugDraw and indeed, at the view angles where there are
problems, the debug hud where the shadow map is drawn with volumes
around the relevant scene objects (the left-most hud) shows that the
volumes seem to go crazy (stretch to infinity). Perhaps that shows that
what I'm seeing is the "dueling frusta" singularity? I would have
thought it wouldn't be so apparent. And in fact I see the artifacts
sometimes even when the view vector is nowhere near the light direction
vector. And in any case, I would have thought the minLightMargin and
maxFarPlane parameters would prevent the shadow map from stretching to
infinity.
Would you have any ideas as to what I can do to help the situation? As I
said, I can send you a video showing this. It's hard for me to give you
a scene that demonstrates this though, and I guess this would be the
really useful thing for you... If you think it would help you give me
better answers I'll try to find a way. :-)
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org