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

Set maximumTileCount in Cesium3DTilesVoxelProvider #10996

Merged
merged 2 commits into from
Jan 3, 2023
Merged

Conversation

lilleyse
Copy link
Contributor

@lilleyse lilleyse commented Jan 3, 2023

VoxelProvider has a maximumTileCount property that is used to preallocate various data textures of a VoxelPrimitive. This property used to exist in Cesium3DTilesVoxelProvider but was removed prior to #10253 being merged because it was not general purpose enough.

The approach in this PR is to look for tileset metadata that uses the TILESET_TILE_COUNT semantic. In 3D Tiles 1.1 this would look like:

  "schema": {
    "id": "voxel",
    "classes": {
      "tileset": {
        "properties": {
          "tileCount": {
            "type": "SCALAR",
            "componentType": "UINT64",
            "semantic": "TILESET_TILE_COUNT"
          }
        }
      }
    }
  },
  "metadata": {
    "class": "tileset",
    "properties": {
      "tileCount": 401
    }
  }

The reason this PR is important is because without maximumTileCount a VoxelPrimitive will allocate a megatexture and node texture that far exceed the actual memory usage required by smaller tilesets.

See the corresponding 3D Tiles PR: CesiumGS/3d-tiles#728

@lilleyse lilleyse requested a review from jjhembd January 3, 2023 18:56
@cesium-concierge
Copy link

Thanks for the pull request @lilleyse!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.

Copy link
Contributor

@jjhembd jjhembd left a comment

Choose a reason for hiding this comment

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

Looks good!

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.

3 participants