Draco encoder, "Error compressing attribute"
See original GitHub issueI ran into this peculiar error:
Error: Error compressing "COLOR_0" attribute.
It comes from here: https://github.com/donmccurdy/glTF-Transform/blob/1ef6be94787c4c6dcb21d011d219de73b0ff0e8a/packages/extensions/src/khr-draco-mesh-compression/encoder.ts#L80
I did a bit of digging and can verify a few things:
- The attribute seems to be created on the
Mesh
object created by the encoder module viaconst mesh = new encoderModule.Mesh();
, as the value ofmesh.num_attributes()
is 7, and this happens to be the 7th, and last one. attribute.getComponentType()
is5126
(that’s the same value asAccessor.ComponentType.FLOAT
)attribute.getCount()
is450
attribute.getElementSize()
is4
attribute.getArray()
is aFloat32Array
of size1800
, this checks out as450 * 4
Since the result value is just -1
, I’m having a bit of a difficulty understanding the reason for this failure.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
The first Draco 3D object crypto-compression scheme
During the rANS encoding step of the Draco compression scheme, we propose encrypting the encoded vertex prediction errors. This encryption is per-.
Read more >How to encode/compress gltf to draco - reactjs - Stack Overflow
I want to compress/encode gltf file using draco programatically in threejs with reactjs. I dont want to use any commandline tool, ...
Read more >Gltf export error when I use Draco compression - Blender Artists
There is a proposed fix for this issue in https://github.com/KhronosGroup/glTF-Blender-IO/pull/1352; it hasn't been released yet though. In the ...
Read more >[SOLVED] Error when loading glb compressed with Draco
I'm new with GLB compressed with Draco. ... Error loading model: 3dModel_draco.glb [TypeError: Cannot read property 'buffer' of undefined].
Read more >gltf-pipeline - npm
Draco compression level [0-10], most is 10, least is 0. A value of 0 will apply sequential encoding and preserve face order. No,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, I haven’t been able to find a way to reproduce this issue. If this error comes up again with a model you are able to share, please let me know!
Which steps lead to a successfully converted and compressed model?
Another idea to try would be higher values (16?) of the
--quantizeColor
option.I’ve tried running a batch conversion over ~50 samples I had on hand, and couldn’t reproduce this error for any of them, so I think I may need to leave this open until someone can share a reproducible case. It may be that I’ve implemented something incorrectly here, but glTF-Pipeline also pre-processes the data a bit more, so I wonder if that is just smoothing out some edge case that the Draco encoder doesn’t like.