Re: [osg-users] Picking based on Render order, not depth

2015-03-04 Thread John-Luke Laue
Thanks Christian and Robert, I took Christian's advice and was able to get the render order (by looking at the bin number) of each node that was hit and just return the node with the highest render order. I didn't attempt incorporating the z buffer. Seemed a little over my head. Thanks so

Re: [osg-users] Picking based on Render order, not depth

2015-03-03 Thread Christian Buchner
Can't you attach user data element to your Geodes or Geometry objects that roughly correspond to render bins or rendering order? Then in the intersection code, get a list of all hits, and sort it by render order first, followed by depth. This of course means that you have to pretty tightly control

Re: [osg-users] Picking based on Render order, not depth

2015-03-03 Thread Robert Osfield
Hi John-Luke, The osgUtil::IntersectionVisitor/LineSegmentIntersector is based of pure geometry calculations, there isn't any reference to rendering elements so has no knowledge of what may or may not have been rendered. If you want to have picking based on rendering results you'll need to

[osg-users] Picking based on Render order, not depth

2015-03-02 Thread John-Luke Laue
Hi all, Hopefully this isn't too newbie a question. Let's say I have a camera at the origin, looking down +x axis. I have a cube at position (1,0,0) and a sphere at position (5,0,0). If I render my scene normally, I will see (from the camera) the cube, but not the sphere because it is occluded