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

Draco decoding bug in Sandbox for GLB files #11685

Closed
Aloalo opened this issue Dec 21, 2021 · 3 comments · Fixed by #11776
Closed

Draco decoding bug in Sandbox for GLB files #11685

Aloalo opened this issue Dec 21, 2021 · 3 comments · Fixed by #11776
Assignees
Labels
Milestone

Comments

@Aloalo
Copy link

Aloalo commented Dec 21, 2021

Four assets are attached:

  • no_draco_float_uvs.glb - No draco compression, float UVs
  • draco_float_uvs.glb - Draco compression, float UVs
  • no_draco_ushort_uvs.glb - No draco compression, normalized unisigned short UVs
  • draco_ushort_uvs.glb - Draco compression, normalized unisigned short UVs (problem asset)

While draco and the UV format vary, everything else in these assets is identical.
The asset which has draco applied to normalized unsigned short UVs doesn't render correctly in Sandbox, as if all UVs are (0, 0) (see screenshots). The problem asset renders correctly in three.js based viewers, Khronos' sample viewer and blender.

Screenshots

no_draco
draco

Desktop (please complete the following information):

  • Windows 10
  • Chrome 96.0.4664.110

Additional context

Files to repro with:
test.zip

@sebavan
Copy link
Member

sebavan commented Dec 21, 2021

Thanks for the repro !!! @Popov72 can you have a look ?

@sebavan sebavan added the glTF label Dec 21, 2021
@sebavan sebavan added this to the 5.0 milestone Dec 21, 2021
@Popov72
Copy link
Contributor

Popov72 commented Dec 23, 2021

What is the tool you are using for generating the draco compressed files?

After the uv attribute has been decoded, the normalized() method called on this attribute returns false, which does not seem right...

It works in other viewers probably because they are reading the normalized info from the uv accessor and are doing the appropriate normalization process if it is true. I don't know if it is what we are expected to do (I can't see any detail in the spec).

As an attribute.normalized() method exists on the Draco decompression side, I would have thought that for normalized attributes it should return true, enabling either the decompressor to normalize the values or let us know it should be normalized without having to read the accessors from the glTF file. This schema would seem to acknowledge the fact we should not need to use the accessors when decompressing a Draco compressed geometry and that everything should be self contained:
https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md

I could be wrong, thought, I'm no expert in the glTF field. @bghgary would probably know and I think he will have a look when he comes back from vacation.

@Popov72 Popov72 assigned bghgary and unassigned Popov72 Dec 24, 2021
@Aloalo
Copy link
Author

Aloalo commented Jan 10, 2022

I am using gltf-pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants