<div dir="ltr"><div><div><div><div><div><div>Hi Alessandro,<br><br></div>I have run osgviewer with all three models: <br><br></div>   osgviewer bm_209.osg  bnm_147.osg  occluder_163.osg<br><br></div>When I rotate the view so the occluder plane comes down in front of the boxes the pink box disappears and the yellow boxes stays on screen.<br><br></div>Looking at the three models this is exactly what I'd expect.  The yellow box doesn't get occluded before it's getting drawn first, then the occluder, then the pink box.  The occluder doesn't get seen because the ColorMask is disable colour writes.<br><br></div>If you want both boxes to be occluded then you need to set the RenderBin details for this subgraph so the RenderBin number is something like -1 so it's drawn before the default opaque bin (RenderBin number 0).  Without this explicit setting the rendering order can become arbitrary, sometimes it might be the occluder would be drawn first other times not.<br><br></div>Robert.<br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 14 August 2015 at 14:48, Alessandro Terenzi <span dir="ltr"><<a href="mailto:a.terenzi@gmail.com" target="_blank">a.terenzi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Have you tried to rotate the view? There's a plane hanging over the red and yellow boxes and unless you move the camera you won't realize about it's presence in the scene (regardless of the ColorMask).<br>
<br>
I'm attaching a couple of screenshots related to what I get with and without the color mask applied to the plane after having rotated the camera a little bit.<br>
<br>
Cheers,<br>
<span class="">Alessandro<br>
<br>
------------------<br>
Read this topic online here:<br>
</span><a href="http://forum.openscenegraph.org/viewtopic.php?p=64771#64771" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=64771#64771</a><br>
<br>
<br>
<br>
<br>
Attachments:<br>
<a href="http://forum.openscenegraph.org//files/osgviewer_2015_08_14_15_43_16_67_211.png" rel="noreferrer" target="_blank">http://forum.openscenegraph.org//files/osgviewer_2015_08_14_15_43_16_67_211.png</a><br>
<a href="http://forum.openscenegraph.org//files/osgviewer_2015_08_14_15_42_16_14_317.png" rel="noreferrer" target="_blank">http://forum.openscenegraph.org//files/osgviewer_2015_08_14_15_42_16_14_317.png</a><br>
<div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div>