alignment of bone axes alignment on arm/legs and interface pet peeve

howdy,

the issue arises when you have legs and arms that are not modeled in a “T” pose with arms straight out on the x axis and the legs not going straight down on the y axis (in a y up/down world).

if you have a character that is modeled with arms and legs at an angle such that there is the least amount of stretching/tension, you get limbs at angles.

thing is, even if the arm is out at an angle, there is only ONE right way in which the elbow should bend. that is, it should bend into itself, into the upper arm like a pair of scissors. same with the knee and the lower leg - it should bend into the thigh perfectly.

the only way to accommodate that however is if one the bone’s axes LIE ON THE PLANE formed by 3 joints (for arm: wrist, elbow, shoulder … for leg: ankle, knee, hip).

in maya, there are plugins that will autoalign a bone to that plane (you have to select the proper joints). is there something similar in blender?

how would one solve this issue in blender? also, i HATE eye-balling things… i hate imprecision. just a caveat… : )

jin

p.s. interface pet peeve - generally, i feel the blender interface is - while very different - very well thought out, philosophically self consistent and logical.

BUT… the default where you select with the right mouse button… in and of itself, it’s, as i said, different but fine. but the fact that sometimes in the default interface, you also CANCEL OUT of operations using the right mouse button… this is INEXCUSABLE in my logic book… you cannot have a button both be an affirmative AND a negative! and this one little thing spooks me about what else might be so illogical.

anyhoo… i hope hope hope that at some point, this little default detail can be remedied so i can have more confidence about blender in general!

fyi, yes, i did already redo MY interface so that the left mouse button is selection.

thanks much.

jin

The trick to getting the elbow to fold in on itself exactly lies in getting the upper arm and fore arm bones to line up exactly. Easy to do in a T-Pose, just extrude the forearm bone along the x axis.

To achieve this alignment in a non-T-Pose, create the upper arm/forearm as a single bone, then subdivide it (select the whole bone, type w>>Subdivide). This will produce two bones in perfect alignment, both exactly the same size.

To keep the alignment while changing the size (assuming that’s needed), move the cursor to one end or the other (select bone end, snap cursor to selection Shift+s>>Cursor to Selection), change the pivot point to 3D Cursor (type “.” or use the Pivot menu in the window header), select the elbow joint, and move it while keeping it aligned by using scale (type s.)

As to the pet peeve, believe me, you’re not the first to notice, although I haven’t seen the problem stated in such stark and logical terms before. I think the powers that be believe they have fixed it by giving users the choice to change it. The problem with changing the default, as far as I can tell, is that all the user documentation would have to be rewritten, or at least copy-edited. Since this documentation is produced on a volonteer ad-hoc basis, I don’t think there is a practical way it could be done.

Welcome to BlenderArtists.

hi and thank you for the warm welcome! long time blender dabbler… wasn’t sure where would be a good place to join the community. was referred here by the blender character animation book i just got!

if i follow you, you’re saying that if i create one single bone, orient that properly and then split, both bones will share the same orientation.

while it might be a little hard to orient properly without a visual elbow angle, it’s entirely doable.

BUT… i assume that when you subdivide the bone, the bone will simply subdivide in a straight line… so you would still have to place the elbow joint where it belongs in the mesh. are you saying then that the local axes of the bone is aligned such that i can position it by manipulating two axes - that that would keep it on the “plane” formed by the 3 joints? if that is the case, that would totally work! thanks!

wow! that’s a great solution!

jin

This thread is for the people that have loads of time to write!

With bones, the y axis is longitudinal to the bone itself, so you really only have to worry about rotation about the x and z axes. You’d position the upper arm, and the forearm would stay in alignment because it’s the child of the upper arm parent, adjust the length by the scaling technique I’ve outlined, and adjust the forearm to the mesh by rotating it along x to keep it in the plane.

I’m not really sure how much sense that makes. :spin: anyway, give it a try, and if you have any trouble, post again. I think it should work just fine.

I’d be interested in a solution here, too. I thought it might be doable with constraints but it didn’t work out last time I gave it a try. What I do is spin around in an orthogonal view until the upper arm bone is edge on, and the the pane formed by the elbow the is parallel to the plane of the monitor. Actually, I usually only do this with knees. I’ve found that with arms it often looks better to bend the elbow sideways than to twist the shoulder and bend the elbow naturally. Then again I’m not doing anything very remotely realistic looking so YMMV.

right but whether it is arms or legs, you MUST have the arm or leg bend BACK IN ON ITSELF. it MUST fold together like scissors when the rotating axis rotates.

if it folds “crooked” that’s not good.

and yah, this has to be addressed BEFORE any constraints are applied… it must work with fk before anything fancier gets applied. it is the foundation.

thanks much orinoco - your description makes perfect sense. so my plan is to create a bone, split it, put a small elbow bend, then rotate the top arm bone (shoulder joint) and scale it all into position. that should work great.

jin

Is “ctrl” r of the bones not accurate enough?

Pappy

Well, pappy, that’s how I’d handle it in my case, but jinchoung wanted an analytic solution, and as you can see,



