Hi, 

I am using osgShadow::ShadowedScene to render shadows. This works fine with 
every technique as long as I am not using a castsShadowTraversalMask. If I 
set the mask to anything diffrent than 0xffffffff the shadow looks like a 
quad.The correct nodes casts shadows but the shadow looks wrong. It seems 
that the shadow is the quad around the shadow. I tried diffrent techniques 
but it is the same result. 

Any suggestions what I am doing wrong? Here is the part of my code:

   // add shadowed scene 
   osgShadow::ShadowedScene *shadowedScene = new osgShadow::ShadowedScene();
   shadowedScene->setReceivesShadowTraversalMask(receiveShadow);
   shadowedScene->setCastsShadowTraversalMask(castShadow);
   shadowedScene->cleanSceneGraph();
...
   osg::Box* boxGeometry = new osg::Box(osg::Vec3(0.0f, 0.0f, 0.0f), width, 
length, height);
   osg::ShapeDrawable* boxDrawable = new osg::ShapeDrawable(boxGeometry);
   osg::Geode* boxGeode = new osg::Geode();
   boxGeode->addDrawable(boxDrawable);
   boxGeode->setNodeMask(Visible | castShadow);
   shape->setGeometryNode(boxGeode);

I defined 
receiveShadow=1
castShadow=2
visible=32

The NodeMask is set to visible ( 0xffffffff ) and to castShadow. If I am not 
setting the mask to visible, my render will hide this object but the shadow 
looks the same. 

Thanks in advance
Katja


-- 
VISUAL ENGINEERING SOLUTIONS - Wir machen Innovation sichtbar!

_________________________________________________________________________
Katja Kristin Oechsner  |  VISENSO GmbH  | Nobelstr. 15 | D-70569 Stuttgart

Fon Office           ++ 49 - 711 - 849 700 0
Fon Direct           ++ 49 - 711 - 849 700 24
Fax Office           ++ 49 - 711 - 849 700 79

k...@visenso.de | http://www.visenso.de
__________________________________________________________________
Geschäftsführer: Dr. Andreas Wierse, Martin Zimmermann
Registergericht: Amtsgericht Stuttgart
Registernummer: HRB 720380
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to