KineFX Skeleton Swap Sneak Preview

   1393   2   3
User Avatar
Member
253 posts
Joined: 7月 2013
Offline
I thought I throw in a sneak preview of one of the tools in KPAT, the free and open "KineFX Procedural Animation Toolkit" that is nearing release.

The Skeleton Swap tool was created to simplify the whole retargeting process when having mocap data that needs to go onto a character with a wildly different skeleton. Retargeting can be quite unstable/glitchy in this case which gave us quite a headache.

So plan B... Just rip out the original character's skeleton and replace it with the actual mocap skeleton, only adjusting for distance between joints. This makes retargeting mathematically much easier, and thus way more stable, since the skeletal hierarchy is identical, the only thing it needs to compensate for is the difference in 'bone' lengths.

Easy concept, which took quite some R&D time but ended up as a quite elegant solution. When using the output character I got near perfect automated retargeting for a lot of mocap data.

Workflow:
1) Map the joints so the HDA know what goes where between the skeletons
2) Tick the 'Enable processing' checkbox
3) Done.

What happens internally is that first some bones from the original skeleton, those that aren't mapped to bones in the new skeleton, are removed and their capture-weights transferred to their closest parent bone that is mapped. Then using more math, vex and python then I'd care to explain to get all the new skeleton's transforms and orientations correct so it has the pose of the old skeleton (to match the incoming geometry) but also using the transforms/orientation setup from the new skeleton.

The capture/deformation is mathematically identical to the original skeleton where possible. The only situation where some guess work is done is when a joint from the new skeleton has not been mapped to an old joint. In this case the weights for the new joints are filled in by using some biharmonics. And since these are not mapped they usually are unimportant joints anyway and only affect small patches. There is a toggle to enable/disable this and see it's influence.

anyways.. here are some pictures:

from L-to-R: Xsens mocap skeleton(blue), Original Character Skeleton(green), new skeleton in old rest pose, original geo, new rest pose, geometry in new restpose.


Same debug output but for another character

(DAZ character) Original, swapped, swapped posed

barebones setup usage:
Edited by Jonathan de Blok - 2023年6月14日 06:51:14

Attachments:
kpat_skelswap_1a.jpg (239.8 KB)
kpat_skelswap_1b.jpg (196.6 KB)
kpat_skelswap_2.jpg (179.7 KB)
kpat_skelswap_3.jpg (16.9 KB)

More code, less clicks.
User Avatar
Member
647 posts
Joined: 8月 2013
Online
Hi. Wow. this looks very promising!

Best
User Avatar
Member
66 posts
Joined: 4月 2019
Offline
This looks brilliant! Can't wait to try it out.
  • Quick Links