while my eyeball solution is pretty good, it isn’t exact.

Since jinchoung said

also, i HATE eye-balling things… i hate imprecision. just a caveat… : )

I was trying to be accomodating. :eyebrowlift:

Aaaaagh! a crooked fold… that arm will never animate well. :wink: Damn if I don’t learn sumtin new every time I visit this list… better change to left mouse click while I’m at it… those darn Blender guys just can’t do anythin right.

Pappy

aha, found a good and easier solution to align an ELBOW/KNEE joint to fold into itself properly:

RIGGING CHALLENGE: chances are, the character will not be modeled in perfect T pose because it will make deformations more difficult later on. you want it modeled in a pose where there is the LEAST TENSION possible in the body. so arms and legs bent and probably out at an angle.

so

  1. let’s take the arm. make three joints (two bones) for the arm.

  2. using the 3d views move joints around so that they are placed properly in your model.

  3. select the wrist joint and ‘e’ drag out a new JUNK bone anywhere.

  4. select the shoulder joint and SHIFT-S and snap the cursor to shoulder.

  5. SHIFT-S snap the end joint on the JUNK bone to the cursor.

  6. we have basically created a TRIANGLE at this point. and as we remember from geometry class, you need 3 non-coincident verts to define a plane - so this triangle defines a plane.

and it just so happens that it is ON THIS PLANE that the forearm must lie on during the entirety of an ELBOW (or knee) ROTATION.

  1. so how do we align the bone roll so that the forearm will stay on this plane during elbow rotation?

‘w’ subdivide the JUNK BONE. now it has a joint on the “hypotenuse”.

  1. SHIFT-S snap the cursor to this new joint.

  2. select the FOREARM BONE and CTRL-N reset bone roll…

BUT instead of the first option which aligns the bone’s z axis to the WORLD, use the second option, that aligns the bone’s z axis to the CURSOR! which now lies somewhere on the plane where forearm should rotate on!

  1. you are done. now, when the forearm is set to rotate according to NORMAL (not world or local), it will properly bend in itself and the forearm will lie on the plane that it should.

  2. for the upper arm (or shoulder joint), you can CTRL-N align that to the world. that should be fine.

  3. delete the JUNK BONE (well, you have two now because you subdivided) now. you’re done with it and now you can add your hand, feet bones.


now that i see how it’s done in blender, it should be fairly easy to create a script that runs through this whole rigamarole and automates the alignment of the elbow or knee… if anyone is inclined to tackle it before i do, i wouldn’t take offense.


on my test examples, it is the X axis that should be operative for the elbow. i would lock the other channels (because elbow can only rotate on one axis) and when i set up ik, it should work just like a proper elbow or knee roll.


thanks everybody for the education on what the heck CTRL-N does as well blender nuances.

jin

p.s. we did this using two bones (three joints) for the arm or leg but after you set up the proper roll orientation for the elbow or knee joint, you can simply subdivide the bones to add roll bones forearm twisting and such no problem.

p.s.2. say, why doesn’t “LOCAL” rotation mode produce rotation according to the bone roll i set up? it looks like it is the same as WORLD which doesn’t seem right… and what does “NORMAL” mean anyway. i’m not exactly sure how a bone would have a “normal” as opposed to say a poly face…

@pappy, lol :smiley: I know just what you mean. I learn new things here too.

@jinchoung: appears to be a quite elegant solution. I haven’t had a chance to try it, and won’t have one for a few days, but I think the people who animate mechanical models will be overjoyed with this technique.

well, i would say that the consideration is really important for ANY character rig.

in all my maya rigging, and in those of my colleagues, this is a pretty huge point. again, not an issue if a character is in T-pose.

but tremendously big deal if, say, arms are out to the sides at 45 degrees.

you don’t have to be accurate to the degree (though i prefer it and insist upon it myself) but if you’re off by 20degs or something (or if the elbow z axis is aligned to world axis when out at 45 degrees), that’s something that can be a huge pain in the a$$ to address later.

jin

oh, regarding the new POLE VECTOR targeting that can be done under the IK CONSTRAINT in 2.46, it’s really good!

BUT, it would be ideal if, when assigning a pole vector target, that the POLE OFFSET is determined automatically.

as it is now, if the arms or legs of my model are such that the elbows or knees are pointed out at an angle (not facing down Y), when you apply an object as a POLE VECTOR, your arm swings out from where it was (and should be), and you have to manually plug in POLE OFFSET numbers until you are back.

and again, you have to do this by (the dreaded technique of) “eyeballing it”.

an automatic pole offset plus an automatic roll alignment according to proper bend plane would be nice additions to an already very capable system. and the system is such that you could make these quite easily into python scripts so all’s good.

jin

Maybe it’s because we’re used to it, but eyeballing doesn’t seem to invoke that dread around here, especially among organic modelers. As you can see in my reply to Pappy, with a 45 degree angle from global, I’ve eyeballed the bone roll angle so that it’s within a degree of being an exact solution. Turning on the bone axis display helps. I can’t even imagine missing the mark by five degrees, to say nothing of being off by 20 or more.

Be that as it may, if you are planning on writing that automatic bone roll script I’d certainly use it, the more the computer can do, the less I have to do, and that’s always a good thing. But I’d probably also introduce slight asymmetries here and there to give my characters some character, so to speak. :wink:

But those same asymmetries on a mechanical model means pistons slip out of cylinders, chains slide on and off gears, parts that are supposed to mesh smoothly don’t, and mechanical models are rarely in a T-pose, or even lined up mainly on one plane with bi-lateral symmetry.

yeah. that’s fine of course. anybody’s preference is as valid as the next guy. but imo, precision should be an accessible option. especially since, as you note, for things like mechanical structures, they would be essential. i’m very glad 2.46 has gone a step closer by adding roll bone to cursor.

but the thing that disturbs me is that the tutorials that i’ve seen around the net about rigging in blender (and the two blender books that i have - the char animation one and the new one by roland hess) don’t talk at all about getting the rotation plane of elbows and knees right - and especially for tutorials intended at newbs, this is a pretty vital FYI.

if the model is not built in T-Pose (and again, i would argue that they should not be - and the newb tuts often have the example mesh’s arms out at angles), you would very EASILY acquire a 20 degree or more discrepancy between what it should be and what it ends up being after you do a 2.45 era CTRL-N.

CTRL-N ends up being touted as a magic bullet solution even though that’s not at all the case.

ugh, and don’t get me started about how this problem is exascerbated to the Nth degree when applied to fingers!!! ARGH! i can’t imagine how that procedure is being taught now! i’ll have to investigate that later.

as for asymmetry, just speaking for myself, i don’t introduce asymmetry into bend angles. no matter how mutated someone is, it’s extremely likely that their joints bend in on themselves. all their fingers would most likely fold “in line” on their proper plane. i guess if their fingers, arms or legs were broken at some point… but if your method takes into account the vagaries and imprecision of nature, that’s cool.

but just in general, and again, imo, asymmetries are more trouble than they’re worth. can really add time and complication simply by being unable to mirror over controllers, drivers, etc… and the more complicated the final rig, the more problems and time penalty you end up incurring.

jin

Hi jinchoung, Orinoco, how’s it going,

I arrived here after a web search for info on post-facto bone realigning, and it sounds like a good forum for a non-rigger to ask experts a (hopefully) simple rigging question.
I agree with everyone here 1000% that the critical thing is to start with a clean, well-oriented rig. Unfortunately, job realities overrule . I’m an animator stuck with a poorly-oriented rig from a previous contractor, and have been given the task of making that rig work, as opposed to starting from scratch. (now there’s a book idea; “Fixing the mess from the last guy; post-facto repair techniques in Maya.”)

(in classic animator fashion, I naturally expect the last guy to be better than I am at rigging) :smiley:

Cutting to the chase; the character was rigged & skinned with the arm bones not snapped to the grid, not straight out from the shoulder, nor the requisite Z-axis ‘kink’ in the elbow joint to get the IK to ‘scissor’ nicely. So when I manually move the hand’s IK handle toward the torso, the elbow starts pointing downward, then wildly swings upward toward the end of my testing movement.
So I’m trying to repair it, I put some locators in proper spots and snapped the joints to them. This is in preparation for a proper IK’ing.
But upon close inspection the joints, the spheres themselves, are aligned neither to the clavicle, nor the elbow. Rotation-wise, those little spheres are off-kilter a bit. I assumed the snap-to-locator process was to blame, so I ‘undid’ to before that, but the spheres were off-kilter even before that. I suspect these wonky rotational values are collectively causing the wild elbow snapping problem.
Can’t seem to find any tool to ‘right-anglify’ the joint sphere (relative to world values) without also moving the bones below it. Tweaking the pole vector values (once IK’d) do affect the snapping behavior, but twist the wrist, and don’t really fix it in any comprehensive way.

Any solutions? Any help greatly appreciated.

-Squiddy

I’ve seen some rigs use a sort of brute force approach to that problem, where they add another helper bone, and use a track to constraint on the elbow to point at it. The helper bone is then located behind the character, at about belly button height, so the elbow doesn’t get wonky. If the character makes any major changes in position, the helper bone might have to be animated along with the arm bone to keep the elbow pointing where it’s supposed to point.

Hey Orinoco, how’s it going,

Yeh, was thinking about an aim-constraining object for the shoulder/elbow. (and who doesn’t love brute force?) That was always a neat thing to have, instead of the rat’s nest of animating pole vector values.
Trick is here, this is a console game project, so there’s an engine to consider further down the pipe. My art lead says that all the engine cares about is joint rotation, regardless of what’s making it rotate, period. But the IT guys are telling me not to ‘add’ anything to the rig or else blue smoke will start venting out from the engine PC.

:confused: Blue smoke is apparently something bad.

(sigh) I suppose I’ll just have to test it in-game. Wish me luck.

They could just call that blue smoke a feature. It’s something bad ?? :spin: Who knew?

good luck.