[osg-users] Update Optimization

John Burgess john.burgess at rocketmail.com
Sat Jul 5 00:06:19 PDT 2008


Eagerly waiting for the release of the kdTree support :)
John


----- Original Message ----
From: Robert Osfield <robert.osfield at gmail.com>
To: OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
Sent: Saturday, July 5, 2008 2:00:50 AM
Subject: Re: [osg-users] Update Optimization

Hi John,

OK.  If you are using the OSG's osgUtil::IntersectionVisitor or the
old IntersectVisitor for HAT calculatations then you will find it slow
if you are doing many tests per second.

So what to do about it?  Oooh well you just be patient, then when I
give the nod update to the latest OSG and just recompile your code and
hey presto most of high intersection cost will be gone ;-)

What I'm working on right now is KdTree support, this support will
integrate directly with the existing scene graph and
IntersectionVisitor.  The KdTrees can be automatically generated on
loading of data, and the intersection routines will automatically
detect the presence of the KdTree assigned to geometry leaves and use
these for intersection testing so it'll all work pretty transparently.
  This work isn't complete yet, but should be working early next week.

Robert.

On Fri, Jul 4, 2008 at 5:47 PM, John Burgess
<john.burgess at rocketmail.com> wrote:
> Hi Robert,
>
> In the update call back, I use the intersector to compute the height above
> terrain and the normal for each tank and position it on the terrain in every
> frame. So for 300 tanks, the height and normal computation will be performed
> 300 times per frame which takes about 700 ms during the update
> traversal from the traversal time graphical display. What can be done to
> reduce the update time and yet able to achieve my aim of positioning the
> tanks correctly on the terrain?
>
> Thanks,
> John
> ----- Original Message ----
> From: Robert Osfield <robert.osfield at gmail.com>
> To: OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
> Sent: Saturday, July 5, 2008 12:33:32 AM
> Subject: Re: [osg-users] Update Optimization
>
> Hi John,
>
> What exactly is taking all the time?  Your own physics code?
> Intersection code?  You have said anything about what you do in the
> update other that update positions.
>
> Robert.
>
> On Fri, Jul 4, 2008 at 5:25 PM, John Burgess
> <john.burgess at rocketmail.com> wrote:
>> Hi all,
>>
>> My viewer needs to support at least 400 entities running at 30 Hz. My
>> entities are all moving tanks and I need to clamp them to the terrain
>> using
>> an update call back in every frame, the frame rate will drop to 3 Hz when
>> I
>> load 300 tanks with the update cycle taking up a huge amount of time. How
>> can I achieve 30 Hz for 400 entities and yet be able to clamp them to the
>> terrain?
>>
>> Thanks,
>> John
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080705/08d75092/attachment-0003.htm>


More information about the osg-users mailing list