Hi,

I am looking for ways to improve the performance of an application using
polytope intersectors for selection. Basically we are using an intersense
tracker attached to a user's hand (paired with a data glove) and he is using
it to select and manipulate objects. Small objects are a pain to select
using line segment intersectors so I need to use polytope intersection...

Right now in my benchmark application, running a simple polytope intersector
(in the form of a pyramid, with each plane being rotated by 0.5 degrees
outwards),  I have an FPS of about 15 when I'm pointing in the blank and
that drops quite quickly when I point at geometrically complex objects.

Now according to this we can gain performance by limiting the data
accumulated by the polytope intersector.

Peter Hrenka wrote :
>

>
The main problem with PoltopeIntersector is that it generates large
> amounts of result data if it is used with large picking volumes.
>
> The typical usage (as shown in osgkeyboardmouse example) is
> picking small volumes where only "a handful" of picks occur.
>
> But you are not the first one that tries to use it with larger volumes...
>
> One possible optimization I can think of is changing the result
> data structure in such a way that it only stores the intersecting
> node-path and the first intersecting primitive. This data should
> be enough for your usage pattern. The detailed result data could
> be generated in an extra step (at a cost).
>

All I need from my Intersections is the node path and the
localIntersectPoint. I see some of the information is stocked/copied in the
function 'void PolytopeIntersector::intersect(osgUtil::IntersectionVisitor&
iv, osg::Drawable* drawable)', can I get the performance boost just by
modifying this function or do I need to delve deeper and tweak
PolytopeIntersection and PolytopePrimitiveIntersector ?


On the same topic but with a different approach, would it provide a
significant increase in performance to calculate the distance of
intersections to a reference line instead of a reference plane (less
multiplications) ?

I have also read on this mailing list that using a kdtree could boost the
performance of the polytope intersector. Peter Amstutz said in a post (
http://www.mail-archive.com/[email protected]/msg33056.html)
that he would consider implementing it. Any news on this side ? How
significant a boost could we be expecting by using kdtrees ?


thanks a lot!

Julien-Charles
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to