Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REGRESSION] Tiles aren't made visible after sorting #767

Open
AnthonyGlt opened this issue Oct 1, 2024 · 1 comment
Open

[REGRESSION] Tiles aren't made visible after sorting #767

AnthonyGlt opened this issue Oct 1, 2024 · 1 comment
Labels
question Further information is requested

Comments

@AnthonyGlt
Copy link
Contributor

The tiles are downloaded and loaded but not displayed.
It seems that the issue appeared after this MR
Exactly this line:

queuedTiles.sort( lruCache.unloadPriorityCallback );

To Reproduce

Steps to reproduce the behavior:

  1. Load this tileset https://storage.googleapis.com/ahp-research/maquette/ign/buildings/beta.3/1.0/tileset.json
  2. Use this scale: geospatialRotationParent.scale.set( 0.01, 0.01, 0.01 ); (big model)
  3. Set the errorTarget to zero

Screenshots

Without the sorting line:
image

With the sorting line:
image

It's again for a specific tileset 😬

I've tried to increase the cache size, without luck
tiles.lruCache.maxBytesSize = 2**30;

Thank you

@AnthonyGlt AnthonyGlt added the bug Something isn't working label Oct 1, 2024
@gkjohnson
Copy link
Contributor

I've already described the issue with this tile set in iTowns/itowns#2335, I think. The newer tile set in iTowns/itowns#2335 (comment) works better but since the "ADD" refinement is used but these data sets still more or less have no hierarchy to them. The root node has over 28,000 children, over 14,000 of which are external tile sets with the same very large "geometricError" value (~1000) while the root node has an even larger geometric error value (~111,111) meaning that every child will basically load / render as soon as that root tiles error value is met.

The tile set is more or less structured so it's just loading everything in the frustum, leading to cases like this with over 3000 nodes rendering and 8000 nodes loaded including external tile sets (lru cache max size was increased to 10,000 items and max bytes was increased to over 3GB):

image

There are still more tiles that would load if I increased the max bytes size. Basically this tile set isn't really taking advantage of how 3d tiles is supposed to work. There should be a lot more hierarchy (something like a quad tree with 4 children per tile) with progressively decreasing geometric error which will act as screenspace error cutoffs for when the next set of additive tiles should be rendered.

Also keep in mind that if a parent tile's error threshold is met then all children must be checked for frustum intersections. That means that at least 28,000 region-frustum checks must be done every frame which is going to have a significant impact on framerate alone. This is another reason to use a more well-structured hierarchy.

@gkjohnson gkjohnson added question Further information is requested and removed bug Something isn't working labels Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants