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

Add support for 3DTILES_bounding_volume_cylinder #1111

Merged
merged 26 commits into from
Feb 25, 2025

Conversation

j9liu
Copy link
Contributor

@j9liu j9liu commented Feb 12, 2025

Depends on #1104 so merge that first. But I'm going to mark this as a draft PR because I think there's a spec question to be had.

This PR adds support for the 3DTILES_bounding_volume_cylinder extension found here. The extension is mainly used to support cylinder voxels in the 3DTILES_content_voxels extension.

The cylinder is meant to be combined with implicit octree tiling, but that results in some weirdness for the BoundingCylinder implementation. When other volumes are subdivided (e.g. box, region) they are still the same shape. But the sub-regions of a cylinder are only parts of a cylinder, not fully cylinders itself. The 3DTILES_bounding_volume_cylinder extension does not currently indicate a way to divide that initial cylinder.

The thing to do here, regardless of spec, is probably to rename BoundingCylinder -> BoundingCylinderRegion, to more accurately indicate that the volume may be a subregion of the fully cylinder. And that way, the division of a BoundingCylinderRegion into sub-regions is logically correct. But I'm wondering if the 3DTILES_bounding_volume_cylinder should also allow angular / radial portions itself? Or, will we restrict it to being a full cylinder, but note that implementations should be wary of handling subregions with angular / radial bounds.

@j9liu j9liu changed the base branch from main to 3dtiles-content-voxels February 12, 2025 19:34
@j9liu
Copy link
Contributor Author

j9liu commented Feb 12, 2025

I also should explicitly note that for efficiency / time reasons, the underlying implementation of BoundingCylinder relies on OrientedBoundingBox as an approximation.

I had actually added cylinder-specific math to the compute distance function (derived from this paper) in this (e5e323f). Unfortunately I had to remove it when I remembered that we're often dealing with cylinder subregions instead of the full cylinder. The math might carry over still but I haven't worked it out.

@j9liu
Copy link
Contributor Author

j9liu commented Feb 13, 2025

@lilleyse and I are reworking the spec here: CesiumGS/3d-tiles#791

Once that's merged in, I'll make changes here accordingly

Base automatically changed from 3dtiles-content-voxels to main February 13, 2025 22:01
@j9liu j9liu changed the base branch from main to axis-aligned-from-points February 17, 2025 14:54
@j9liu j9liu marked this pull request as ready for review February 17, 2025 22:18
@j9liu
Copy link
Contributor Author

j9liu commented Feb 17, 2025

I'm marking this as ready for review. The BoundingCylinder class is now BoundingCylinderRegion, with fields that mirror the ones in CesiumGS/3d-tiles#791. It should also interface more cleanly with ImplicitTilingUtilities.

@kring kring added this to the March 2025 Release milestone Feb 21, 2025
Copy link
Member

@kring kring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments (mostly nitpicking include style), but overall looks great!

@j9liu
Copy link
Contributor Author

j9liu commented Feb 24, 2025

Thanks for the thorough review @kring ! I think I addressed all your comments, let me know if anything else comes up.

Base automatically changed from axis-aligned-from-points to main February 25, 2025 01:55
@kring
Copy link
Member

kring commented Feb 25, 2025

Thanks @j9liu!

@kring kring merged commit 84416c5 into main Feb 25, 2025
22 checks passed
@kring kring deleted the 3dtiles-bounding-volume-cylinder branch February 25, 2025 02:11
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.

2 participants