I3S Support#1371
Draft
calebbuffa wants to merge 12 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds initial I3S (Indexed 3D Scene Layer) support to cesium-native, enabling scene services published by Esri ArcGIS (both hosted and on-premises) to be streamed using the same
TilesetAPI as 3D Tiles.What was added
Four new libraries, all gated behind
-DCESIUM_ENABLE_I3S=ON(off by default, no impact to existing builds):CesiumI3S— Strongly-typed C++ data model for the full I3S spec. Covers CMN (3DObject, IntegratedMesh), PSL (Point), PCSL (PointCloud), and BLD (Building) layer types, including node pages, geometry definitions, PBR materials, spatial references, and drawing info.CesiumI3SReader— JSON deserialization layer for I3S documents (SceneLayerReader,NodePageReader,NodeIndexDocumentReader). Built onCesiumJsonReaderwith JSON handler classes and a template-based enum deserializer.CesiumI3SContent— I3S-to-glTF geometry conversion pipeline. Supports legacy (< 1.7) and modern (≥ 1.7) geometry schemas, raw binary and Draco-compressed buffers, optional EGM96 geoid correction, UV region atlas cropping, and per-feature metadata viaEXT_mesh_features/EXT_structural_metadata.CesiumI3SSelection—TilesetContentLoaderimplementation (I3STilesetLoader,I3STilesetLoaderFactory) that drives Cesium's tile selection loop for I3S services. IncludesIResourceLocator,HttpResourceLocator(live ArcGIS services), andSlpkResourceLocator(local SLPK ZIP archives). Key behaviours:loadTileContentto avoid blockingcreateTileChildren.lodThresholdto CesiumgeometricErrorper metric type (MaxScreenThreshold,MaxScreenThresholdSQ,DistanceRangeFromDefaultCamera).setUnconditionallyRefine()on mesh-less organisational nodes so the tree is always traversed through them.onTileContentUnloaded(new virtual hook onTilesetContentLoader): a ref-counted,shared_ptr-based cache evicts parsedNodePageobjects when all tiles derived from a page are unloaded.Changes to existing code
TilesetContentLoader: addedvirtual void onTileContentUnloaded(const Tile&) noexcept {}as an opt-in hook for loaders that maintain auxiliary in-memory data keyed on tiles.TilesetContentManager::notifyTileUnloading: callsonTileContentUnloadedso the above hook fires at the single exit point for all tile unloads.-DCESIUM_ENABLE_I3S=ONto all build/test steps and-E "[live]"toctestto exclude network-dependent tests from automated runs.Issue number or link
#1341
Author checklist
CHANGES.mdwith a short summary of my change (for user-facing changes).Remaining Tasks
SrcreenSpaceRelative,EffectiveDensity,DensityThresholdwhich do not have a clean mapping to Cesium'sgeometricError. Currently these log an error and return0.0(treat as leaf). Metrics that do map well follow the already implemented pattern in cesiumjs. Decide how to handle unsupported metrics gracefully.projlib, this PR only supports 4326 horizontal CRS. Any other returns a conversion error.IAssetAccessor; none is included yet.Testing plan
Unit tests in
CesiumI3SContent/test/cover: unsupported CRS, legacy binary geometry, Draco-compressed geometry, UV region atlas cropping, modern binary geometry (position-only, normals, face ranges), truncated buffer error paths, andEXT_mesh_featuresgeneration.A live integration test in
CesiumI3SSelection/test/TestI3STilesetLoader.cpploads the public San Francisco Buildings ArcGIS Online service (no authentication required), drives a single-frame tile update from a camera positioned 500 m above the dataset centre, and asserts that at least one tile with non-empty glTF meshes is in the render list. This test is tagged[live]and excluded from CI viactest -E "[live]".To run locally:
cmake --preset=vcpkg-windows -DCESIUM_ENABLE_I3S=ON cmake --build build cesium-native-tests.exe "--test-case=I3S HTTP*"Reviewer checklist
Thank you for taking the time to review this PR. By approving a PR you are taking as much responsibility for these changes as the author.
As you review, please go through the checklist below:
CHANGES.mdto make sure they accurately cover the work in this PR.