-
Notifications
You must be signed in to change notification settings - Fork 155
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
Validate that geometry is fully contained in bounding volumes #233
Comments
A small update here: When this issue was opened, it would have been a lot of effort to actually implement this, because there was no functionality for computing the bounding volume of the tile content in the first place. In the meantime, there are some functionalities in the It would likely be computationally expensive, so should probably be disabled by default via a validation config flag. And it could be difficult to make this check "perfect" - for example, some really clever and expensive implementation could compute a bounding volume for an I3DM that is tighter than the one that is computed with the 3D Tiles Tools. But it could at least be implemented as a preview feature, maybe even with some "threshold" so that small deviations would only be a WARNING. In any case, the building blocks are now there. |
Minor updates here from investigations about how this could be implemented: The validator currently checks whether a content bounding volume is contained in the tile bounding volume. This is part of the legacy consistency check. But I think that this is not something that should be validated. It is not required by the specification. The specification always refers to the geometry being contained in bounding volumes, but never to bounding volumes being contained in bounding volumes Related that that: The previous comment pointed to the functions in the Now... the only approach that I see for doing a sensible check here: The functions for computing the bounding volumes in the 3D Tiles Tools already follow the pattern of
(with some special cases, e.g. for I3DM, but in principle, it's that). The positions are stored as some The validation function could therefore be implemented as a simple
(with Now the unfortunate part: So it will be necessary to iterate over all vertex positions, for each content, for each tile bounding volume 😬 And the image is oversimplified. For a real hierarchy, it will be necessary to iterate over all vertices of all contents to check whether the root tile bounding volume is valid. With a "straightforward" approach, it would be necessary to iterate over the vertices of each content But with a dedicated traversal, this may be more reasonable: When traversing down to the content, one could keep some sort of "stack" of bounding volumes that any content has to be validated against. I'll probably try that out... |
An aside: A seemingly straightforward optimization of that last approach would be to check whether the geometry is contained in the leaf bounding volume, and then first only check whether the leaf bounding volume is fully contained in its parent (up to the root). If this is the case, then it will imply that the geometry is also fully contained in each of the parent bounding volumes. But 1. when this is not the case, the low-level, really geometry-based check has to be done, and 2. one has to think about how to carry that information up the hierarchy. |
One aspect of the validation of content data should be to check that geometry is fully contained in the relevant bounding volumes. This refers to
content.boundingVolume
and eachtile.boundingVolume
on the path from the tile that contains the geometry, up to the root.The text was updated successfully, but these errors were encountered: