Encoding merges vertices and breaks blendshapes in the process
- Dominant language
- C++
- Stars
- 7.5k
- Forks
- 1.1k
- Avg merge
- 47m
- Merged PRs (30d)
- 1
Description
It seems that in some cases, Draco encoding does not respect any blendshapes that a mesh may have and that may move vertices away from each other - they're merged nonetheless and thus break the resulting file.
This attached file, which uses animated blendshapes:
[SimpleBlendshapeAnimation.zip](https://github.com/google/draco/files/9666589/SimpleBlendshapeAnimation.zip)
breaks when run through `gltf-transform draco` or `gltf-pack`, both using this draco project for the job.
`gltf-transform draco`, for example, reports the following error:
```error: Compression reduced vertex count unexpectedly, corrupting morph targets. Applying the "weld" function before compression may resolve the issue.```
My understanding is that in this model, compression should _never_ reduce vertex count as the blendshape animation moves them around.
More information including more logs and testing with gltf-pack and gltf-transform trying to get to the root of this issue here:
- https://github.com/donmccurdy/glTF-Transform/issues/618
There's also another sample model in the above issue that exhibits a similar (the same?) problem.
I'm happy to support more to get to the bottom of this issue. We'd love to be able to pipe "everything" through draco, but currently need to manually verify that no errors have occurred or (in some cases) wrong merges have happened without errors that break files.
Contributor guide
Assessment
This issue has not been assessed yet.