Rigging

Rigging101 » Rigging128

Elbow and Knee Locking (7 posts)

About This Topic

Tags

No tags yet.

  1. AntManley

    offline
    Member
    Posted 7 years ago
    #

    This seems to be an area where most IK and FK arm tutorials are a bit vague, essentially I have all the usual odds and sods, IK with stretch through multdiv and condition nodes, and normal fk arm. But how would I go about implementing an elbow lock feature on both the IK and FK arms?

    I had an idea about parent constraining the elbow joint to a third controller which would be the elbow lock ctrl, but on the IK it interferes with the solver. Even when the Elbow joint is parented using a null, it brings up a cycle and the controller breaks again.

    Any advice is much appreciated.

  2. Adam

    offline
    Member
    Posted 7 years ago
    #

    well usually elbow locking and knee locking is done in the same way that stretch should be implemented. Instead of measuring (distance node) from shoulder to wrist. You measure from shoulder to elbow control and from elbow control to wrist. then you make your bones equal their respective lengths. This locks the elbow to that control.

    This is the general idea as to locking the elbow. I could walk you through it if you need.

    Hope this helps,
    Adam

  3. AntManley

    offline
    Member
    Posted 7 years ago
    #

    Oh wow ok, well I implement stretch to IK's using Multi Div and condition nodes, the only drawback is the method I use I can't find a way to turn the stretch off. I understand what your saying, I just can't seem to see how to implement it in my head. Would the length from Should>Elbow get fed into a multidiv and Condition nodes, then once divided, fed back into the scale X of the elbow? If so wouldn't that interrupt with the stretch info already being fed into the bones from the main arm stretch?

    Anyway if you feel like posting up some instructions, I would be INSANELY grateful. I assume this same method can be employed to the knees?

  4. Adam

    offline
    Member
    Posted 7 years ago
    #

    I usually implement stretch with Set Driven Key, it is easier to setup and works the same. (You have to set it up with a 1 to 1 relationship, and linear post-infinity.) However, I believe you could use the same idea for the mult/condition way.

    [[[ Note: this only works if you use translate X to control the size of the joint. NOT SCALE]]]
    1. Setup up a locator on the elbow Control (ElbCont_loc).

    You should have locators at the shoulder (shldr_loc) and wrist(hand_loc) already for the initial stretch distance.

    2. Setup up a distance node from shlr_loc to ElbCont_loc.
    3. Setup up a distance node from ElbCont_loc to hand_loc.

    So now you should have three distances being measured. upper arm, lower arm, and the whole.
    Then we are going to have to switch between the two so we don't have elbow lock on all the time.

    4. Create a Blend Attr node for switching between the old stretch and the shoulderToElbow distance.

    The only way to create this node is through mel so, the command is
    [[[[[[ createNode blendTwoAttr; ]]]]]

    It's like a blendColors node but only has one input instead of 3. and the Attributes Blender blends between the two. However, this node has a glitch in Maya. at first the node comes with 1 input and we need two. So to add a second, simply:
    [[[[[ setAttr blendTwoAttr1.input[0] 1; setAttr blendTwoAttr1.input[1] 1; ]]]]]

    5. In Hypergraph, hook it up like this:
    -ouput of SDK for original stretch TO blendTwoAttr1's input 0.
    -distance of shoulderToElbow Distance TO blendTwoAttr1's input 1.
    -output of blendTwoAttr1 TO elbow joint's translateX.

    6. Create another Blend Attr node for switching between the old stretch and the elbowToHand distance.

    7. In Hypergraph, hook it up like this:
    -ouput of SDK for original stretch TO blendTwoAttr2's input 0.
    -distance of elbowToHand Distance TO blendTwoAttr2's input 1.
    -output of blendTwoAttr1 TO wrist joint's translateX.

    Now on your elbow Controller. add an attribute for elbowLocking. Usually a float from 0 to 1.

    8. Hook up Elbow Controller's ElbowLock attribute to blendTwoAttr1's attributeBlender.
    9. Hook up Elbow Controller's ElbowLock attribute to blendTwoAttr2's attributeBlender.

    Now you should have a working Elbow Lock.

    *Note: For Global Scale

    This is how to implement a global Scale in this situation. Because every character rig needs a global scale. You should have an attribute somewhere that does global scale.

    First off, add a multi/Div node between the following:
    -shoulderToElbow Distance and blendTwoAttr1.
    -elbowtoHand Distance and blendTwoAttr2.
    -whole stretch Distance and upper Arm SDK.
    -whole stretch Distance and lower Arm SDK.

    All of these are set to Divide mode. And the global Scale attribute is the input 2[0].

  5. baljeetbhartiya

    offline
    Member
    Posted 7 years ago
    #

    sorry.
    i m find out where i am put my blog. i don't search any corner put my blog plz reply me.

  6. age914

    offline
    Member
    Posted 7 years ago
    #

    Adam, I've set up the elbow-pin method that u wrote up (its pretty much the AFR method) , and it works fine, on the left arm. but when i put it on the right arm, it flips out the geometry of the upper arm. Any solutions?

  7. madhu

    offline
    Member
    Posted 6 years ago
    #

    is there any way to make elbo lock with the scale X stretchy????
    or i hve to make my stretchy again??
    plzzzzzz help!!!!!!

Reply

You must log in to post.

Rigging101 » Rigging128
1,099 posts in 307 topics over 110 months by 188 of 8,226 members. Latest: fashionpvp, d2q4p5z2j, gasheldonl