Ragdoll transition and IK + animation

Hi, all!
@lubos what would be your idea of to-ragdoll and from-ragdoll transition in script?
i.e. character falls or thrown in air (even player character), so it plays animation, does ragdoll transition,
behaves like ragdoll for some time, then from-ragdoll transition + using best-match animation recovers.
How this is to be implemented in Armory? In other engines I do the following:

  1. Play layered animation in preparation for ragdoll (some kind of reaction which is procedurally created from animation chunks which suits best for what happened).
  2. As animation complete or when I want I create RigidBody on each bone I’m interested in and add constraints between them. The ragdoll/constraint set up is done in code but copies some visual set up. (I think for Armory it could be done by setting up 2 objects/scenes with ragdolled and non-ragdolled character for transition, but transition itself requires some heavy coding to be seamless).
  3. The behavior of ragdoll, i.e. doing whatever ragdoll does. This one is quite clear.
  4. Disabling all RigidBodies and removing them converting to that of pre-ragdoll state, but having all bone poses like they were last left by ragdoll.
  5. Looking up a set of animations which best match current bone pose. As we found one we blend to it (cold add some code to do some checks and hacks so to reduce bad effects if there are some, like feet sliding or other visible things).
  6. Ragdoll state finishes we’re going back to our business.

So to implement this scene some blank spots are needed to be filled.

  1. Manual transition to ragdoll requires reading of exisiting ragdoll setup and recreating that on current mesh. This looks doable, but I really can’t understand where to start. The main problem is getting current animation state. Would be nice to have some example of attaching RigidBody to a bone script. This might also become useful for some effects too (cheap hair/cloth physics, etc.). For me the main problem is not knowing data organisation for all things I need there, need more examples for that…
  2. The transition back needs access to animation data for matching (first few frames access is enough),
    is there any information on how to access that from script?

I think such thing is local enough to be implemented as node, I wonder how usable that would be…

Sure those features are necessary for any character based game, they will come to Armory 3D, but you’ll have to be patient.

There is also new ways to make animations like motion matching, perhaps Armory should look in those new ways to deal with animations.

Well, just waiting until single person implements everything is not right, I want to research the field and maybe contribute in case of success.

What do you mean by motion matching, any links?

1 Like

https://youtu.be/KSTn3ePDt50 For honor and last of us 2 use this technology

Thanks! Looks interesting!

Maybe with mixamo animation library we can create something similar.
Hey ue4 create this https://forums.unrealengine.com/community/work-in-progress/1433158-motion-matching-for-ue4 there is also code

Well, mixamo is not free in way they can’t be used with open source projects.

Anyway, animation matching is heavily dependent on quality mocap source,
which is not quite available to indie developers. So goog old layered
animation is way to go still.

I think this more traditional technique have more chances of
adoption by indies/freeloaders here…