google / draco

Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
https://google.github.io/draco/
Apache License 2.0
6.54k stars 968 forks source link

Problems with normals in Linux decoder #736

Open NicolasCharmel opened 3 years ago

NicolasCharmel commented 3 years ago

Hello, First of all, thanks for the great job around gltf.

Draco appears to be inevitable to crosswork APIs.

But it seems that libdracodec_unity.so doesn't work properly.

The normals after decoding are not in the expected direction. Here is a visual comparison : this is a mesh with no compression at exporting from blender on linux mint. no-comp

everything is ok.

and this is the same with compression at export, and decoded by libdracodec_unity.so : comp+decomp

Here, there are artefacts as if the normal shader was not correctly set.

We tried exporting with normal compression at 0 instead of 10, and then, the result was better, but the file's weight was not reduced enough, and most of all, it still remained some little errors on the faces.

We also tried the same mesh with the same compression parameters and exported again from blender on the same linux system, but this time decoded on a windows system and it appeared to be clean, as if it had not be compressed-decompressed. Our conclusion is that there is no problem with the compression step, but only with the decompression, and only on linux systems.

And of course, we tried the same comparison tests with several meshes.

Could be the libdracodec_unity.so bugged ? I have to precise that I did the test with the last release found her in github.

Is there a hope that the file could be tested and fixed ?

Thanks a lot again.

Nicolas

NicolasCharmel commented 3 years ago

Hello,

Sorry to be back again in charge, Did someone find the time to read the issue I mentioned in first post, we would really need to have this compression algorithm to work properly in Unity on Linux system.

I understand it might be long and painful to try and find this sort of issue, I wanted just to know if I could hope it would be done, or if nobody never encountered this or anything related.

Best regards, and sorry for weird syntax. Nicolas

PsycoTodd commented 2 years ago

Follow up with this issue. Seems I also get decompression error on normals in linux.

caoandong commented 2 years ago

I have encountered the same problem using Draco 1.4.3 compiled on Debian. You can try and compile the latest version 1.5.2, that fixed it for me.

tomfinegan commented 2 years ago

@NicolasCharmel Does this still reproduce when using the v1.5.2 release?

NicolasCharmel commented 2 years ago

I don't know, I can't find the libdracodec_unity_linux in your repository. There are only android, win an iOS.