CesiumGS / CesiumGS/3d-tiles-samples

Some samples have validation errors

Open
#71 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
344
Forks
111
PR merge metrics
No merged PRs in 30d

Description

Some of the samples currently cause validation errors when running the `3d-tiles-validator` on them. That's setting a bad example. The samples should be the reference that people are developing against.

One category of errors was the missing `refine` in the root tile that was fixed with https://github.com/CesiumGS/3d-tiles-samples/pull/70 . But while checking this PR, I noticed that other samples are also causing validation errors.

A condensed summary of the relevant errors:

### Invalid alignments
```
Validating tileset 1.0/TilesetWithDiscreteLOD/tileset.json
{
"type": "BINARY_INVALID_ALIGNMENT",
"path": "dragon_high.b3dm",
"message": "The byte length must be aligned to 8 bytes",
"severity": "ERROR"
},
```
```
Validating tileset 1.0/TilesetWithRequestVolume/city/tileset.json
{
"type": "BINARY_INVALID_ALIGNMENT",
"path": "ul.b3dm",
"message": "The byte length must be aligned to 8 bytes",
"severity": "ERROR"
}
]
```
```
Validating tileset 1.0/TilesetWithRequestVolume/tileset.json
{
"type": "BINARY_INVALID_ALIGNMENT",
"path": "points.pnts",
"message": "The feature table binary must be aligned to 8 bytes",
"severity": "ERROR"
},
```

These should be relatively easy to fix: I do have some infrastructure around "J3DTiles" locally that allows pseudocode of
```
b3dmData = read("file.b3dm");
write("newFile.b3dm", b3dmData);
```
i.e. a trivial read-write pass, and (of course) it will make sure that the data is properly aligned when writing it out.

### Wrong extension declaration
```
Validating tileset 1.1/BoundingBoxTests/2_0_0-4_1_1/tileset.json
{
"type": "EXTENSION_FOUND_BUT_NOT_USED",
"path": "/extensionsUsed",
"message": "The extension '3DTILES_content_gltf' was found, but not declared in 'extensionsUsed'",
"severity": "ERROR"
}
```
A plain oversight, surprisingly only in _one_ of the (otherwise equivalent) files.

### Invalid metadata values
```
Validating tileset 1.1/TilesetWithFullMetadata/tileset.json
{
"type": "VALUE_NOT_IN_RANGE",
"path": "/metadata/example_variable_length_INT64_SCALAR_array/3",
"message": "The array element has type INT64 and must be in [-9223372036854775808,9223372036854775807], but is 9223372036854776000",
"severity": "ERROR"
},
```

It's actually generating 250 (!) errors for that one. But this is an open question as of https://github.com/CesiumGS/3d-tiles-validator/issues/251 , and it's not perfectly obvious how to fix this, as long as \*Script/JSON processing assumes 64 bit floating point values for all numbers...

Contributor guide

No contributing guide indexed for this repository

Research direction

Run 3d-tiles-validator against the reported sample paths, starting with the b3dm and pnts files under 1.0/TilesetWithDiscreteLOD, 1.0/TilesetWithRequestVolume, and 1.1/BoundingBoxTests/2_0_0-4_1_1. Review 1.1/TilesetWithFullMetadata/tileset.json and the validator issue #251 before deciding how its INT64 values should be handled. Done means the reported alignment, extension declaration, and metadata validation errors are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
content, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.