Hi J-S,
Looks to me more like texture/sampler conflict than texgen conflict. I think
so because shadow on second pictutre looks like some text. I can discern
letters e and K. Its a long shot but I have no other ideas. You may verify
if its texgen issue by modifying shaders to display shadow map tex coords
instead of shadow map texels. If two pictures match then it will mean that
shadow map got broken or replaced somehow.
Changing shadow map unit and texture coord unit to other number may help as
well. At leat in this that shadwo map contents will change again, if this is
a conflict with some ocean shaders/samplers.
One should remember about texgennode/clipnode/lightnode limitation which
allows only one such node with unit n to be present in sccene graph. If
there are more at the same unit there will be conflicts.
I doubt it, but maybe this helps ?
Cheers,
Wojtek
----- Original Message -----
From: "Jean-Sébastien Guay" <jean-sebastien.g...@cm-labs.com>
To: "OpenSceneGraph Users" <osg-users@lists.openscenegraph.org>
Sent: Tuesday, July 14, 2009 4:31 AM
Subject: Re: [osg-users] Integrating shadows with osgOcean
Hi again Wojtek,
The previous fix of choosing the right camera based on the name worked a
treat. Now I'm grappling with another problem.
It seems that if the ocean surface is in the scene, the texgen used to
lookup in the shadow texture goes all screwy. Of course, I have set the
ocean surface to not cast shadows, so it is not traversed in the shadow
pass. But then, when comes the time to lookup in the shadow texture, I
get shadows all over the place and they move when the camera moves. A
bit hard to describe, but you've probably seen the effect before...
Turning on the shadow debugging camera, I can verify that the shadow
camera is aimed correctly and the bounds seem good. I have also added
control over the ocean surface's node mask in my application, and if I
just set that node mask to 0, the shadows are correct. But if I set it
to its original value (which I also verified contains neither the
CastsShadowTraversalMask nor the ReceivesShadowTraversalMask) then I get
the symptom I tried to describe above.
I've included screenshots of the two situations - with the ocean
surface, and when I set its node mask to 0. In both, you'll see the
shadow camera sees the same thing, but in the first one the shadows are
not applied correctly.
Of course, the near-far settings will be vastly different in the shadow
pass than in the main pass, because the ocean surface is very large but
the shadow casting scene is pretty small. Could that cause this problem?
Any idea about what I could do to solve the problem?
Just a reminder, I'm using the DrawBounds version of LiSPSM.
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