google / google/draco

Texture coordinate value is severely distorted after compression

Open
#918 3 comments 0 reactions 1 assignee Claimed by @igorvytyaz View on GitHub
bug
Dominant language
C++
Stars
7.5k
Forks
1.1k
Avg merge
47m
Merged PRs (30d)
1

Description

Hello,

I am trying to compress a GLTF file using my program with draco lib v1.5.3.

After compression, the texture coordinate value becomes the same coordinate value.
![企业微信截图_16589175841723](https://user-images.githubusercontent.com/36740211/182998131-579c1f8b-5f71-415d-8822-9fa122ff5d67.png)

That's different with my source data. And it causes that the rendering result was completely black.
![image](https://user-images.githubusercontent.com/36740211/182999910-1148edf3-ade7-42b5-89d2-3dd9e38f208d.png)

And before compression, the texture can be loaded properly like this:
![企业微信截图_16596717441959](https://user-images.githubusercontent.com/36740211/183000134-8e6a4648-4c66-4f1f-b07a-0d6b6394ff6d.png)

The conversion parameters I used:
position quantization: 16
tex_coord quantization: 10
normal quantization: 8
SpeedOption 3, 3
MESH_SEQUENTIAL_ENCODING

I use TriangleSoupMeshBuilder to build mesh, and SetAttributeValuesForFace interface to add texCoord to the mesh.

I've tested a lot of models this way and they're all fine except for this one.

Here is glTF model before compression I just mentioned.
[beforeCompression.zip](https://github.com/google/draco/files/9265240/beforeCompression.zip)

Here is glTF model after compression by my program.
[AfterCompression.zip](https://github.com/google/draco/files/9265243/AfterCompression.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.