Fix tile refinement when leaf is empty #8996
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We got a support issue about a tileset that doesn't refine property when
skipLevelOfDetail
is false, which is the default since CesiumJS 1.67. The tileset has empty leaf tiles which exposed an edge case inexecuteEmptyTraversal
inCesium3DTilesetTraversal
in which a tile with empty leaf descendants would not refine. The fix is to refine even if the tile would refine to empty leaf tiles. Note that this only applies to leaf tiles - if there's a tile chain that consists of a content tile, an empty tile, and a content tile, it will wait for the final content tile to load before refining the top-level content tile, which is the main purpose ofexecuteEmptyTraversal
- to prevent holes from appearing while tiles stream in.Technically this fix could lead to situations where the parent will refine and there will be holes wherever there's empty leaf tiles, but I think that's acceptable and in the spirit of how the tileset is constructed.
Local sandcastle with the fix
Hosted sancastle