Is it possible to do animation retargeting in Godot 3.0?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By icqqq

Is it possible to do animation retargeting in Godot 3.0?

if yes, how to do it?

if no, is there any work around to achieve animation reuse?

Thanks!

:bust_in_silhouette: Reply From: MysteryGM

Animation re-targeting and procedural animations both use Inverse Kinematics, Don’t be afraid of the math involved, it isn’t as hard as people like to pretend it is.

IK for robots is much more complex than you need. you will just want to re-target one part.
Godot has IK for 3D: Inverse kinematics — Godot Engine (3.0) documentation in English

Look IK in games to see the idea behind it. Interesting fact, IK is also how game characters climb stairs without the feet clipping the ground.

Sorry, I am lost
Can you explain more?

icqqq | 2018-10-04 03:33

What IK does is calculate how things should act when linked. So if a hand moves to press a button, how should the arm move.

Now any two characters that are the same height,size and bone count can already share animations, Just copy and paste animations in your 3D editor.
Re-targeting is needed for the objects that don’t share these 3 properties.

The way animation re-targeting works is the difference from one characters stance and the second stance is calculated.
This is simple: Rig2Foot.position - Rig1FootPosition = offset between feet.

With this info you can use IK, to generate the new animation. This video shows the results:
https://www.youtube.com/watch?v=F0FVCrSXA1U
https://youtu.be/4DyO_VS_3Gk
This video teaches the first steps for 2D:
https://www.youtube.com/watch?v=hbgDqyy8bIw
For 3D it is already in Godot you just need to figure out how to use it.

MysteryGM | 2018-10-04 05:04

Thank you so much!!

icqqq | 2018-10-05 09:36