bevyengine / bevyengine/bevy

Animation Retargeting Woes

Open
#15,612 6 comments 0 reactions 0 assignees View on GitHub
A-Animation C-Feature D-Modest S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

Animation retargeting is useful for sharing animation clips among various models. Otherwise each model may hold duplicate animations, e.g. a walk cycle for every character in a game is pretty redundant and takes up extra space if it could be shared among all of them. In my case I am constructing the mesh and skeleton in code, so I cannot import the model with animations. Retargeting is the only way to get them animated.

## What solution would you like?
I'm having a couple problems trying to get animation retargeting working. Please see pictures for reference.

1) The animation clips appear to have position tracks even after I removed them all in blender. I believe this is the reason the baby model for example is stretched out to the same height as all the others. Or maybe it's just putting all the bones into the animation clip's rest pose rather than the scene model's rest pose before rotating them? I don't know. The joint gizmos look correct when not animated. It would be nice to be able to have a clip which only has rotation tracks and it would just work with all of my humanoid models. In Godot, there is also a property on their skeleton3d node for adjusting position tracks called motion_scale, which scales the position deltas to help with position track issues during retargeting.

2) Bone twist angles seem all wrong. I don't know how godot handles this but I know it was not an issue there. This may also be due to the difference in rest pose between the procedurally constructed skeleton and the animation file glb skeleton.

3) Since joints have to be assigned UUIDs to match up with the animation clip curves from the file, this limits your ability to share animations from multiple files unless all of them use the same skeleton with the same paths, and therefore the same UUIDs. I think we need an intermediary abstract, generic humanoid skeleton to remap imported clips onto, which we can then map our other models onto also. More control over the animation clip import process would be useful.

## What alternative(s) have you considered?

None

## Additional context

Unanimated: https://i.imghippo.com/files/LsTT21727931519.png
Animatied: https://i.imghippo.com/files/VZ09i1727931405.png

Working on bringing makehuman character creator into bevy

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or entry points are named. Start by reproducing the reported retargeting case from the attached context and trace how imported position and rotation tracks, rest poses, bone UUIDs, and skeleton mappings are handled; done should include a defined approach for reliable retargeting across compatible humanoid models.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.