> I'm having some issues regarding OcclusionQueryNode. I draw > an object as a set of faces and a set of edges, and I can't > seem to get OQN to deal with both as a single entity, > resulting in an artifact where for a fixed camera position > the object becomes intermittent (disappears, then reappears > on the next cycle, and so on). I reckon once either faces or > edges are occluded the other set has enough room to render > itself, but in turn occludes the former, or something along > those lines; just my guess, though. The setup is as simple as > an OQN over a node that reads a .osg file with two children > geodes (said sets).
So I can reproduce the problem by running "osgocclusionquery <yourfile>.osg"? (all that example does is place an OQN above the .osg file that is loaded.) If so, please post your .osg file so I can take a look at the problem. > Note that while finding a solution to this would be great my > problem is even simpler. All I'm trying to do is use the > existing implementation of OQN to determine whether an object > is visible or not, and then display or hide a label attached > to it but on a different renderbin (over both objects and > scene). The object's geometry is very simple and I don't > really care for "occluding" it, I'd just like the number of > pixels drawn (or a binary output like getPassed()). Is it > possible to turn occlusion off while preserving this > behaviour? (A threshold of 0 doesn't seem to > work.) I've looked through the code a few times but I'm > having a hard time with it. :( You can query the test pass/failure results on a per-camera basis. Are you saying that this doesn't work for you for some reason? The osgocclusionquery example does this, IIRC, to display some statistical information. However, you are trying to use OQN for something that it wasn't designed for. You might need to modify OQN or make your own custom node to make it do what you want. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

