gltf-pipeline
gltf-pipeline copied to clipboard
Command to uncompress Draco
See discussion in https://github.com/AnalyticalGraphicsInc/gltf-pipeline/issues/368.
@FrankGalligan has a work in progress branch here: https://github.com/FrankGalligan/gltf-pipeline/tree/decompress_draco
Any updates on this functionality? Would love to be able to freely convert to and from DRACO using only one tool.
Sorry, no update on this functionality yet.
But the functionality is about 90% there. There is a separate option draco.uncompressedFallback
that decodes the Draco geometry and saves it to a different buffer. That functionality would just need to be broken out into its own stage.
still no?
@makc sorry, no update on this issue.
Just tried omitting the -d
option expecting it to decompress.
I went looking online when it didn't and found this.
I also would appreciate the ability to decompress using gltf-pipeline.
Is there another tool out there that decompresses gltf with Draco?
For now I will try the uncompressedFallback.
Also requested in https://github.com/CesiumGS/gltf-pipeline/issues/567
Draco decompression is in development for ~~a future version of~~ Blender here: https://github.com/KhronosGroup/glTF-Blender-IO/pull/1268
EDIT: Draco decompress/import shipped with the Blender glTF addon in January 2021. You can use any recent stable version of Blender to decompress and open Draco glTF models.
Looking forward to see the function
still nothing?
You can try this branch which unfortunately I haven't been able to review yet: https://github.com/CesiumGS/gltf-pipeline/pull/572
Any chance of getting this pull request #572 reviewed?
Anything we can do to help getting this merged? From what I'm understanding from the code, this wouldn't make it possible to first decompress and then compress again (to guarantee it's using the same version regardless of the draco potentially used in the input) in a single run, correct? maybe that's something we could also add.
I ran it locally and updated a few things so that it works with the latest 4.0.2--meanwhile some polyfills were removed, etc.
I also think there's some issues still:
- it should also remove draco from required extensions (
gltf.extensionsRequired = gltf.extensionsRequired.filter(extension => extension !== 'KHR_draco_mesh_compression');
) - textures do not seem to be working after decompression. See input vs output glb and gltf, attached. Input shows 21 notes on https://gltf-viewer.donmccurdy.com/, whereas the output, even with the extensionsRequired fix, shows 50 errors.


Edit:
This probably won't be correct 100% of the time or for all the models, but got the uncompressed one of this particular example to show the textures by replacing TEX_COORD
with TEXCOORD_0
when outputting the primitive attributes (only works because baseColorTexture
is using texCoord
0. If they were set to a different value X, then the attributes should also use TEXCOORD_X
-- see https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_013_SimpleTexture.md). Now the model has 52 hints rather than errors.
Any updates? My use case is to store draco compressed GLBs in the cloud, then fetch them later and decompress them, and do mesh simplification. Without the decompress functionality, I might have to store the original GLBs in the cloud, which costs more storage/bandwidth.