But you were right, I *do* want occlusion information, so that means J-S's suggestion does not work for me (didn't even have the time to look at it, and hence the mix-up -- sorry). It's OQN or a similar pixel-counting strategy, then.

Paul: I sent you the .osg file yesterday, with a couple notes, although I'm not sure you'll manage to reproduce it on your end.

Thanks all,
Eduard

Paul Martz wrote:
Eduard -- I thought you wanted more than just inside/outside the view
volume, I thought you wanted occlusion information (object is hidden behind
something in the scene).

J-S's suggestion will just tell you whether something is in or out of the
view volume, but won't tell you whether or not something is hidden. The way
to implement J-S's suggestion (if you want to use it) would be to add a cull
callback to the root node of your subgraph, and in that callback, call the
osgUtil::CullVisitor::isCulled() method. You pass in the bounding volume and
get a true/false return.

It would be nice if this mechanism also considered culling due to
OcclusionQueryNodes, but it does not at this time.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eduard Trulls
Sent: Tuesday, June 10, 2008 11:42 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] OcclusionQueryNode woes

Hi,

I think that's still a bit beyond my osg/gl skills, and more so given my time frame; hence the convenience of using library code. (If this feature is already built in, I couldn't find it, please point!) I'll have a look at it if this doesn't pan out, anyway.

Thanks,
E.

Jean-Sébastien Guay wrote:
Hello Edward,

You can query the test pass/failure results on a per-camera basis.
(...)
Yes, the query works. I was talking about recovering the
pass/failure
without acting accordingly (disabling the node if "invisible"),
If all you want is to be able to determine if a node is visible or not, can't you just test its bounding volume against the camera's frustum? It's not quite trivial, but pretty easy once you
get the hang
of it.

Come to think of it, there should probably be a class to do this in OSG (perhaps osgUtil?) - can't remember if there really is, but if not, it would make a useful addition for a number of people I would think.

J-S
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org
_______________________________________________
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

Reply via email to