Re: [osg-users] KdTree support now checked in

2008-07-17 Thread James Killian
@lists.openscenegraph.org Sent: Saturday, July 12, 2008 10:46 AM Subject: Re: [osg-users] KdTree support now checked in Hi Adrian, It's great to hear you getting better performance. How much is down to more efficient intersections vs other changes to the OSG I cannot say - you'd need to profile

Re: [osg-users] KdTree support now checked in

2008-07-17 Thread Adrian Egli OpenSceneGraph (3D)
, and so now Group Traverse can do more iterations. James Killian - Original Message - From: Robert Osfield [EMAIL PROTECTED] To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Saturday, July 12, 2008 10:46 AM Subject: Re: [osg-users] KdTree support now checked in Hi

Re: [osg-users] KdTree support now checked in

2008-07-17 Thread James Killian
Message - From: Adrian Egli OpenSceneGraph (3D) To: OpenSceneGraph Users Sent: Thursday, July 17, 2008 2:27 AM Subject: Re: [osg-users] KdTree support now checked in Sorry, i don't really understand where the bench come from. what did you messured, linesegement intersection

Re: [osg-users] KdTree support now checked in

2008-07-17 Thread Robert Osfield
On Thu, Jul 17, 2008 at 1:31 PM, James Killian [EMAIL PROTECTED] wrote: The actual data comes from using the Amd Code Analyzer, while running the game. But what do the values mean? ms? number of times called? number of astronauts in orbit at any one time?

Re: [osg-users] KdTree support now checked in

2008-07-17 Thread James Killian
effect of using 40% cpu to 2! - Original Message - From: Robert Osfield [EMAIL PROTECTED] To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Thursday, July 17, 2008 7:46 AM Subject: Re: [osg-users] KdTree support now checked in On Thu, Jul 17, 2008 at 1:31 PM, James

Re: [osg-users] KdTree support now checked in

2008-07-13 Thread Jean-Sébastien Guay
Hi Robert, It's interesting how different bottlenecks pop up, in this case creating objects on the heap is clearly showing itself as a bottleneck whereas the old brute force intersection code was so slow that this wasn't a significant factor. Bear in mind that what I mentioned was with

Re: [osg-users] KdTree support now checked in

2008-07-13 Thread Jean-Sébastien Guay
Hello Rick, So my first question is about how I should try to cache the intersect visitors? Should I keep one around for each large ship (node passed in to the getIntersections() function), or should I just make a single one that is used over and over? There's really no way I can answer

Re: [osg-users] KdTree support now checked in

2008-07-13 Thread Jean-Sébastien Guay
Hi Robert, I was wondering, is there a way this new kd-tree can be leveraged to make other types of intersection tests (polytope) faster too? I will soon need to integrate polytope intersections for picking of lines and points into our framework, so it would be cool if those could be

Re: [osg-users] KdTree support now checked in

2008-07-13 Thread Jean-Sébastien Guay
Hi Robert, To enable automatic generation of KdTree's I have extended osgDB so that the Registry and DatabasePager are both KdTree aware, and if KdTree build option is enabled it'll use the Registry's new KdTreeBuilder object to build KdTree's on loaded models. To enable this building you

Re: [osg-users] KdTree support now checked in

2008-07-13 Thread Robert Osfield
Hi J-S, On Sun, Jul 13, 2008 at 8:15 PM, Jean-Sébastien Guay [EMAIL PROTECTED] wrote: I was wondering, is there a way this new kd-tree can be leveraged to make other types of intersection tests (polytope) faster too? I will soon need to integrate polytope intersections for picking of lines and

Re: [osg-users] KdTree support now checked in

2008-07-13 Thread Jean-Sébastien Guay
Hi Robert, osg::KdTree could support osg::Polytope intersections, but I haven't implemented this as it wasn't required for the client, and I want to get 2.6 out the door sooner rather than later. Feel free to pitch in, but bare in mind I want to get 2.6 out in the next two weeks. OK, I just

Re: [osg-users] KdTree support now checked in

2008-07-12 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert Perfect, i will help you in analyzing the performance bottle neck. of course the kd-tree will be an imporant new feature, and also new rendering technics could become reasonable once we have a really fast framework for intersection tests. /adrian 2008/7/12 Jean-Sébastien Guay [EMAIL

Re: [osg-users] KdTree support now checked in

2008-07-12 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert Compiling...ends in some warnings, may you can fix them KdTree.cpp(108) : warning C4018: '=' : signed/unsigned mismatch osgkdtree.cpp c:\dev\OpenSceneGraphSVN\Openscenegraph\examples\osgkdtree\fixeddivision.h(115) : warning C4018: '' : signed/unsigned mismatch

Re: [osg-users] KdTree support now checked in

2008-07-12 Thread Robert Osfield
Hi J-S, On Sat, Jul 12, 2008 at 1:09 AM, Jean-Sébastien Guay [EMAIL PROTECTED] wrote: I think I may be able to help a bit regarding the higher-level setup and bookkeeping changes needed to speed things up on that regard. One thing I noticed before is that creating a new Intersector and

Re: [osg-users] KdTree support now checked in

2008-07-12 Thread Adrian Egli OpenSceneGraph (3D)
Hi Robert, i tested the whole afternoon with a really big terrain database (city of cannes). i rebuild our internet based visualisation plugin with latest openscenegraph (SVN of this morning) and the performance with the kdTree datastructure enabled is much better than with elder OSG version. i

Re: [osg-users] KdTree support now checked in

2008-07-12 Thread Robert Osfield
Hi Adrian, It's great to hear you getting better performance. How much is down to more efficient intersections vs other changes to the OSG I cannot say - you'd need to profile the relative costs of intersections/cull and draw traversals etc. KdTree are only used in intersections, so it doesn't

Re: [osg-users] KdTree support now checked in

2008-07-12 Thread rpingry
Hi J-S, et. al. When you mention caching the intersect visitors, when should you use reset() and when are setStart()/setEnd() used? In my game, I keep simplified, bounding box representations of the ships in the scene and then do line segment intersections. When I do the calculations, I start

[osg-users] KdTree support now checked in

2008-07-11 Thread Robert Osfield
Ar accidentally pressed a control combination and gmail kindly dispatched the email before complete... Rejoining the previous email... To enable automatic generation of KdTree's I have extended osgDB so that the Registry and DatabasePager are both KdTree aware, and if KdTree build option

Re: [osg-users] KdTree support now checked in

2008-07-11 Thread Jean-Sébastien Guay
Hi Robert, To wrap, all these changes on now in SVN trunk and will be part of 2.5.4 and hence the up coming 2.6. If you enable the build of automatic KdTrees of load and use IntersectionVisitor/LineSegmentIntersector then you'll be able to go straight ahead of use KdTree intersections without