Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting gltf with draco compression messes up the vertex color #1019

Closed
jespertheend opened this issue Apr 10, 2020 · 5 comments · Fixed by #1268
Closed

Exporting gltf with draco compression messes up the vertex color #1019

jespertheend opened this issue Apr 10, 2020 · 5 comments · Fixed by #1268
Labels
draco exporter This involves or affects the export process Material

Comments

@jespertheend
Copy link

Describe the bug
When exporting a mesh with vertex colors as glb with draco compression enabled. The exported vertex color is different from what it should be. I haven't been able to import the exported glb into blender to check if this is a bug with blender or if it's an issue with three.js. But my exported mesh fails to render correctly both in https://threejs.org/editor/ as well as on https://gltf-viewer.donmccurdy.com/ and on https://sandbox.babylonjs.com/

To Reproduce
-Create a simple mesh with vertex colors (see attached blend file)
-Export as glb
-Export again as glb but with draco mesh compression enabled
-Notice how vertexColorTest.glb works fine on the websites mentioned above, but how vertexColorTestCompressed.glb doesn't.

Screenshots
image
no compression (left) vs draco compression (right)

.blend file/ .gltf
vertexColorTest.zip

Version
Operating system: Darwin-19.4.0-x86_64-i386-64bit 64 Bits
version: 2.83 (sub 13), branch: master, commit date: 2020-04-08 21:23, hash: rB1239cab11ff9

Additional context
https://gltf.insimo.com/ has an implementation of draco mesh compression with working vertex colors. Notice how 'vertexColorTest insimo.glb' works on all sites mentioned above.

@julienduroure julienduroure added draco exporter This involves or affects the export process Material labels Apr 11, 2020
@julienduroure
Copy link
Collaborator

@McNopper Can you please assign to someone of your team?

@BenCidPerez
Copy link

Any news on this? The bug persists and makes using the exporter's draco compression unusable for all projects that rely on the vertex color data to be accurate.

@jespertheend
Copy link
Author

In case it helps anyone, for the time being we ended up using https://github.com/CesiumGS/gltf-pipeline to compress all our assets in bulk.

@ghost ghost mentioned this issue Nov 26, 2020
@ghost
Copy link

ghost commented Nov 26, 2020

With the PR #1268, the compressed models are properly exported, though not all viewers display it correctly, such as Babylon (https://sandbox.babylonjs.com). Don McCurdy's viewer (https://gltf-viewer.donmccurdy.com) for instance does it right.

@jespertheend
Copy link
Author

Thanks! Looking forward to this :)

@ghost ghost linked a pull request Nov 26, 2020 that will close this issue
julienduroure added a commit that referenced this issue Jan 4, 2021
Feature: Draco Decoder
We can now import glb with draco compression.
This also fix exporting vertex color . Fix #1019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
draco exporter This involves or affects the export process Material
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants