Hi J-S,
I suppose its caused by crude scene bounds computation. LispsmVB does not do
any magic: it simply computes view frustum and intersects it with scene
bounds to find visible part of shadow volume. I guess the problem is related
to second part of the math ie scene bounds computation which is done in
MinimalShadowMap::ViewData::computeShadowReceiveingCoarseBounds(). Depending
on ShadowReceivingCoarseBoundsAccuracy it may either take whole scene
bounding sphere or run computeBoundingBox visitor. Check which path you
take. How exactly render bins would be related to finding Bounding bounds is
hard for me to explain and you will probably need to trace it with debugger.
MinimalShadowMap::ViewData::computeShadowReceiveingCoarseBounds() is good
place to start looking. Check what are the dimension of returning volume.
Good hunting ;-)
Let me know if you find somethig that could be fixed in MSM and related
code.
Wojtek Lewandowski
----- Original Message -----
From: "Jean-Sébastien Guay" <jean-sebastien.g...@cm-labs.com>
To: "OpenSceneGraph Users" <osg-users@lists.openscenegraph.org>
Sent: Friday, March 05, 2010 5:45 PM
Subject: [osg-users] Shadows and negative renderbin?
Hi all,
I was wondering if someone has had problems with objects which are in
negative-numbered renderbins with shadows (in my case,
osgShadow::LightSpacePerspectiveShadowMapVB).
I had set up my skydome in renderbin -100 to make really sure it was
rendered before other things, and set its node mask so it would not be
included in shadow traversal - setNodeMask(getNodeMask() & ~CAST_SHADOW &
~RECEIVE_SHADOW) but for some reason it seems like it was still being used
for the bounds of the shadow map, because shadows did not show up on near
objects and were very aliased far out. I isolated the problem to the
renderbin setting, and setting it to a positive value fixed the problem -
the skydome is not considered at all for the shadows now.
I'm surprised the renderbin would have any effect. I haven't delved into
the code but if someone (Wojtek? :-) ) could explain this or provide some
pointers I would appreciate...
Thanks in advance,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org