google / draco

Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.
https://google.github.io/draco/
Apache License 2.0
6.53k stars 966 forks source link

Preserver sub meshes #541

Closed lednhatkhanh closed 5 years ago

lednhatkhanh commented 5 years ago

I’m using draco to compress an .obj model and detect the sub-mesh name to apply different materials for them, draco only returns one big mesh, is there a way to accomplish this feature? Thank you.

n3c4 commented 5 years ago

Yes, you have to encode your model with --metadata flag (https://github.com/google/draco#metadata-api)

Also, I recommend to read these topics: https://github.com/google/draco/issues/364 https://github.com/google/draco/issues/401

lednhatkhanh commented 5 years ago

@n3c4 I tried converting to gltf extension and then use gltf-pipline to compress it with draco and still get all the sub meshes, thank you for your help.