[osg-users] osgUtil::IntersectionVisitor slow with huge geometry

Jordi Torres jtorresfabra at gmail.com
Tue Jul 18 03:43:50 PDT 2017


HI Gianni,

For faster intersections it is far better to build the kdtree first. Also
splitting your huge geometry in several could help to traverse the graph in
case you don't want to use kdtrees.

Cheers.

2017-07-18 12:17 GMT+02:00 Gianni Ambrosio <g.ambrosio+osg at gmail.com>:

> Hi All,
> I built a test geometry with about 9M triangles and 27M vertices. The
> intent of my spike solution (attached) is to select a triangle with mouse
> to change its color. I realized that the bottleneck of that code is the
> line where the camera accepts the "osgUtil::IntersectionVisitor" (line 51:
> camera->accept(iv)). That call takes most of the computation time.
> Debugging the OSG code I fall into:
>
> void LineSegmentIntersector::intersect(osgUtil::IntersectionVisitor& iv,
> osg::Drawable* drawable, const osg::Vec3d& s, const osg::Vec3d& e)
>
> In that code there are different methods to be used: KdTree,
> USE_DOUBLE_CALCULATIONS or USE_FLOAT_CALCULATIONS.
> On the basis of your experience, is one of the previous method ideal to
> solve my performance issue or something else must be done?
>
> Best regards,
> Gianni
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=71281#71281
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Jordi Torres
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170718/03f3bb7b/attachment.htm>


More information about the osg-users mailing list