Re: [osg-users] osgSim HeightAboveTerrain performance...

2010-08-20 Thread Robert Osfield
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 shayne.tuel...@hill.af.mil 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: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] 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 shayne.tuel...@hill.af.mil 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: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] 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
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgSim HeightAboveTerrain performance...

2010-08-20 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Robert,

If I'm using this KdTree feature correctly then perhaps the next step is
digging down deeper with a debugger.

In my app, I'm collecting both HAT and LOS data on a per frame basis on the
terrain. I've narrowed it down to where the intersections are calculated for
the LOS set. It appears I get a significant performance hit when I invoke
the call:

los.computeIntersections(terrain.get());

where terrain is a pagedLOD VPB database and los is an
osgSim:LineOfSight class. Once I comment this call out, performance is where
it should be. This would seem to suggest that there's no bottleneck outside
the ray/triangle intersection but that there are issues with the
intersection calculations themselves for LOS...

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Friday, August 20, 2010 2:30 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgSim HeightAboveTerrain performance...

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 shayne.tuel...@hill.af.mil 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: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] 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 shayne.tuel...@hill.af.mil 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: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] 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

Re: [osg-users] osgSim HeightAboveTerrain performance...

2010-08-20 Thread Robert Osfield
Hi Shayne,

The LOS and HAT techniques use the osgUtil::IntersectionVisitor and
LineSegmentIntersector to the intersection work, and by default add a
special callback DatabaseCacheReadCallback that enables the
intersection traversal to load external tiles when tiles aren't
already in memory.  This load is synchronous so it may well be that
this is causing the performance hit.

You could you try using the basic osgUtil::IntersectionVisitor and
LineSegmentIntersector, this won't automatically load higher levels of
details, making do with just what is loaded into memory already, but
it will at least not require an IO.

Robert.

On Fri, Aug 20, 2010 at 3:35 PM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC shayne.tuel...@hill.af.mil wrote:
 Robert,

 If I'm using this KdTree feature correctly then perhaps the next step is
 digging down deeper with a debugger.

 In my app, I'm collecting both HAT and LOS data on a per frame basis on the
 terrain. I've narrowed it down to where the intersections are calculated for
 the LOS set. It appears I get a significant performance hit when I invoke
 the call:

 los.computeIntersections(terrain.get());

 where terrain is a pagedLOD VPB database and los is an
 osgSim:LineOfSight class. Once I comment this call out, performance is where
 it should be. This would seem to suggest that there's no bottleneck outside
 the ray/triangle intersection but that there are issues with the
 intersection calculations themselves for LOS...

 -Shayne

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
 Osfield
 Sent: Friday, August 20, 2010 2:30 AM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] osgSim HeightAboveTerrain performance...

 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 shayne.tuel...@hill.af.mil 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: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] 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 shayne.tuel...@hill.af.mil 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: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] 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

Re: [osg-users] osgSim HeightAboveTerrain performance...

2010-08-20 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Robert,

That sounds like a plausible explanation for the performance hit. I'll
investigate further and try the basic ones as you suggest.

On a related note, I have a couple of questions...

1) Is there a quick way to obtain the closest intersection for a given LOS?
I noticed that for a LOS, all intersections with the terrain are returned
which can be large when my ownship gets close to the ground. Right now, I'm
searching the returned intersection list and extracting the closest one.

2) Does the LOS technique check for occlusion along a given ray or does it
compute every intersection regardless? Are hits with backfaces (as defined
relative to the ownship) computed as well? I'm assuming that the computed
intersection list is random (i.e. not sorted from closest to farthest from
the start point)?

Thanks,
-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Friday, August 20, 2010 8:48 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgSim HeightAboveTerrain performance...

Hi Shayne,

The LOS and HAT techniques use the osgUtil::IntersectionVisitor and
LineSegmentIntersector to the intersection work, and by default add a
special callback DatabaseCacheReadCallback that enables the
intersection traversal to load external tiles when tiles aren't
already in memory.  This load is synchronous so it may well be that
this is causing the performance hit.

You could you try using the basic osgUtil::IntersectionVisitor and
LineSegmentIntersector, this won't automatically load higher levels of
details, making do with just what is loaded into memory already, but
it will at least not require an IO.

Robert.

On Fri, Aug 20, 2010 at 3:35 PM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC shayne.tuel...@hill.af.mil wrote:
 Robert,

 If I'm using this KdTree feature correctly then perhaps the next step is
 digging down deeper with a debugger.

 In my app, I'm collecting both HAT and LOS data on a per frame basis on
the
 terrain. I've narrowed it down to where the intersections are calculated
