Closed BerndGe closed 6 years ago
Thanks for the crash report. Ideally Draco should not crash even for "invalid" input so we will fix that.
That being said for your case, the crash most likely happens because you are quantizing the generic attribute. If the attribute is as floating point (quantization disabled) then I believe it would work correctly, but your compression ratio may suffer (Draco currently doesn't have a good support for compressing floating point attributes without quantization).
You could probably achieve what you want by replacing your "invalid" entries by some reasonable value (e.g. 0) and adding a new uint8 attribute that would mark the invalid vertices (i.e. store 1 for invalid vertex and 0 otherwise) .
Thanks. Indeed that seems to work, but the compression ratio is not good.
Hi,
I am using C++ code as below for adding a custom attribute to a Draco file. To get started, I added the code below to PlyDecoder::DecodeVertexData (after the handling of normals) in order to be able to just add the new attribute to the PLY file and re-use the existing code for PLY decoding.
The debug output in this code prints the correct values. However, the results which are provided by DRACOLoader (for three.js) are not what I expect.
Is there anything wrong with the code below? Am I supposed to mark invalid values differently? Any other ideas?
Background: The existing implementation of PLY decoding ignores everything except for some standard attributes.
My example file contains a header
and then for each vertex e. g.
C++ code: