0
$\begingroup$

My situation: I am attempting to share animations between different glb models that all share the same skeleton, in Three.JS. (These are all ReadyPlayerMe avatars.) I have working NLA animations on them already, and I can play the anims just fine if I export them on the model. However, because it is theoretically possible to use a Three.js AnimationMixer to play an animation on a different root object3D, it would be far more efficient for me to include a single model with all of my source animations on it, and then have my user avatars simply borrow these anims from the source models, instead of duplicating the animations for every user avatar.

I think I am very close, but the behavior I am currently seeing is that when I point the mixer at my target object, the entire avatar stays in its rest pose, but the feet jump up to the hip node position and the whole body rotates in what appears to be the hip node's rotations from the anim.

Further digging revealed, when I printed out the actual animation data, that the channels within my NLA tracks were named, not with the node names as I expected (like "Hips.position", etc) but instead were given UUIDs, so "8b5ad212-155f-4cb4-b09f-592a88a40245.position".

Furthermore, I can see by printing animation data from different models, that these UUIDs are different on each model. This would neatly explain why my animation sharing does not work, because my whole premise was based on the skeletons having all the same node names.

So... is there any way to tell the GLTF exporter to save the actual node names instead of UUIDs, when exporting anims? Or am I completely confused and this is not even my problem?

EDIT: Thanks for the response, Don!!!

RE: Three not being able to find the node names, I am confused as to where this "node" is actually stored in the glb file, it seems that the names it is looking for may all be compressed into a binary buffer that doesn't even make sense in a hex editor.

What I can say for sure is:

  1. in Blender, the nodes in my armature all have names, and the NLA strips show up as referring to those names in the Dope Sheet enter image description here

  2. When I open my glb file in hexedit, I can see plain English node names in the description of the skeleton enter image description here

Further Edits: after digging farther through the glb file, I can see no sign of anything out of place: I have a 74 member nodes array, all of which seem to have reasonable names, and in my animations array, I can see channels and samplers that seem to point at nodes by index from that list. Not sure where in all this there could be missing or incorrect node names. Very perplexing.

$\endgroup$

1 Answer 1

0
$\begingroup$

glTF files exported from Blender do not contain UUIDs — they're generated in three.js to target animations, if the targeted node does not have a name. If you can ensure that each animated joint node has a unique name before exporting from Blender to glTF, there shouldn't be any UUIDs in your THREE.KeyframeTrack objects. It may be necessary to open the .gltf file in a text editor to check that.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .