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

DV: Fix multiple LODs showing simultaneously with REPLACE refinement #15

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

Kaapp
Copy link

@Kaapp Kaapp commented Sep 4, 2024

While testing #13 on our dev performance testing project, I noticed that occasionally some models would display more than one LOD like shown in the first video clip. I also show the comparison to the original IFC file in OpenIFCViewer.

There was a slight oversight (by me) when checking if we could merge two GroupedTilesArray instances that if enough there was going to be enough space (depending on maxSize) then we would just naively concatenate the two arrays. This has an unintended side effect in the platform that if the tile budget isn't quite reached, and there are tiles with a REPLACE refinement strategy that can be added, then the children will be concatenated to the array in addition to the parent tiles.

Instead, don't short-circuit the concatenation and ensure we evaluate all tiles when merging so that we can splice out any REPLACE parent tiles as needed.

Fortunately, it's unlikely many people would have noticed this as it required you to have quite a small amount of data visible so that every tile that satisfied geometric error could be loaded within the total tile budget.

N.B. The diff looks bad, but it's really just whitespace after I removed the if at the beginning.

Before:

Screen.Recording.2024-09-04.at.13.58.17.mov

After:

Screen.Recording.2024-09-04.at.13.58.56.mov

@Kaapp Kaapp self-assigned this Sep 4, 2024
@Kaapp Kaapp force-pushed the fix-multiple-lods-with-replace-tileset branch from c3f4c82 to cb4097d Compare September 4, 2024 14:25
@Kaapp Kaapp merged commit f38f5d6 into master Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants