Restricting the first bone in an ika chain
I’m trying to get the leg to move and rotate on one axis- I can’t seem to get it to do that though! it wants to move all over! I’m curious how I’d go about that…

the little bone at the top doesn’t do anything… that’s what I was trying to restrict the main bone’s axis’ to… crap, the lower leg bone also moves out of place…
I need help to restrict the upper & lower leg- how would I do that? so that it would rotate only on the x or z or whatever axis with an ika system?

The link doesn’t work for me, but maybe what you should do is delete that bone, then create it again (by itself) and make it the parent of the next bone. That way when you setup the IK solver it will work from the second bone.

Hope that helps.

unfortunately I don’t think that specific solution would work for my model… I fixed the link to the picture, check it out- supposed to be a leg to a “mechwarrior” (aka killer robot)

Aha the link works now. Errr have you tried using a track to constraint for the knee area? Sorry, don’t know how to do what you are asking :frowning: or if it is possible in Blender.

well, that’s why I’m posing the question… because it works well, I just don’t want to go through the hassle of constantly switching to a parented side camera to animate the legs for every frame… but if I have to… so be it, but I’m just curious if I can accomplish locking it to one direction well, thanks in advance… awaiting an answer :stuck_out_tongue:

I’m a newbie, and you seem to be much more experienced, but just i have curiosity…So, is it that as you applied and ik solver somewhere in the chain, or other constrain, then you can’t no longer do simply a RX, RY or RZ or gx, gy, gz ?

Excuse if the question is too dumb…

The way I’ve dealt with this in the past is to either use a a “lock” bone, i.e. one that a bone in your joint has a locked track to (discussion found here) or to use another short IK chain (two bones) and a copy rotation. This second method I got from some tutorial somewhere on animating a mechanized spider.

I only have time for a short description now, if that doesn’t work, I could make an example available. Starting with your normal IK leg, add an additional bone that runs from the beginning of your “thigh” bone to the heal (I call it LegRot.L/R), add a IK child to this bone (I call it LegRotNull.L/R). Add a Copy Location constraint to LegRot.L/R to the corresponding Thigh.L/R. To LegRotNull.L/R, add an IK solver to one of your heal bones.

If you’ve done this right so far, moving the leg up and down will keep the center of the LegRot.L/R bone on your heal, although since LegRot.L/R doesn’t shrink or stretch it’ll look like your heal is riding on a “rail” more or less. I hope that makes sense, :).

Now, on your Thigh.L/R bone, add a copy rotation from the LegRot.L/R bone you just added. If you have your roll angles set up right, that should do it. You might have some issues with your model though, depending on its rest position (hard to tell from the picture). In my humanoid models, this works well, but then my legs are reasonably close to straight. If your mech model armature’s legs are bent in the rest position, there may be some issues.

The nice thing about this setup if you can get it to work is that you can rotate the leg by rotating the LegRot.L/R bone, giving it a good range of motion when you want, but no rotation unless you key it into the animation.

see, I’m brandy new to the bone thing… I just barely managed to accomplish what I did after about 3 hours… and that was searching the internet for an explanation I could understand, half of that time was looking for a .blend because I didn’t understand it at all :expressionless:

perhaps you could provide an example of what you’re talking about? this armature stuff is really confusing to me right now…

my goal is to simply have the bones work like a normal ika chain, but cannot rotate sideways… from what your telling me, I dunno if that’ll work!? ack, I’m confused :expressionless:

Ok, I put up with two examples in it. I didn’t cover the lock method though as that was fairl well covered in the other forum discussion I linked and there were example .blends available for it.

I made a guess at how I felt your armature might be working to make my simple IK leg. For the most part, I didn’t really need either of these implementations to stabilize the leg in the little I played with it, although depending on your need either might work to help out the situation.

For both of these and most animations, bone roll angles are important. I normally let blender take care of this by selecting all my bones in edit mode and doing CTRL-NKEY to recalc the bone roll angles. There are times this isn’t the right thing to do, but for most situations it is what you want.

The left most leg as you look at it from the front camera (the bones with .001) is the simplest and most restrictive setup. It simply copies the X and Y location of the Thigh.001 bone to the IK_Foot.001 bone. Hmm, now that I think about it, this won’t really work for a leg at all, :). Ignore it or only look at it out of curiosity. Maybe you could get it to work in some circumstances, but since the copy location constraint works in world space, this method is pretty useless for other than an always vertical piston.

The other leg, the one without the .001 suffixes, has what I described in my previous reply. I won’t pretend that this is a full complete solution for you, rather its an example of how you might do something like this. Depending on the other dynamics in your armature and your animation needs, you very likely will have to modify the example somewhat to adapt it to your needs. On the other hand, it might fix your problems immediately as it did for me, :).

I remember something being mentioned in an armature tutorial, and I imagined that’s what it would look like… however, it still did not fully accomplish what I wanted… yes, you got the lower leg to stop going sideways, can you get the whole leg to do that?

Hmm, that should do it, possibly with a few tweaks, unless I’m not quite understanding your problem.

Does the leg in my example exhibit the bad behavior ? If it does, how can I reproduce it ?

Hmm, are the legs in your mech truly verticallly aligned ? It looks like they should be from the picture, but if they aren’t really vertical, this will affect the results of the IK solver. Maybe you just need to select all the nodes in the leg and do an axis aligned scale to make them truly vertical.

If you can make a .blend available for me, say with just the armature or a part of it, that exhibits the bad behavior in an action, I’d take a look at it. That might be faster.

Oh, just an FYI. In your picture, I see you have two locked tracks on the bone. Most constraints added like this only actually evaluate the last of them, so in this case its most likely that only the last locked track constraint is only being applied. If you want two similar constraints to be considered, you need to put a Null constraint between them. I don’t think this is affecting your results in this case, but it definitely is an issue for other constraints.

no, I don’t have a problem, I’m just looking for extra features… the armatures move fine, and do exactly what I want, if I move it from the side… I was wonder if I could make it like… hmm… a tire, the rear tires of your vehicle can rotate, and go up and down, but they cannot move towards or away from the car… and they cannot rotate sideways! that’s what I’m trying to accomplish…