Hi Shayne, If KdTree aren't helping performance then you either have a bottleneck outside the actual ray to triangle intersection, or perhaps the KdTree's aren't being assigned correctly.
Might I suggest you walk through the code in a debugger to see what is going on. Robert. On Thu, Aug 19, 2010 at 10:41 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC <[email protected]> wrote: > Robert, > > Sorry it has been long giving feedback on this. I've been working other > issues. > > I did try the KdTrees stuff you suggested without any improvement in > performance. I called > > osgDB::Registry::instance()->setBuildKdTreesHint(osgDB::ReaderWriter::Option > s::BUILDKDTREES); > > before I load my terrain database. Is this the correct way to do this? Is > there anything else I need to do to enable this or get this to work? In some > respects things got even slower than before when I try LOS intersection > calculations via the osgSim::LineOfSight class... > > -Shayne > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Robert > Osfield > Sent: Wednesday, July 28, 2010 2:47 AM > To: OpenSceneGraph Users > Subject: Re: [osg-users] osgSim HeightAboveTerrain performance... > > Hi Shyane, > > I've not been at my desk too consistently this last few weeks due to > school holidays, so not able to dig down into all threads. > > A couple of general comments. If intersections are slow then consider > enabling the building KdTree's on your scene graph, this will greatly > improve performance. In osgDB::Options and osgDB::Registry there is a > setBuildKdTreesHint(..) method that you can use. > > Robert. > > On Tue, Jul 27, 2010 at 7:25 PM, Tueller, Shayne R Civ USAF AFMC 519 > SMXS/MXDEC <[email protected]> wrote: >> Since I didn't receive any input or feedback on my previous inquiry, I'm >> assuming no one has used osgSim very much in an extensive setting.?.? >> >> At any rate, I've done some further investigation. It appears that >> performance is very poor when HAT inquiries are randomly called in > different >> portions of the code via the >> osgSim::HeightAboveTerrain::computeHeightAboveTerrain(.) method. On the >> other hand, if HAT points via hat.addPoint() are collected up and then >> computed (intersections) in one place, performance improves. I'm assuming >> that this is the correct usage for OSG? If this is true, I must say that >> this is a major problem since HAT inquiries need to be done at different >> times throughout the application due to dependencies on HAT for other >> calculations. >> >> I would like some feedback from someone in the know on osgSim so I know > what >> the proper usage is for maximum performance. If it is true that all HAT >> points in OSG need to be consolidated for intersection calculation, then I >> will attempt to refactor the code to support what OSG wants. >> >> Thanks, >> -Shayne >> >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of >> Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC >> Sent: Friday, July 23, 2010 10:57 AM >> To: OpenSceneGraph Users >> Subject: [osg-users] osgSim HeightAboveTerrain performance... >> >> All, >> >> >> >> I was wanting some feedback for those who have used osgSim in querying VPB >> database info such has HAT, LOS, etc., during runtime. >> >> >> >> I'm seeing some performance issues when using >> osgSim::HeightAboveTerrain::computeHeightAboveTerrain(.) to get the HAT >> value for a particular location in the database. At times, we need > multiple >> HAT values per frame which seems to bog the performance down. I would >> surmise that LOS calculations are probably worse since multiple >> intersections are computed. >> >> >> >> My question is, is how efficient is the osgSim HAT function? Is the > process >> of retrieving HAT a slow one? If so, is there a way to improve performance >> if one or more HAT requests are issued on a per frame basis? >> >> >> >> Thanks in advance, >> >> -Shayne >> >> >> _______________________________________________ >> 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 > > _______________________________________________ > 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

