CesiumGS / 3d-tiles-tools

Apache License 2.0
315 stars 47 forks source link

Consider adding a `convertCmptToGlb` command #132

Open javagl opened 6 months ago

javagl commented 6 months ago

There are two flavors of commands for certain tile content types:

Now, there seems to be one missing, namely convertCmptToGlb. The functionality for converting a CMPT into a single(!) GLB was implemented as part of https://github.com/CesiumGS/3d-tiles-tools/pull/117 . And a convertCmptToGlb command could be implemented on top of that.

But this process does involve many nasty corner cases, roughly related to "merging multiple instances of EXT_structural_metadata". The most common case in the context of the upgrade command is that a CMPT contains B3DM that contain GLB that do not contain metadata. (Heck, they even are glTF 1.0 in many cases...). But in theory, they could contain GLB with metadata, and this may involve corner cases that are not handled yet.

Offering a convertCmptToGlb could be easy, but it would involve several disclaimers (similar to the ones that are mentioned in the upgrade command), to avoid the case where users expect that this command can "magically convert everything"...