3DTilesRendererJS icon indicating copy to clipboard operation
3DTilesRendererJS copied to clipboard

Tiles are traversed and queued in depth-first order causing shallow tiles to not load when cache is full

Open gkjohnson opened this issue 1 year ago • 2 comments

image image

Possibly only happening when camera is near or inside a tile? Or on reload of the tileset?

gkjohnson avatar Dec 22 '23 03:12 gkjohnson

Necessary settings:

  • target error: 2
  • threshold: 1000
  • side: -Z
  • maxDepth: 9+
  • camera pose: 9, 6, 8

gkjohnson avatar Dec 25 '23 07:12 gkjohnson

The tile isn't being queued because the cache is full. Since tiles are traversed in a depth-first order the children of other tiles fill up the cache first causing the next shallow parent tile to fail to queue.

This is a less likely scenario to encounter if the cache is set up appropriately but two option for avoiding this in a more streamlined manner are to traversed in a breadth-first manner for traversals that queue loads or accumulate tiles that need to be loaded, sort them by priority, and then queue.

It's possible we should queue everything up first, sort using the lru cache sort function (or something similar), then queue loads

gkjohnson avatar Dec 25 '23 08:12 gkjohnson