How can I "Apply" bone roll?

Hello!

Suppose I’ve spent hours animating something and I suddenly realize that, this whole time, the amature’s bones were rolled by 180 degrees. I select all the bones in edit mode, reset the bone roll under Armature > Bone Roll > Clear Roll, and…

…my animations no longer function properly. This is because the animations call for a bone roll of 180 degrees.

I need the bone roll to be reset so that I can append an animation from another project, and this model will eventually be used in a game engine.

In theory, I thought, I should be able to go to the graph editor, type “Y Quaternion” in the search bar, select all the points on the graph, and scale them by -1 on the Y axis so that the bone roll in the action is flipped (by 180) to correspond with the bones in my armature.

I’ve also attempted to recalculate my bone roll under Armature > Bone Roll > Recalculate Bone Roll, but this affects only the armature, and has no affect on the action at all. The action still wants the bones to be rolled 180 degrees backwards, no matter what.

I’ve spent all day searching (those are three different links btw) for a solution as this is a pretty important (and overdue) project, but I can’t seem to find a solution anywhere.

Here are the project files.

This armature has three actions: “Walk”, “Run”, and “Idle”.

“Walk” and “Run” were created when the bones were improperly rolled, and “Idle” is an action appended from another .blend file in which the bones were properly rolled. I’ve already reset the bone roll, so only the “Idle” animation is functional.

Thank you so much!

hi
Bone-roll in editmode and turn on symmetry
180degrees on arm and leg seems to fit

Correct, but this doesn’t affect the animation which is designed for a specific bone rotation. I’m looking for a way to “apply” bone rotation so that Blender says, “This is zero” and plays the existing animation normally.

Changing a bone rotation on an existing animation, unfortunately, requires changing every single key frame of the existing animation. You might be able to get away with selecting the appropriate channel and moving all those keyframes at once- g > y 180, but since you’re using quaternions, I doubt that will have the intended result

I’m sorry, I think you’re in for some re-animation. Either that or you can bake to a corrected copy. This will “bake” down the animation in the sense that there will be a keyframe on each frame, rendering further tweaking difficult unless the curves are cleaned afterwards, but that would have to be done by hand to be predictable. Depends if you need absolute fidelity over the animation you’ve done so far, or if you don’t mind a little re-work. Would you like to try ?

1 Like

Couple of thoughts…

After fixing the bone roll, you could change all the curves in the Graph editor to correct the animations. This would be very tedious and a lot of work. To change the curves in the Graph editor you’d have to do it one curve at a time. Something like this: set the pivot point to be the 2d cursor. Position the 2d cursor at the first keyframe, (n-panel in Graph editor → view tab to allow numeric input), then select all keyframes for the curve and scale -1 in the Y. Repeat for each curve. 1 bone/4 axis rotation means you’d manually have to adjust 4 curves for that one bone. Same goes for location and scaling keyframes. Tons of work…

A better/easier workaround would be to duplicate the original armature with the wrong bone roll. On the new armature (if there is an action linked to it, remove it) correct the bone roll. Once corrected on the new armature, add a copy transforms constraint to every controller bone targeting the original armature & bone. Now the new rig should follow the action on the original rig. Once that is working, create a new action and keyframe the bones on the new rig as needed. You will have to insert Visual Loc, Rot, Scale keyframes on the new rig because the new rig bones aren’t actually moving, but they are constrained. Visual keyframes will insert keyframes for constrained bones.

I once had a tool that would do some of this work for you, but it’s for blender 2.76 and I haven’t updated it to work with current versions… Sorry to say it would be some time before I had it fixed…

One quick question, how did I get linked into this thread?

Randy

Edit: forgot to ask, what is the end result here? Is this a game character, or just an animation?

Yeahh just now catching up with this thread and i ended up just reanimating everything.

1 Like

Sorry to hear that, my tool could have saved you from doing that work.

Sending you a pm…

Randy