Home Technical Talk

XSI Forearm Twist Rig Question

I've got a character model I've been working on, and I just got him rigged and enveloped in XSI 5.11. But after I had got all that done, I realized when I twist the character's wrist +/- ~90 degrees (the full range of motion), the polygons in his wrist get all twisted up, and his wrist collapses. It looks like a cardboard tube twisted at both ends. My animation teacher suggested spreading the twist throughout the forearm, but I'm using a different animation package than he is so he can't help me figure out how to accomplish that. My first thought was to break up the one bone in the forearm to three separate bones and constrain them in every translation except their X rotation axis. That way they'd move as a unit and wouldn't bend, except for the twisting motion. But I don't know how to do that.

Then I had a second thought. If I did that, when I twist the wrist, it would still only spin at the root, and the motion wouldn't get perpetuated to the forearm. Well, I guess I could rotate-constrain the forearm effector to the wrist bone rotations. Would that work?

What does everyone else do for an arm rig? This sounds overly complicated. I'm going to need a super good pair of arm rigs as our weapon mechanics for our game are going to be a highlight of our game and their pretty complicated.

Replies

  • John Warner
    Options
    Offline / Send Message
    John Warner polycounter lvl 18
    you're brilliant for thinking that up.
    yeah, that's what i do more or less on my rigs. i'm not sure what you mean exactly by having it spin at the root and not the tip, i would have thought you would want the oposite? if you were to spin your forearm on X, your hand would rotate but your elbow would stay still...

    i do this by bringing in a null, matching all it's transforms to the forearm bone, then parenting that null to the forearm bone so that it moves with it exactly. the next step is to open up the expression editor and link the (i think probably X rotation) of the null to the forearm bone, but do it negatively. i don't remember what the expression should look like but i think it should be something like this:

    if linking the null's rotation x to the forearm's rotation x looks like this, in the null's rotation x expression window:

    kine.forearm_left.rot.x

    you would change it to this:

    -(kine.forearm_left.rot.x)

    or SOMETHING like that anyway.. i'm a bit foggy.

    what this does it make it so that the null follows the forearm bone perfectly, but it mirrors the x rotation exactly. this causes the null to NOT rotate on the x axis, while the forearm does.

    you then weight the base of the foream to that null and the end of the arm to the bone, and g radiate between the two.

    there you have it. you can duplicate this setup where ever.

    sorry if that was convoluted, i'm tired.
  • Archvilell
    Options
    Offline / Send Message
    Ah, good deal. Let me see if I got this straight. In essence I would create a null that rotated exactly opposite the rotation of the bone such that it looked stationary to the bicep but moved with the forearm bone in every other way. Then when enveloping I could envelope the base of the forearm to that null so the mesh wouldn't twist there, but it would still move around. Hmm, that would save me from turning one bone into three and also from having to figure out how to lock bones in all transforms except one.

    I would need to use FK to twist the forearm then, but wouldn't that force me to use FK for all forearm movements? I was hoping to use IK to place the hand into position and use FK from the wrist to the fingers.

    Hmm. If I constrained(?) the rotation of the forearm to the rotation of the wrist, I could use FK for all wrist movements without directly using FK on the forearm. Would XSI still know the difference, since the bone twisted without the effector telling it to?
  • Mongrelman
    Options
    Offline / Send Message
    Mongrelman polycounter lvl 18
    I think you're making things a bit more confusing for yourself smile.gif

    Did this myself in XSI too, the way John said.

    Basically, you will have 2 (or 3 if you want) nulls that are placed along the forearm bone, the verts in that area are weighted to the nulls instead of the forearm bone (or you could skin verts near the elbow to the bone).

    The nulls are parented to the forearm bone so that they always moved where it does. You assign rotation constraints for the two axes (plural of axis!) of the null that you want locked, let's say X and Y (and Z lays along the forearm bone), these are constrained to the rotation of the X and Y axes of the forearm bone. The Z axis (the one that the null will revolve around for the 'twist') is constrained to the Z rotation of the hand bone.

    This means that when the hand flaps up and down the null doesn't move, as the only information the null takes from the hand is when the hand does the 'twist' rotation. So a flapping action of the hand would revolve around the Y axis, the null's Y rotation is constrained to the Y rotatin of the forearm bone, so flapping would not effect the null. However twisting the hand would, you can twist and bend in other axes and the null will only react to the twisting of the hand.

    The Z rotation of the first null (nearest the hand) is constrained 100% to the Z rotation of the hand. The Z rotatin of the second null (middle of forearm) is constrained to the Z rotation of the hand, but a lower value such as 65% (or you could even constrain it to the previous null).

    The Z rotation of the first null is constrained to the Z rotation of the hand (or previous null) but to a lower value again, such as 30%.

    So if the hand was twisted 100 degrees, the first null would twist 100, the second would twist 65, and the third would twist 30 degrees, giving you the gradual twisting action along the arm.

    However when you place these rotation constraints, the nulls will actually twist the wrong way, so if you twist the hand inwards, the nulls would twist outwards. This is why John was saying to go into the expression editor and make them negative, as this will then cause them to twist in the right direction.

    So you can use IK as normal, all this does is mean you weight some verts on the forearms to nulls instead of the forearm bone itself.

    Hope that helped.
  • Archvilell
    Options
    Offline / Send Message
    Oh, I got you now. Thanks for clearing that up. I'll try it out. Thanks again.
  • Archvilell
    Options
    Offline / Send Message
    Hmm, Now I can't figure out how to constrain only one axis. I checked the help guides but it doesn't mention anything about selecting an axis, just whether or not orientation is affected. And there is a lag in the constraint - something handy under other circumstances, but not this one.

    (Edit, after an hour of searching through help files...)

    Okay, I fixed the lag. It was because I orient constrained the nulls to the writ bone only. When I changed the blend weight to less than one, XSI will blend the constraint with itself if the total blend weight of the constraints is less than one (hope that makes sense). So the way to fix it is to constrain the rotation to the forearm bone first at 1 minus whatever you want the fraction of constraint to the wrist to be. So the null closest to the elbow, I constrained to the forearm at .9, the constrained to the wrist at .1. The next null I constrained .5 to forearm and .5 to wrist, etc. Constraining to the forearm first is important, otherwise the hierarchy of constraints is messed up and probably won't work right.

    But I still haven't figured out how to constrain in only one axis...

    (Hah hah, more searching and more time later...)

    I put a direction constraint on the nulls on top of the orientation constraints and now they all stay pointed in the right direction. So it all works now. This seems like a convoluted way to do it. I would think there would be a more elegant way to do this, but for now, this works.
  • Archvilell
    Options
    Offline / Send Message
    Hmm, this sucks. The direction constraint isn't working. The setup I'm using is this: a two-bone chain for bicep-forearm. A one bone chain for wrist (wrist root parented to forearm effector). Standard arm configuration. I have 3 objects placed along the forearm bone (parented to said bone), one near the elbow, one in the middle, and one near the wrist. I orient constrain them all to the forearm bone first at .9, .5, and .1 blend weight, respectively. Then I orient constrain them to the wrist at .1, .5, and .9, respectively. Lastly, I put a direction constraint on all three objects so their X axis points to the wrist bone. Everything works great until the forearm bends at the elbow to and past ~90. Then the objects start to roll towards the outside of the arm.

    I think my problem is that the orientation of the wrist is still getting passed to my objects, and for some reason my direction constraint is letting the objects roll when they shouldn't. If I could figure out how to constrain only the axis I needed, then I don't think I would have this problem. I could use the parameter connection editor, but every time I use it, it seems a bit flaky at times. I use it to get finger rotations and curls, but I constantly have to fight that thing. I hope 6.5 has got it fixed.

    Anyone have any ideas?
  • Archvilell
    Options
    Offline / Send Message
    Problem Solved. Used Expression Editor. Elbow null's x rotation is .1*wrist bone's x rotation, middle null's is .5*wrist bone, wrist null's is .9*wrist bone. No need for constraints or anything. Simply parent the nulls to the forearm bone and add those expressions and viola. Done. Thanks for the help guys.
Sign In or Register to comment.