OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Optimization and lots of objects


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Mike Greene
Guest





PostPosted: Thu Oct 23, 2008 7:37 pm    Post subject:
Optimization and lots of objects
Reply with quote

I guess I need to be a little more detailed in my project: I am
simulating a vehicle driving down a test range with a sensor looking for
targets. As a target is found, I add a geode->shapeDrawable(sphere) for
each discovered target. As more hits are made by the sensor, the
orientation, position, and scale of each of these spheres can change
dynamically.

So I have a PAT as the parent of each geode to facilitate the transforms
for each target. The problem is frame rate drops significantly as I add
more and more targets (I may need up to 10000 of them!). I tried using
the detailRatio on the sphere to reduce the number of polygons which
helped a little, but not significantly. I have also tried using just a
six-sided box as representative instead of the sphere, but still saw
drastic frame rate drops. The osgStats show that most of the time is
spent in the CULL process.

My question - is there a better way of handling a large number of
objects that must each be individually manipulated dynamically for the
duration of the program (i.e., not static)?

Im using a fairly


Mike Greene


------------------
Post generated by Mail2Forum
Back to top
Robert Osfield
Guest





PostPosted: Fri Oct 24, 2008 8:25 am    Post subject:
Optimization and lots of objects
Reply with quote

Hi Mike,

Um... I guess you haven't read the thread about managing ten's of
thousands of osg::Box's yesterday....

So go read the last two days emails as a back ground.

In the case of sphere's I'd see if you can get away with point
sprites, if you can then this will be the most efficient way forward.
Personally I'd create a set of osg::Geometry containing as many points
as you have targets, or perhaps even just one to be lazy, and then use
point sprites to make this points/or textured targets. Then just
update the positions of the points per frame when required.

Robert.

On Thu, Oct 23, 2008 at 8:40 PM, Mike Greene <> wrote:
Quote:
I guess I need to be a little more detailed in my project: I am simulating
a vehicle driving down a test range with a sensor looking for targets. As a
target is found, I add a geode->shapeDrawable(sphere) for each discovered
target. As more hits are made by the sensor, the orientation, position, and
scale of each of these spheres can change dynamically.

So I have a PAT as the parent of each geode to facilitate the transforms for
each target. The problem is frame rate drops significantly as I add more and
more targets (I may need up to 10000 of them!). I tried using the
detailRatio on the sphere to reduce the number of polygons which helped a
little, but not significantly. I have also tried using just a six-sided box
as representative instead of the sphere, but still saw drastic frame rate
drops. The osgStats show that most of the time is spent in the CULL process.

My question - is there a better way of handling a large number of objects
that must each be individually manipulated dynamically for the duration of
the program (i.e., not static)?

Im using a fairly


Mike Greene




------------------
Post generated by Mail2Forum
Back to top
Mike Greene
Guest





PostPosted: Fri Oct 24, 2008 1:22 pm    Post subject:
Optimization and lots of objects
Reply with quote

Robert Osfield wrote:

Quote:
Hi Mike,

Um... I guess you haven't read the thread about managing ten's of
thousands of osg::Box's yesterday....

So go read the last two days emails as a back ground.

In the case of sphere's I'd see if you can get away with point
sprites, if you can then this will be the most efficient way forward.
Personally I'd create a set of osg::Geometry containing as many points
as you have targets, or perhaps even just one to be lazy, and then use
point sprites to make this points/or textured targets. Then just
update the positions of the points per frame when required.

Robert.

Actually, I did read the previous posts. My problem is that I have to dynamically scale the spheres (ellipsoids) as they are representing actual 3D error covariance values that change depending on the number of hits made by the sensor (they typically start out large and get smaller as more accurate measurements are made). And, I have both a "in the truck view" and a "God's Eye view", so the appeance of the ellipsoids will change depending on viewing angle. Would sprites work for this case? I may be out of luck in speeding this up, but just wanted to make sure that there was not a more efficient way that I'm missing.

Mike Greene


------------------
Post generated by Mail2Forum
Back to top
Robert Osfield
Guest





PostPosted: Fri Oct 24, 2008 1:45 pm    Post subject:
Optimization and lots of objects
Reply with quote

Hi Mike,

My guess is you could probably use a vertex shader to combine you
compute your scaling required for sprites.

Robert.

On Fri, Oct 24, 2008 at 2:26 PM, Mike Greene <> wrote:
Quote:
Robert Osfield wrote:

Hi Mike,

Um... I guess you haven't read the thread about managing ten's of
thousands of osg::Box's yesterday....

So go read the last two days emails as a back ground.

In the case of sphere's I'd see if you can get away with point
sprites, if you can then this will be the most efficient way forward.
Personally I'd create a set of osg::Geometry containing as many points
as you have targets, or perhaps even just one to be lazy, and then use
point sprites to make this points/or textured targets. Then just
update the positions of the points per frame when required.

Robert.

Actually, I did read the previous posts. My problem is that I have to
dynamically scale the spheres (ellipsoids) as they are representing actual
3D error covariance values that change depending on the number of hits made
by the sensor (they typically start out large and get smaller as more
accurate measurements are made). And, I have both a "in the truck view" and
a "God's Eye view", so the appeance of the ellipsoids will change depending
on viewing angle. Would sprites work for this case? I may be out of luck in
speeding this up, but just wanted to make sure that there was not a more
efficient way that I'm missing.

Mike Greene







------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Happy New Year to all OSG Users Chris Hanson General 0 Mon Jan 07, 2019 10:17 am View latest post
No new posts osg-users Digest, Vol 138, Issue 27 Zachary1234 General 0 Tue Jan 01, 2019 1:16 am View latest post
No new posts osg-users Digest, Vol 137, Issue 14 poweruserm@live.com.au General 0 Fri Nov 16, 2018 11:16 pm View latest post
No new posts Could not find plugin to load objects sdef General [3rdparty] 1 Sat Oct 27, 2018 6:10 am View latest post
No new posts General Users starting questions in O... A Z General 1 Mon Oct 15, 2018 3:59 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP