Retargetting Character Animations

RealityKit’s lack of animation support is my biggest hurdle coming from a 3D modeling background. In contrast to most 3D engines, RealityKit does not support .usdz files with multiple animations. This becomes a headache to work with. I really hope this changes in future RealityKit updates.

The above was built following the method of loading individual .usdz files with animations, then extracting and storing those animations inside of an animation array and applying them to the selected skin when called on. To ensure all skeletal information followed the same naming conventions (as is requirement for RealityKit to apply animation data from one .usdz file to another) I wrote the following Python script and applied it to all character models inside of Blender.

import bpy

armature_name = "Armature"

// Adjusting the prefix of bones in the rig as Mixamo prefaces with different names per skin or animation
new_prefix = "rig:"

armature = bpy.data.objects[armature_name]

// Iterate through the bones and rename them
for bone in armature.data.bones:
    parts = bone.name.split(":")
    if len(parts) > 1:
        new_name = new_prefix + parts[-1]
        bone.name = new_name

bpy.ops.object.transforms_to_deltas(mode='SCALE')

I then experimented with animation sequencing, and found it difficult to adjust the order of my AnimationResource sequences. As a quality of life improvement, I explored how I could drag and drop the order of animations to dynamically order sequences with simple card hierarchies.

I built the above prototype because it was easier to prototype animation sequences than manually adjusting the order inside Xcode. I would love to expand this so you can order a sequence of animations, set delays and looping constraints, then bake the sequence out into one animation. Support for easier sequencing feels crucial to account for especially as generative text-to-skeleton animation models continue to improve. I would love to build an application that leverages text-to-skeleton animations, then create entire sequences by simply dragging and dropping the order of animation resources to your liking.