Hi J-S,

thanks for the hint. So, you are saying, even the node will not be rendered,
it will be reflected on the water ?

Nick

http://www.linkedin.com/in/tnick


On Sat, Jan 23, 2010 at 5:06 AM, Jean-Sébastien Guay <
[email protected]> wrote:

> Hi Nick,
>
>
> is there a way to have a node to be only reflected but not rendered? I have
>> tryied to set up the node mask to just
>>
>> ocean->getOceanScene()->getReflectedSceneMask()
>>
>> but the node still gets rendered
>>
>
> This has nothing to do with osgOcean... If you want your node to not be
> rendered you need to set up the viewer's cull visitor to have a traversal
> mask different than 0xFFFFFFFF (which means render anything with a non-zero
> node mask). So in your case you could use say
>
>  0xFFFFFFFF & ~ocean->getOceanScene()->getReflectedSceneMask()
>
> which is all bits except the reflected scene mask.
>
> You can get the viewer's cull visitor this way:
>
> osgViewer::Renderer* renderer =
> dynamic_cast<osgViewer::Renderer*>(viewer->getCamera()->getRenderer());
> renderer->getSceneView(0)->getCullVisitor();
> (or if you're using CompositeViewer, get each view's camera and then...)
> (also do it for SceneView 1 - the SceneViews are double-buffered in
> multithreaded viewers, better be safe).
>
> Hope this helps,
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    [email protected]
>                               http://www.cm-labs.com/
>                        http://whitestar02.webhop.org/
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to