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

certain files encoded with 1.3.6 cannot be decoded with 1.4.1 #704

Open
willemkokke opened this issue Apr 28, 2021 · 1 comment
Open

certain files encoded with 1.3.6 cannot be decoded with 1.4.1 #704

willemkokke opened this issue Apr 28, 2021 · 1 comment
Assignees

Comments

@willemkokke
Copy link

willemkokke commented Apr 28, 2021

I encountered this issue in draco files produced by a third party application (R3DS Wrap), however I've reproduced it exclusively using version 1.3.6 and 1.4.1 of the draco releases.

Basically, if I encode a OBJ file with 1.3.6 and use quantization parameters higher than 25, the resulting draco fails to be able to be decoded and fails with "Failed to decode the input file Failed to decode point attributes."

I have not observed any obj file dependent behaviour.

C:\Users\willem\Downloads\draco>draco_encoder1.3.6.exe -i test.obj -qp 30 -qn 30 -qt 30 -qg 30 -cl 7 -o test.drc

Encoder options:
  Compression level = 7
  Positions: Quantization = 30 bits
  Texture coordinates: Quantization = 30 bits
  Generic: Quantization = 30 bits

Encoded mesh saved to test.drc (14995 ms to encode).

Encoded size = 55393010 bytes

For better compression, increase the compression level up to '-cl 10' .

C:\Users\willem\Downloads\draco>draco_decoder1.3.6.exe -i test.drc
Decoded geometry saved to test.drc.ply (3592 ms to decode)

C:\Users\willem\Downloads\draco>draco_decoder1.4.1.exe -i test.drc
**Failed to decode the input file Failed to decode point attributes.**


C:\Users\willem\Downloads\draco>draco_encoder1.3.6.exe -i test.obj -qp 24 -qn 24 -qt 24 -qg 24 -cl 7 -o test.drc

Encoder options:
  Compression level = 7
  Positions: Quantization = 24 bits
  Texture coordinates: Quantization = 24 bits
  Generic: Quantization = 24 bits

Encoded mesh saved to test.drc (10717 ms to encode).

Encoded size = 28301225 bytes

For better compression, increase the compression level up to '-cl 10' .

C:\Users\willem\Downloads\draco>draco_decoder1.3.6.exe -i test.drc
Decoded geometry saved to test.drc.ply (3166 ms to decode)

C:\Users\willem\Downloads\draco>draco_decoder1.4.1.exe -i test.drc
Decoded geometry saved to test.drc.ply (3225 ms to decode)
@willemkokke
Copy link
Author

I've tried the same using the 1.4.1 encoder. I didn't expect the 1.3.6 decoder to be able to decode it if there had been a change in the bitstream format, but the 1.4.1 decoder also fails on it.

Reducing the quantization parameters to 24 allows both version of the decoders to read the file again.

(R3DS Wrap uses 30 as a default value for the position, texture and normal quantization parameters, so these files exist in the wild. R3DS Wrap can also read files that it produces with those default parameters, which 1.3.6 can but 1.4.1 can't)

C:\Users\willem\Downloads\draco>draco_encoder1.4.1.exe -i test.obj -qp 30 -qn 30 -qt 30 -qg 30 -cl 7 -o test.drc

Encoder options:
  Compression level = 7
  Positions: Quantization = 30 bits
  Texture coordinates: Quantization = 30 bits
  Generic: Quantization = 30 bits

Encoded mesh saved to test.drc (14619 ms to encode).

Encoded size = 55392106 bytes

For better compression, increase the compression level up to '-cl 10' .


C:\Users\willem\Downloads\draco>draco_decoder1.3.6.exe -i test.drc
Failed to decode the input file Failed to decode point attributes.

C:\Users\willem\Downloads\draco>draco_decoder1.4.1.exe -i test.drc
**Failed to decode the input file Failed to decode point attributes.**


C:\Users\willem\Downloads\draco>draco_encoder1.4.1.exe -i test.obj -qp 24 -qn 24 -qt 24 -qg 24 -cl 7 -o test.drc

Encoder options:
  Compression level = 7
  Positions: Quantization = 24 bits
  Texture coordinates: Quantization = 24 bits
  Generic: Quantization = 24 bits

Encoded mesh saved to test.drc (10706 ms to encode).

Encoded size = 28301225 bytes

For better compression, increase the compression level up to '-cl 10' .

C:\Users\willem\Downloads\draco>draco_decoder1.3.6.exe -i test.drc
Decoded geometry saved to test.drc.ply (3211 ms to decode)

C:\Users\willem\Downloads\draco>draco_decoder1.4.1.exe -i test.drc
Decoded geometry saved to test.drc.ply (3265 ms to decode)

daleglass added a commit to daleglass/vircadia that referenced this issue May 9, 2021
The previous version breaks on Fedora 34, and likely other distros
with recent compilers due to not including cstddef and limits headers.

This is already fixed upstream, but only in master. And looking at
google/draco#704 there may be compatibility issues with using the
latest code.

So for now we're upgrading from 1.3.3 to 1.3.6 and adding the fix.
daleglass added a commit to daleglass/vircadia that referenced this issue May 17, 2021
The previous version breaks on Fedora 34, and likely other distros
with recent compilers due to not including cstddef and limits headers.

This is already fixed upstream, but only in master. And looking at
google/draco#704 there may be compatibility issues with using the
latest code.

So for now we're upgrading from 1.3.3 to 1.3.6 and adding the fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants