CesiumGS / gltf-pipeline

Content pipeline tools for optimizing glTF assets. :globe_with_meridians:
Apache License 2.0
1.87k stars 241 forks source link

Command to uncompress Draco #382

Open lilleyse opened 6 years ago

lilleyse commented 6 years ago

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

TyLindberg commented 5 years ago

Any updates on this functionality? Would love to be able to freely convert to and from DRACO using only one tool.

lilleyse commented 5 years ago

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.

makc commented 4 years ago

still no?

lilleyse commented 4 years ago

@makc sorry, no update on this issue.

JoelTrain commented 4 years ago

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.

lilleyse commented 3 years ago

Also requested in https://github.com/CesiumGS/gltf-pipeline/issues/567

emackey commented 3 years ago

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.

loooog commented 3 years ago

Looking forward to see the function

DmytroRomanchuk commented 2 years ago

still nothing?

lilleyse commented 2 years ago

You can try this branch which unfortunately I haven't been able to review yet: https://github.com/CesiumGS/gltf-pipeline/pull/572

ptc-alhill commented 2 years ago

Any chance of getting this pull request #572 reviewed?

Apidcloud commented 1 year ago

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:

image image

InputAndOutputModels.zip

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.

zoan37 commented 10 months ago

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.

majid-saeed commented 2 weeks ago

Any updates here?