DracoUnity
DracoUnity copied to clipboard
Submeshes
Hi, are submeshes / subobjects supported? I can't find anything in the code or doc. I think sub objects are encoded using the sub_obj attribute, but the unity plugin seems to be merging everything into 1 mesh. Is there a way to access the raw decoded data or would I have to fork your repo and customise the decoding myself?
In the past I had modified the draco_unity_plugin.cc file to get the sub_obj attribute like this:
const GeometryMetadata *pc_metadata = in_mesh->GetMetadata();
const AttributeMetadata *sub_obj_metadata = pc_metadata->GetAttributeMetadataByStringEntry("name", "sub_obj");
const PointAttribute *generic_att = in_mesh->GetAttributeByUniqueId(sub_obj_metadata->att_unique_id());
Is there anyway you could extend the plugin to support this attribute?
Thanks
Hi @NumaNumaNuma,
Sorry for the late reply. I haven't found time to look into submeshes, mostly because I couldn't find sample glTF files using them and I had no clue how it works in general. Your example code is a first hint, so thanks.
What does sub_obj_metadata
/generic_att
contain? Is it some sort of indices ranges?
Thanks