Well, I got it to draw something other than a square shadow. =)

Remember before I had said that the shadow appeared as a square-shape just 
below the shadow caster. It was about the right size and position for the 
caster, leading me to conclude that the shadow technique was correctly locating 
the shadow caster, and adjusting its view frustum to fit it prior to rendering 
the shadow map.

Well, it's doing the same thing now, but now instead of this square 'shadow 
region' being filled with shadow, it's filled with a pattern of dots. The cool 
thing is that, among the dots, I do see a silhouette of the shadow caster! 
However, this silhouette appears to be offset by half the width of the shadow 
region. Thus, half of it is cut off, and wraps around to the other side!

I don't know if you can picture that or not, but it's definitely very weird!

But I have learned some interesting things from this!

a) It's stable. That is, if I close the program down, and then start it back up 
again, I get the same exact pattern of dots with the 'offset and wrapped' 
silhouette. 

b) The shadow map isn't updating from frame-to-frame anymore. I've tried moving 
the directional light source's direction around, as well as moved & rotated the 
shadow caster around. The shadow itself moves as expected, but it always looks 
the same. So, the position of the shadow changes, but the content of the shadow 
does not. It's like a projective texture with a static image of a weird shadow 
on it.

I also tried this. Instead of setting the cull mask to 'visibleMask ', I set it 
to visibleMask | castShadowMask | receiveShadowMask. Now, the shadowing works 
perfectly! However, it still leaves me with my original problem, which is that 
if I want to hide an object, I can't just turn its visibility bit off, I have 
to turn the shadow bits off as well.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30944#30944





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to