for
 the LOS set. It appears I get a significant performance hit when I invoke
 the call:

 los.computeIntersections(terrain.get());

 where terrain is a pagedLOD VPB database and los is an
 osgSim:LineOfSight class. Once I comment this call out, performance is
where
 it should be. This would seem to suggest that there's no bottleneck
outside
 the ray/triangle intersection but that there are issues with the
 intersection calculations themselves for LOS...

 -Shayne

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
 Osfield
 Sent: Friday, August 20, 2010 2:30 AM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] osgSim HeightAboveTerrain performance...

 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 shayne.tuel...@hill.af.mil 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: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] 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 shayne.tuel...@hill.af.mil 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

Re: [osg-users] osgSim HeightAboveTerrain performance...

2010-08-20 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Robert,

Just as a follow up on the issue at hand, I bumped up the maximum number of
files to cache in the DatabaseCacheReadCallback to a higher number than the
default 2000. This greatly improved performance. I'm supposing that since
there were not as many external paged tiles being read in from disk, this
accounted for the performance improvement. This would seem to collaborate
your earlier statement that the synchronous load of external tiles was
possibly the culprit for my performance degradation...

Thanks for your help...
-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Friday, August 20, 2010 8:48 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgSim HeightAboveTerrain performance...

Hi Shayne,

The LOS and HAT techniques use the osgUtil::IntersectionVisitor and
LineSegmentIntersector to the intersection work, and by default add a
special callback DatabaseCacheReadCallback that enables the
intersection traversal to load external tiles when tiles aren't
already in memory.  This load is synchronous so it may well be that
this is causing the performance hit.

You could you try using the basic osgUtil::IntersectionVisitor and
LineSegmentIntersector, this won't automatically load higher levels of
details, making do with just what is loaded into memory already, but
it will at least not require an IO.

Robert.

On Fri, Aug 20, 2010 at 3:35 PM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC shayne.tuel...@hill.af.mil wrote:
 Robert,

 If I'm using this KdTree feature correctly then perhaps the next step is
 digging down deeper with a debugger.

 In my app, I'm collecting both HAT and LOS data on a per frame basis on
the
 terrain. I've narrowed it down to where the intersections are calculated
for
 the LOS set. It appears I get a significant performance hit when I invoke
 the call:

 los.computeIntersections(terrain.get());

 where terrain is a pagedLOD VPB database and los is an
 osgSim:LineOfSight class. Once I comment this call out, performance is
where
 it should be. This would seem to suggest that there's no bottleneck
outside
 the ray/triangle intersection but that there are issues with the
 intersection calculations themselves for LOS...

 -Shayne

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
 Osfield
 Sent: Friday, August 20, 2010 2:30 AM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] osgSim HeightAboveTerrain performance...

 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 shayne.tuel...@hill.af.mil 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: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] 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 shayne.tuel...@hill.af.mil 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

Re: [osg-users] osgSim HeightAboveTerrain performance...

2010-08-19 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
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: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] 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 shayne.tuel...@hill.af.mil 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: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] 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
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgSim HeightAboveTerrain performance...

2010-07-28 Thread Robert Osfield
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 shayne.tuel...@hill.af.mil 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: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] 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
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgSim HeightAboveTerrain performance...

2010-07-28 Thread Jason Beverage
Hi Shayne,

Also, if you're intersecting against a PagedLOD database the highest
level of detail of the database is loaded and cached by the
DatabaseReadCallback in the osgSim::HeightAboveTerrain class.  So if
your intersections are grouped spatially together they have a better
chance of being able to use what is in the memory cache and don't need
to load anything from disk.  If you're doing random intersections all
over the database then there is a greater chance that it will need to
load files from disk and slow things down.

Thanks,

Jason

On Wed, Jul 28, 2010 at 4:47 AM, Robert Osfield
robert.osfi...@gmail.com wrote:
 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 shayne.tuel...@hill.af.mil 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: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] 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
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgSim HeightAboveTerrain performance...

2010-07-27 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
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: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] 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



smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgSim HeightAboveTerrain performance...

2010-07-27 Thread Christiansen, Brad
Hi,

I am not using this functionality at the moment but I do plan on doing so in 
the relatively near future. As such, please keep posting any findings you make. 
If it looks like some modifications to the code could help performance I would 
be willing to chip in some effort.

Cheers,

Brad

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller, 
Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Sent: Wednesday, 28 July 2010 2:26 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgSim HeightAboveTerrain performance...

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: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] 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




DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgSim HeightAboveTerrain performance...

2010-07-23 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
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



smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org