Repository navigation
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the glTF fixture and sample-data corrections.
No open issues 🎉
What changed in this PR
Corrects glTF fixtures and sample data to address schema violations exposed by generated types, supporting #13949 without changing runtime code.
Changes:
- Adds required
EXT_structural_metadataschema IDs to 21 glTF files. - Uses a glTF 2.0 fixture for the unsupported-required-extension test.
| File | Description |
|---|---|
| Specs/Data/Models/glTF-2.0/Weather/glTF/weather.gltf | Adds weather schema ID. |
| Specs/Data/Models/glTF-2.0/SimplePropertyTexture/glTF/SimplePropertyTexture.gltf | Adds property texture schema ID. |
| Specs/Data/Models/glTF-2.0/PropertyTextureWithVectorProperties/glTF/PropertyTextureWithVectorProperties.gltf | Adds vector properties schema ID. |
| Specs/Data/Models/glTF-2.0/PointCloudWithPropertyAttributes/glTF/PointCloudWithPropertyAttributes.gltf | Adds point cloud schema ID. |
| Specs/Data/Models/glTF-2.0/Microcosm/glTF/microcosm.gltf | Adds microcosm schema ID. |
| Specs/Data/Models/glTF-2.0/BuildingsMetadata/glTF/buildings-metadata.gltf | Adds buildings schema ID. |
| Specs/Data/Models/glTF-2.0/BoxTexturedWithPropertyAttributes/glTF/BoxTexturedWithPropertyAttributes.gltf | Adds textured box schema ID. |
| Specs/Data/Models/glTF-2.0/BoxInstancedInterleaved/glTF/box-instanced-interleaved.gltf | Adds interleaved instances schema ID. |
| Specs/Data/Models/glTF-2.0/BoxInstanced/glTF/box-instanced.gltf | Adds instanced box schema ID. |
| packages/engine/Specs/Scene/GltfJsonLoaderSpec.js | Switches extension test to glTF 2.0. |
| Apps/SampleData/models/BoxInstanced/BoxInstanced.gltf | Adds sample model schema ID. |
| Apps/SampleData/Cesium3DTiles/Voxel/VoxelEllipsoid3DTiles/tiles/0/0/0/0.gltf | Adds voxel schema ID. |
| Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/1/1/1/1.gltf | Adds voxel schema ID. |
| Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/1/1/1/0.gltf | Adds voxel schema ID. |
| Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/1/1/0/1.gltf | Adds voxel schema ID. |
| Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/1/1/0/0.gltf | Adds voxel schema ID. |
| Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/1/0/1/1.gltf | Adds voxel schema ID. |
| Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/1/0/1/0.gltf | Adds voxel schema ID. |
| Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/1/0/0/1.gltf | Adds voxel schema ID. |
| Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/1/0/0/0.gltf | Adds voxel schema ID. |
| Apps/SampleData/Cesium3DTiles/Voxel/VoxelCylinder3DTiles/tiles/0/0/0/0.gltf | Adds voxel schema ID. |
| Apps/SampleData/Cesium3DTiles/Voxel/VoxelBox3DTiles/tiles/0/0/0/0.gltf | Adds voxel schema ID. |
Review effort: Balanced
24dbf01 to
6bc8066
Compare
6bc8066 to
24e8971
Compare
javagl
left a comment
There was a problem hiding this comment.
OK, this looks like a straightforward change.
I actually wanted to try it out, and run the validator before and after this change. But... for the Voxel tilesets, the validator does not even come to the point where it would detect that missing id. It bails out before doing the (custom) metadata validation, because the glTF itself contains these errors:
{
"type": "CONTENT_VALIDATION_ERROR",
"path": "/meshes/0/primitives/0/mode",
"message": "Value 2147483647 is out of range.",
"severity": "ERROR"
},
{
"type": "CONTENT_VALIDATION_ERROR",
"path": "/accessors/0/min/3",
"message": "Declared minimum value for this component (0) does not match actual minimum (1).",
"severity": "ERROR"
}
For context: The approach for the glTF validation in the 3d-tiles-validator is that it performs the standard glTF validation first, and only when the glTF does not contain errors, it performs our custom glTF validation, e.g. for the metadata extensions (there is no point in validating a glTF where the glTF Validator already found an 'ERROR', because that thing might then not be a real glTF to begin with)
However, this process has to be made aware of the EXT_primitive_voxels extension, to ignore the error about the mesh primitive mode. I just took a quick note about this at CesiumGS/3d-tiles-validator#348 (comment)
That message about
Declared minimum value for this component (0) does not match actual minimum (1).
looks legitimate, though. I haven't checked the details, but it might be that this file is indeed invalid in that regard.
However, I at least tried the 3d-tiles-validator on one of the other files, namely, the box-instanced.gltf, and confirmed that the change here causes the
{
"type": "PROPERTY_MISSING",
"path": "box-instanced.gltf/schema/id",
"message": "The 'id' property is required",
"severity": "ERROR"
}
to disappear.
Description
The glTF types generated in the previous PR found test data that doesn't follow the glTF schemas. This PR fixes it.
Code changes
Missing
EXT_structural_metadataschema idsThe
EXT_structural_metadataschema requires anidon each metadata schema, and 21.gltffiles inSpecs/DataandApps/SampleDatahad schemas without one. Each now has an id, such asWeatherSchemaId, orvoxelfor the voxel tilesets.glTF 1.0 fixture with
extensionsRequiredThe
GltfJsonLoaderSpectest "load throws if an unsupported extension is required" putextensionsRequiredon a glTF 1.0 fixture, but glTF 1.0 has noextensionsRequired. The test now uses the glTF 2.0 fixture.Issue number and link
Part of #13949.
Testing plan
npm run test -- --includeName Scene/GltfJsonLoadershould pass.npm run test -- --includeName Scene/Modelshould pass.3d-modelsSandcastle (BoxInstanced) and thevoxels-in-3d-tilesSandcastle should render as onmain.Author checklist
CONTRIBUTORS.mdCHANGES.mdwith a short summary of my changeAI acknowledgment
If yes, I used the following Tools(s) and/or Service(s): GitHub Copilot
If yes, I used the following Model(s): Claude Opus 5.5