Hi everyone,

I have an issue combining clipplane and shadow scene.

I first used a scene with a standard osg::group where I attach a clip
node with a clip plane cutting the scene along the Y axis.
Things worked well so far and I saw the scene correctly cut in half.

Now if I remplace the osg::group with a osgShadow::ShadowedScene the
problem starts.
What happens then is that the scene will not be cut anymore, but only
the shadow will be impacted by the clip plane.
So I will see on the display the full scene uncutted with the shadow
cut in half.

What I would like to see is the correctly cut scene together with the
cut shadow.


I am relatively new to osg so I guess this might just be a small
configuration issue, but I looked around on the web and on the mailing
archive and
I could not find anything on this.

Thanks in advance,

Vivien


PS: here is the code I use to create my clip plane:

        osg::ref_ptr<osg::ClipNode> clipNode = new osg::ClipNode();
        osg::ref_ptr<osg::ClipPlane> clipplane = new osg::ClipPlane();
        clipplane->setClipPlane(0, -1, 0, 10.1);
        clipNode->addClipPlane(clipplane);
        
clipNode->setStateSetModes(*_translNode->getOrCreateStateSet(),osg::StateAttribute::ON);
        _translNode->addChild(clipNode);

and here is the code I use to create my shadow scene:

                osg::ref_ptr<osgShadow::ShadowedScene> shadowscene = new
osgShadow::ShadowedScene();
                
shadowscene->setReceivesShadowTraversalMask(ReceivesShadowTraversalMask);
                
shadowscene->setCastsShadowTraversalMask(CastsShadowTraversalMask);

                osg::ref_ptr<osgShadow::StandardShadowMap> shmap = new
osgShadow::StandardShadowMap();
                shadowscene->setShadowTechnique(shmap.get());
               _translNode->addChild(shadowscene);
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to