Handle missing batch ID attributes #147
Merged
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.
(This was originally causally thrown into #146 , but should be a dedicated PR:)
When running the upgrade with
targetVersion 1.1
, then the tools will try to convert B3DM to GLB. The batch table from the B3DM is converted into glTF extensions (EXT_mesh_features
andEXT_structural_metadata
).But apparently, there are some very old/legacy B3DM files that define a batch table, but contain glTF 1.0 that do not define a
BATCHID
or_BATCHID
attribute. From a quick (somewhat shallow) inspection, it looks like the batch ID might somehow have been defined programmatically via the shader that was stored in the glTF 1.0. There is no data available that has such a missing batch ID and is known to be "valid". So any attempt to migrate this to new structures (to emulate the old behavior) would involve lots of guesses and/or code archeology.Therefore, this PR handles this case in the most simple form: When such a B3DM with a glTF 1.0 without batch IDs is encuntered during the upgrade to 1.1, then it will print a warning, and the resulting GLB will not contain
EXT_mesh_features
.