<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE type=text/css><!-- DIV {margin:0px;} --></STYLE>
<META content="MSHTML 6.00.6000.16674" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=781295022-04072008>John -- If you can't upgrade to the new kdtree
functionality, I can think of a couple ways to speed things up off the top of my
head.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=781295022-04072008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=781295022-04072008>1) If some of the entities are robots, you could
pre-compute their orientation and position.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=781295022-04072008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=781295022-04072008>2) Assuming the eyepoint isn't right next to all 300
tanks simultaneously, take advantage of LOD to avoid doing precise position and
orientation computations.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=781295022-04072008></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=781295022-04072008>Hope that helps,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=781295022-04072008> -Paul</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN
class=781295022-04072008></SPAN></FONT> </DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
osg-users-bounces@lists.openscenegraph.org
[mailto:osg-users-bounces@lists.openscenegraph.org] <B>On Behalf Of </B>John
Burgess<BR><B>Sent:</B> Friday, July 04, 2008 10:48 AM<BR><B>To:</B>
OpenSceneGraph Users<BR><B>Subject:</B> Re: [osg-users] Update
Optimization<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: verdana, helvetica, sans-serif">
<DIV>Hi Robert,</DIV>
<DIV> </DIV>
<DIV>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?</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>John</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: verdana, helvetica, sans-serif"><BR>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: arial, helvetica, sans-serif">-----
Original Message ----<BR>From: Robert Osfield
<robert.osfield@gmail.com><BR>To: OpenSceneGraph Users
<osg-users@lists.openscenegraph.org><BR>Sent: Saturday, July 5, 2008
12:33:32 AM<BR>Subject: Re: [osg-users] Update Optimization<BR><BR>Hi
John,<BR><BR>What exactly is taking all the time? Your own physics
code?<BR>Intersection code? You have said anything about what you do in
the<BR>update other that update positions.<BR><BR>Robert.<BR><BR>On Fri, Jul
4, 2008 at 5:25 PM, John Burgess<BR><<A
href="mailto:john.burgess@rocketmail.com"
ymailto="mailto:john.burgess@rocketmail.com">john.burgess@rocketmail.com</A>>
wrote:<BR>> Hi all,<BR>><BR>> My viewer needs to support at least 400
entities running at 30 Hz. My<BR>> entities are all moving tanks and I need
to clamp them to the terrain using<BR>> an update call back in every frame,
the frame rate will drop to 3 Hz when I<BR>> load 300 tanks with the update
cycle taking up a huge amount of time. How<BR>> can I achieve 30 Hz for 400
entities and yet be able to clamp them to the<BR>> terrain?<BR>><BR>>
Thanks,<BR>> John<BR>><BR>>
_______________________________________________<BR>> osg-users mailing
list<BR>> <A href="mailto:osg-users@lists.openscenegraph.org"
ymailto="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</A><BR>>
<A
href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org"
target=_blank>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</A><BR>><BR>><BR>_______________________________________________<BR>osg-users
mailing list<BR><A href="mailto:osg-users@lists.openscenegraph.org"
ymailto="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</A><BR><A
href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org"
target=_blank>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</A><BR></DIV></DIV></DIV><BR></BLOCKQUOTE></BODY></HTML>