I tried making a simple .variant_part_mesh parser based on just's research.
I only tried "type 1" vpms so far, as they're most numerous (about 90% of all).
File structure is now correctly decoded. just's decoding seems correct so far.
Todo:
- Make sure code to decode half-precision floats is correct
- Make it faster - it's ridiculously slow now (Ruby pretty-printing is the slowest part)
- Support for "type 0" and "type 2" subformats
- Converter back
- Convert each level-of-detail to .obj or some other convenient file format (at least for viewing for now)
Usage (for now):
jruby vpm_unpack some_file.variant_part_mesh
It will print decoded data structure on stdout.