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

Gianni Ambrosio g.ambrosio+osg at gmail.com
Tue Jul 18 03:17:59 PDT 2017


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



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: materials.cpp
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170718/a399a02f/attachment.asc>


More information about the osg-users mailing list