Animation Problem: Baking an Action creates a bad scaling animation

I have a character that will be animated and then imported into Unity. My method will involve using Rigify and a separate game rig which will copy the Rigify’s Pose. After animating I will only export the character model and the game Armature but not the Rigify rig. The problem is that whenever it bakes the animation it would badly scale the head. To summarize:

Character Model --skinned to–> game rig --copy transformed constrained to deform bones–> Rigify rig

I’ve experimented baking the actions manually (with visual keying of course) before exporting and is the exact same problem. The only way I could make the game rig get a proper baked animation is when I remove all parenting relations which is a problem because I need the parenting when I import it in Unity.

I experimented again but this time I bake the animation from the rig that has no Parent relations instead of the Rigify rig and it’s still the same problem.

bake problem
Here the Yellow armature has it’s head strangely stretching. The orange armature is how the baked animation should look like. The legs and arms are a bit off but it’s not that much of a problem.

Bake Action Question.zip (1.2 MB)

the bone called DEF-spine.006, which seems to be the head, change its scale through time, as you can see if you open the N panel, and all the other bones are its children (or grand children), I think it’s your problem, so you can delete all the scale datas in the Dope Sheet for example

1 Like

I’ve tried that multiple times but it still deforms badly. I just have feeling that this another one of Blender’s limitations particularly when baking actions from contsraints when a parent deforms the children. I’ve tried almost everything and no fix :frowning:

if you disable inherit scale of DEF-spine.006 it will fix the problem, I don’t know where this scale comes from though

edit: ok so you need to delete all the scale keyframes of the bones under DEF-spine.006 or, if you want to keep them, at least make sure that they won’t affect DEF-spine.006, or that they are at 1, and it fixes the problem

i’ve answered on Blender Stack Exchange as well

1 Like

Thanks for answering Blender Stack Exchange as well haha. I was getting desperate.

The best solution was to delete the scale keyframes of the neck up to the head (DEF-spine.004 - DEF-spine.006). Disabling inherit scale before baking and enabling later still distorts the head but in a different way. Disabling inherit scale when exported will be ignored as the problem will appear again after importing. I can’t say the same for the discrepancy on the limbs but I think it’s okay for now…

I guess this really is a limitation of Blender’s animation baking. It’s going to be annoying if I’ll have to keep checking this for every baked action. It might even get worse for the next animations… :expressionless:

It’s not a “limitation” per se, it’s just a problem of compatibility, you loose some features when you import into other softwares

But shouldn’t baking the action with visual keying within Blender be accurate by itself? It’s such a strange approach that you need to modify the parent inheritance to make it work ‘properly’ even within Blender.

I have to say that it’s a bit too technical for me, I don’t know enough about importing into Unity etc, if you have suggestions maybe suggest in the Right Click Select website

I kinda found some similar issues in developer.blender.org but it was a bit confusing on how accurate it is to my problem though it does mention a similar ‘solution’ of changing the scale inheritance of parents. Unfortunately I don’t think it’s gotten anywhere yet and has been dismissed for now as some kind of a limitation from my understanding.