warrenm / GLTFKit2

A glTF 2.0 asset loader and exporter for Objective-C and Swift.
MIT License
150 stars 26 forks source link

Transferring pose or animation from one set of bones to another. #24

Closed opchronatron closed 1 year ago

opchronatron commented 1 year ago

Possible to copy the pose of one rig to another, assuming it is an identical copy?

warrenm commented 1 year ago

There is no built-in way to do this, but you could write a method that traverses the two node hierarchies and copies their transforms, and/or you could map the animation-target pairs provided by the asset to another node hierarchy. In my opinion, glTF's reliance on node indices rather than node names for animation targeting makes retargeting harder than necessary. So, although it is feasible in practice, making this use case easy is not a goal of this framework.