2011/8/2 Mathias Fröhlich wrote: <snip> > So I decoupled these two structures somehow. I have put bv-trees of geometry > into the userdata field of the scenegraph. So for the high level operations > like tile loading, the scenery paging is used to load and get rid of the bv- > trees. The whole intersectable scenery should be there in this form. > Using this, you could already speed up ground queries by using these bv-tree > leafs for intersection test leaf traversal. > > But for the actual aircraft I wanted to be able to do up to the order of > 100-1000 intersection tests per timestep. To get that sufficiently fast, I > built > that ground cache:
<snip> > This means using the ground cache is only valid near the actual aircraft, > where near means a few 10 meters. And no, please do not increase this ground > cache radius of the aircraft for the weather. > > What you can do for the weather is to traverse the bv-tree nodes instead of > the GPU optimized scenery nodes for ground queries. I guess this is the > fastest (implementation wise fastest) approach to get something you need. Thanks very much for the detailed explanation. That makes a lot of things much clearer! >From a quick code read, it looks like the scenery.cxx get_elevation_m() >function does not use the bv-tree. I think the reason I have seen much higher performance using the "ground_cache" is that the flight.cxx method uses the BVH tree if it doesn't get a scenery hit. Therefore the solution may be to change the scenery.cxx version to use the BVH tree if possible. That should provide significant performance gains. I will investigate... -Stuart ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel