gwaldron / osgearth

3D Maps for OpenSceneGraph / C++14
https://www.pelicanmapping.com/home-1/opensource
Other
1.48k stars 774 forks source link

Building kdtrees at runtime is too slow #2487

Closed jasonbeverage closed 2 months ago

jasonbeverage commented 5 months ago

There are a few places that kdtrees get built in osgEarth that can cause loading stalls.

  1. In DrawInstanced::setMatrices
  2. SimplePager::createPagedNode
  3. TileDrawable::setElevationRaster

Investigate alternatives to using the kdtrees being built at runtime. Options could include prebuilding and saving the kdtrees, making a faster kdtree builder or using a completely different intersection accelerator structure.