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

gltf node.name are not unique #50

Open
lukts30 opened this issue Aug 16, 2021 · 4 comments
Open

gltf node.name are not unique #50

lukts30 opened this issue Aug 16, 2021 · 4 comments

Comments

@lukts30
Copy link
Owner

lukts30 commented Aug 16, 2021

The code currently assumes that node names are unique which causes bugs with a gltf created by blender.
This problematic gltf has an animation channel that targets a node that is not even part of the mesh skin or otherwise part of the scene (glTF Validator: NODE_EMPTY) and thus could not even be animated. Problem is that there is a second node that has the same name and that node is part of the mesh skin.
But since only the name is the same between these two nodes but not their TRS properties resolving to the wrong node breaks the animation.

node.name
The user-defined name of this object. This is not necessarily unique, e.g., an accessor and a buffer could have the same name, or two accessors could even have the same name.
- Type: string
- Required: No
https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#nodename

@lukts30
Copy link
Owner Author

lukts30 commented Oct 12, 2021

Problematic cases are now fixed since it is now possible to not relay on gltf node names. (02013c3)

-u, --gltf-unstable-index use glTF node index instead of name for rdm bone

@jakobharder
Copy link

I avoided the issue for now by renaming the relevant nodes with a prefix.
That workaround is ok, as I need to remove other animations like you suggest on the main readme anyway.

Here's how I use it for multiple animations:
https://github.com/anno-mods/vscode-anno-modding-tools/blob/main/doc/working-with-models.md#how-it-works

@lukts30
Copy link
Owner Author

lukts30 commented Oct 18, 2021

[...] I need to remove other animations like you suggest on the main readme anyway.

Actually, that should not be necessary anymore (the repo README.MD is outdated since it has not been updated in almost a year).
Creating multiple anim rdms from one gltf should work fine since cd41c18.

There might be bugs with it but the expected behavior is that every gltf.animation entry in the gltf creates one "anim_{i}.rdm" file.

@jakobharder
Copy link

I haven't tried as the name collision stopped me there.
My animations are idle/working animations pointing to the same bone names. Not sure if that's the best way to handle them though.

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

No branches or pull requests

2 participants