I think there's an issue in NLA Editor...

Hi guys, I’m new here but I have been practising with Blender for some months, so I guess I’m ready to ask some questions :smiley: .

Well I came across with an issue related to the NLA Editor, I guess it could be interesting posting here about it (although people didn’t pay attention to me in other forums :frowning: ). Well I’ll get to the point.

I was doing a walkcycle animation for a character. To do that, I created an Action and inserted some keys for a few bones in the leg (two “IKFoot”, two “Toes” and “IKHips”). When done, I noticed that the legs twisted weirdly in the middle of the animation, and to solve that I needed to rotate a bit the upper leg bones. Eventually I got a nice movement and it was played correctly in the NLA Editor.

Then, I decided to turn the Action into a strip (C key). When I played the new strip, I noticed that the legs were twisting weirdly again, as if there were no applied rotation on the upper legs!! In fact, I went back to the Action window and noticed that the rotation was cleared of the action itself.

Later, I found how to solve that: I had to include a key for the two rotated upper leg bones. One single key was enough to fix the problem (I put it at the first frame of the animation), and the strip created from this action worked correctly. Another solution was to bake the action, because it takes all the bones into account.

Well, that’s it. I think it’s not very nice that a well configured action turns into a bad strip, or is it? Couldn’t be considered that as a bug? What do you think?

For those unexplainable “legs twisted weirdly in the middle of the animation” moments just select all bones in Edit mode and Ctrl-N.

I can’t say why the rotation was cleared since you don’t say whether it was only the keyframe or thewhole IPO.

%<

Hi Fligh, thanks for answering.

But no. The bones were originally perfectly well aligned (I applied CTRL+N at the very beginning, and checked the orientation before inserting keys). The problem was that, if you watch my armature in front view, the legs weren’t fully vertical but somewhat diagonal. Then, when the foot went up, the knees went crazily to the sides instead of stay on their “natural” position. I had to force a rotation in both upper leg bones to get the things right.

I say it again: there’s a problem in the NLA Editor.

Maybe I should post a .blender file for you to see…

Again, thanks for answering.

I say it again: there’s a problem in the NLA Editor.

Uno de los monstruos que hay? Post the file or send it to me @ ([email protected])

%<

Thanks man. I’ll try to get ready the file and send it to you or put it somewhere. Please be patient… 8)

BTW, my signature is Spanish for “my mommy always said there were no monsters, no real ones, but they are…” Rings a bell, doesn’t it?

Here I am.

Here’s my blend file (I’m also sending it to you):

http://rapidshare.de/files/9021359/example.blend.html

How to use :stuck_out_tongue: :

OK. When you load the file you can see my armature and mesh on the left, and the NLA window on the right with the action “walkcycle”, which goes from frame 1 to frame 41.

You can switch to the Action Editor Window and see which bones I’ve added keys for in this action:
pairs of IKPie, IKCadera, Deditos (= IKFoot, IKHips, Toes)

If you want, select the armature, select all the bones in Edit Mode and hit CTRL+N to ensure a good calculation of the bone rolls.

Check the animation from side and front views to see it’s moving correctly.

Go to Pose Mode, select each upper leg bone (“femur.L” and “femur.R”) and check (N) the rotation I had to add on both of them: QuatX, QuatY, QuatZ and QuatW.

Well, let’s see what happens if we clear these rotations from the bones. In Pose Mode, select both upper leg bones, hit ALT+R (Clear Rotation) and check (N) the rotation has cleared on the bones. Check the animation again and you’ll see the weird results.

Reload the file to get back to the right thing and check everything’s OK.

Let’s go for the “NLA Editor issue”:

Go to the NLA window and turn the “walkcycle” action into a strip ©. Now, check the animation again! Here it is!

And that’s not all: Select the strip and delete it from the NLA Editor. Then go to the Action Editor Window. Load the walkcycle action again by selecting it in the combo list. Check the animation from here or from the NLA window. My poor action’s been “corrupted”!!!

In the 3D window, go to pose mode, select each of the upper leg bones and check that the rotation is gone!!

So, there’s definitely a bad gremling lurking here!!

Hope I wrote that in good English :slight_smile: !!!

No, there is nothing wrong with your file or Blender.

In each leg there are basically (for this explanation) only two bones that have (IPO) Actions; IKCadera and IKPie. None of the bones in between those two have any IPO’s (or anything else) that record their movement, and it doesn’t matter whether it’s an action or an NLA strip. They can only do what bones in an IK Chain do when the two constraint bones move towards one another or away from one another.

Setting Roll Angles should solve this problem, but if you read AndyD’s questions about it, they don’t (and that’s why they added DoF, degrees of freedom, in 2.4). I have never used any other animation soft but from my reading I’ve gathered that this is not only a Blender problem as both Max and Maya have “Pole Vectors” to overcome it.

The simple solution is to add an unconnected bone in front of and slightly above the knee and put a TrackTo constraint on the BO:Femur with that new bone as the Target. That way, when you lift the IKPie the Femur will bend only towards the Target bone.

%<

I haven’t tested it completely as per your instructions but it looks like you haven’t completed the setup. In 2.37 it was common to add a knee control bone which prevented the knee joint bending backwards.

You have nothing to prevent the knee bending. Adding the small rotation gives the knee a direction and it then bends more easily in the right direction.

In 2.4 you can just select the calf bones (tibia) and apply an Limit X on them in pose mode > armature bones > Limit X. Set approximatly 0 and 140 degrees and watch the result.

I didn’t check all the NLA stuff because this seemed to work.

I guess there’s more than one way to skin a cat :slight_smile: . I never thought or heard about adding those bones for controlling knee directions. I just followed the setup in Blender’s docs and some others tutorials which didn’t use them. As I said, my own solution was just adding a single key for both upper leg bones with that additional rotation, and that worked OK.

What really surprised me was the fact that the animation of the local action was OK but when turning it to a strip, its behaviour was different. I guess my error was not seeing the difference between a local action and a strip :expressionless: : I guess a strip just takes into account bones explicitly included, while a local action takes into account also “external” transforms, like the orientation I added directly on the upper leg bones. Well, that’s the way I’m able to understand that.

BTW, I haven’t tried v2.4 yet.

Thanks a lot for your time, guys.