glTF icon indicating copy to clipboard operation
glTF copied to clipboard

clarification: moving bones

Open LumiereDeLOmbre opened this issue 3 years ago • 1 comments

Hello,

Context: I have an animated model. I need to modify the position of a bone of this model. Too lazy to recreate the whole animation in the 3d program because more models reuse that animation. And I want to code a way to batch that.

The need: I know that a bone needs to be translated +1 on the global up axis. I want to modify its current position while not altering the rest.

The question: What field(s) should I modify to achieve that? I am not sure about the inverseBindMatrix.

Thanks!

LumiereDeLOmbre avatar May 14 '22 08:05 LumiereDeLOmbre

Maybe that could be of help: https://github.com/donmccurdy/glTF-Transform/blob/5c35405d28e5e7638ef55e502aa12347a3ce6427/packages/core/src/properties/node.ts#L129-L146 Maybe I need to convert the current bone to its world position, then modify it, and reapply the code in reverse to rebind it?

Is it the way to do it?

ghost avatar May 14 '22 08:05 ghost