Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submeshes #30

Open
NumaNumaNuma opened this issue Aug 14, 2021 · 1 comment
Open

Submeshes #30

NumaNumaNuma opened this issue Aug 14, 2021 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@NumaNumaNuma
Copy link

NumaNumaNuma commented Aug 14, 2021

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

@atteneder
Copy link
Owner

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

@atteneder atteneder added the enhancement New feature or request label Nov 10, 2021
atteneder added a commit to Unity-Technologies/DracoUnity that referenced this issue Sep 9, 2024
@atteneder atteneder moved this from To do to Planned in glTFast development Dec 18, 2024
@atteneder atteneder added this to the 5.2.0 milestone Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Planned
Development

No branches or pull requests

2 participants