ozz-animation icon indicating copy to clipboard operation
ozz-animation copied to clipboard

Pose-based animation interpolation in realtime

Open VinnyVicious opened this issue 7 years ago • 6 comments

I'm not sure on the details of this, but the technique is well explained and demonstrated by Wolfire's David Rosen at:

http://www.gdcvault.com/play/1020583/Animation-Bootcamp-An-Indie-Approach

VinnyVicious avatar Mar 02 '17 00:03 VinnyVicious

Very impressive results with 13 key frames only!

As I understand it, pose-based animation could fit in a sample:

  • Each pose (key frames for the whole skeleton) could be stored as an array of SOA transforms in local space (just like the usual SamplingJob output).
  • ozz-animation pipeline can be used to generate these poses/key frames. fbx2anim could be used to import an animation with the few keys we're interested in. This animation should be sampled at specific times (without any interpolation) to get the few interesting poses back (in the SOA transform array).
  • Blending would then be done between these poses using David Rosen interpolation techniques (cubic, spring/damper...).
  • Ozz LocalToModelJob would finally be used to compute model space transforms in the end, as usual.

Don't hesitate to tell if you see it another way. If someone is interested into trying that and implement a sample, please do!

I also noticed some interesting features to dig in:

  • Foot IK / 2 bone IK
  • Head/torso/eye look at
  • Secondary physics

Cheers, Guillaume

guillaumeblanc avatar Mar 07 '17 19:03 guillaumeblanc

I'll definitely try to come up with something. I'm still getting used to the library and how it works, so it's a bit difficult for me. Thanks for the info, very useful!

By the way: what do you mean by secondary physics?

VinnyVicious avatar Mar 23 '17 23:03 VinnyVicious

Secondary physics: joints that are animated by a dynamic simulation, reacting to primary animation and character movement.

Anything new on your side?

guillaumeblanc avatar Jul 08 '17 10:07 guillaumeblanc

I realized that i was wasting too much time trying to get this system in place for my game. As an indie, time is precious and i've noticed that doing the animations in Blender was faster. So, unfortunately, no news.

VinnyVicious avatar Aug 11 '17 00:08 VinnyVicious

Does this feel difficult to achieve? I thought it was a case of interpolating between the poses?

grimdeathr avatar Jan 03 '22 09:01 grimdeathr

As @guillaumeblanc described, you would have to use a library to implement all of the interpolation techniques (Maybe https://github.com/mobius3/tweeny ?) and just use ozz-animation as a driver.

VinnyVicious avatar Jan 10 '22 17:01 VinnyVicious