"Canonical" ordering of vertices / indices?
- Dominant language
- C++
- Stars
- 7.5k
- Forks
- 1.1k
- Avg merge
- 47m
- Merged PRs (30d)
- 1
Description
I am representing Prusa Research at 3MF consortium. I hope @ondys will enjoy the following discussion because of spending years on 3D printing research :-) Also greeting to a Czech Technical University alumni college.
The 3MF consortium
https://3mf.io/
https://github.com/3mfconsortium
is responsible for standardizing file format 3MF as a container for various 3D printing tasks. Currently meshes are stored into a 3MF file as indexed triangle sets, XML encoded.
3MF consortium members are investigating various forms of encoding and compression. Draco is a candidate due to its maturity and high compression rates. However high compression rates are only achieved with quantization and edge breaker encoding enabled.
To make Draco useful for CAD world, one has to be able to save / load a mesh in exactly the same form. To most customers it is acceptable to perform quantization and reordering of geometry when importing into the 3MF format. After such adjustment, the mesh should better persist in that quantized and reordered state for various reasons. One reason is sensitivity of computational geometry algorithms to slight mesh geometry and topology modifications, another reason is the option to reference mesh vertices / indices from other parts of a 3MF file.
Is it guaranteed that a mesh once compressed by Draco for the first time produces binary equal decompressed mesh after multiple round trips of decompression and compression? I propose to name the quantized mesh with vertices and indices reordered by the edge breaker a "canonical" form. Does Draco support such concept?
If Draco supports a "canonical" form, would it be possible to add an API to perform transformation into the "canonical" (that means quantization and reordering) without having to do the compression and decompression round trip? Would it be possible for the "cannonization" tool to return a map of vertex / index reordering and merging?
I have an impression from reading the issue tracker, that a "canonical" form could be a solution to many issues, for example:
https://github.com/google/draco/issues/720
https://github.com/google/draco/issues/584
Thanks,
Vojtech Bubnik
Prusa Research
Contributor guide
Assessment
This issue has not been assessed yet.