Hi Alessandro, I have run osgviewer with all three models:
osgviewer bm_209.osg bnm_147.osg occluder_163.osg 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. 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. 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. Robert. On 14 August 2015 at 14:48, Alessandro Terenzi <[email protected]> wrote: > 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). > > 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. > > Cheers, > Alessandro > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=64771#64771 > > > > > Attachments: > > http://forum.openscenegraph.org//files/osgviewer_2015_08_14_15_43_16_67_211.png > > http://forum.openscenegraph.org//files/osgviewer_2015_08_14_15_42_16_14_317.png > > > _______________________________________________ > 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

