[osg-users] What's the difference between put rttcamera under root node and viewer?

Robert Osfield robert.osfield at gmail.com
Mon Nov 23 00:33:02 PST 2015


Hi John,

The inconsistent behaviour suggests that some state set up by SpeedTree is
affecting the OSG rendering and possibly the other way around too.

W.r.t. rendering different parts of the scene in the mirror vs main scene,
you can use a combination of NodeMask's on the subgraphs you want to
specialize and CullMask (see in osg::CullSettings that is inherited by
osg::Camera.)

Robert

On 21 November 2015 at 17:32, John Green <star-force at qq.com> wrote:

> Hi,
> I'm trying to implement a rearview mirror in my car simulation project.So
> I need a rtt camera.And my scene consists of the osgearth node,some
> building models nodes,and a speed tree node.
> I find two way to build a rtt camera,one is add it to a scene node,using
> addchild method;the other is add it to the viewer,using addslave method.
> When the rttcamera is under a scene node,the osgearth node and the models
> nodes are rendered correctly,but the speedtree node is disapeared.(The
> speedtree node is rendered by its selfdefined drawable with opengl).
> And when the rttcaera is added to the viewer,with useMastersSceneData been
> set true,the whole scene can be rendered correctly,however there are still
> some nodes which should not be seen in the rearview mirror,like the visual
> aid lines , points or texts.If I set the useMastersSceneData false,and add
> the osgearth node,builds nodes  and speedtree node into the rttcamera
> manually,then the buildings and trees are fine.But the osgearth's textures
> are disappeared,and the whole terrain turn into black.
> So i am confused with the mechanism of the two kinds of rttcameras.I want
> to know the differences between them,and why the osgearth terrain turn into
> black when using a "addslave" rttcamera.
> Thank you![/b]
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=65726#65726
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151123/3c2fa6f7/attachment-0003.htm>


More information about the osg-users mailing list