There are two flavors of commands for certain tile content types:
b3dmToGlb extracts the GLB from a B3DM
i3dmToGlb extracts the GLB from an I3DM
cmptToGlb extracts the GLBs from a CMPT
convertB3dmToGlb converts a B3DM into a GLB with extensions
convertI3dmToGLB converts an I3DM into a GLB with extensions
...
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"...
There are two flavors of commands for certain tile content types:
b3dmToGlb
extracts the GLB from a B3DMi3dmToGlb
extracts the GLB from an I3DMcmptToGlb
extracts the GLBs from a CMPTconvertB3dmToGlb
converts a B3DM into a GLB with extensionsconvertI3dmToGLB
converts an I3DM into a GLB with extensionsNow, 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 aconvertCmptToGlb
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 theupgrade
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 theupgrade
command), to avoid the case where users expect that this command can "magically convert everything"...