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

gltfpack: keep obj hierarchy and name #595

Closed
kzhsw opened this issue Aug 21, 2023 · 3 comments · Fixed by #596
Closed

gltfpack: keep obj hierarchy and name #595

kzhsw opened this issue Aug 21, 2023 · 3 comments · Fixed by #596

Comments

@kzhsw
Copy link

kzhsw commented Aug 21, 2023

Motivation:
Currently gltfpack flattens and merges all obj meshes with the same material, so mesh hierarchy and name got lost even if -kn is passed.

Proposal:
With -kn argument, keep hierarchy and name from obj meshes, and do not merge it.
With -km argument, keep name from obj materials, and do not merge named obj materials.

Alternative:
obj2gltf keeps hierarchy and name by default.

@zeux
Copy link
Owner

zeux commented Aug 21, 2023

What do you mean by hierarchy? .obj files don't have transforms, only groups, from what I understand.

@kzhsw
Copy link
Author

kzhsw commented Aug 21, 2023

What do you mean by hierarchy? .obj files don't have transforms, only groups, from what I understand.

Node name and hierarchy, like this:
image

Edit: It seems I got confused in mesh and primitive, just keeping mesh names is ok.

@zeux
Copy link
Owner

zeux commented Aug 21, 2023

Right - I think the __root__ name here is synthesized either by obj2gltf or Babylon.js. The object and material names can be kept though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants