Animation Retargeting

Hi,

I’m wondering if someone could point me in the right direction for doing performant animation retargeting.

I have a lot of characters that are using the same animation but they all need animations specific to their mixamo rigs.

I assumed I could just write a script that rotates the bones appropriately but that seems to require me to have a character being animated in background to reference at all times.

Is there an efficient and performant way to do animation retargeting so that I can reuse the same animations on multiple models.

Thanks for your time.

I’m afraid retargeting is not supported in PlayCanvas. You either have to the workaround you mentioned or configure your model rigs so that they share the same core rig that is being animated.

A couple things to try:

  • Write a script that converts your source model animation Skeleton and your target model Skeleton into ossos Armature and Pose, and use its Retarget feature to retarget, then conver the ossos hierarchy back to PlayCanvas. ossos is an experimental retargeting and IK retargeting library.
  • Write a script that converts your PlayCanvas Skeletons into a Three.js Skeletons, then try use SkeletonUtils.retarget to try retargeting, and finally convert the result back to PlayCanvas.

I’m currently working on reviving Three’s SkeletonUtils.retarget/retargetClip functions. They seem to have been designed with assumptions around the BVH format specifically, so I want to see about making them more generic, especially for use with GLTF files. Once this is done, the above will be easier.

2 Likes