<div dir="ltr"><div><div><div>Hi John,<br><br></div>The inconsistent behaviour suggests that some state set up by SpeedTree is affecting the OSG rendering and possibly the other way around too. <br><br></div>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.)<br><br></div>Robert<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 21 November 2015 at 17:32, John Green <span dir="ltr"><<a href="mailto:star-force@qq.com" target="_blank">star-force@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
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.<br>
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.<br>
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).<br>
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.<br>
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.<br>
Thank you![/b]<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=65726#65726" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=65726#65726</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div><br></div>