Elbow Pinning - Help me work out one last kink

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  02 February 2013
Elbow Pinning - Help me work out one last kink

Hi guys,

I have my elbow pinning setup completed. The last thing I can't figure out is that when it's in anything but a T Pose (it works if the arms are on a single plane) the pinning kind of misses the pole vector and ends up in an odd place, but near it.

Hopefully someone can look at my file and tell me what I'm doing wrong here?

I'll walk you guys through what I'm doing first. Here's a picture of my graph:



1) First I divide the distance shape of the entire arm by the global controller's scaleY. This is for global scale, which isn't currently setup properly so it wont work right in the scene example as it's not relevant.

2) Then I divide the result of 1 by the absolute length of the arm.

3) I multiply the length of the upper arm, and lower arm, by the result of 2)

4) The result of 3) outputX into condition colorIfTrueR. colorifFalseR is set to the length of the upper and lower arms respectively.

5) The condition checks if the distance of the entire arm (distShape) is greater or equal to the absolute length of the arm.

6) The result of that plugs into a 'Blend Two Attr' input[0], the distance of only the upper and lower arms respectively plugs into the input[1] of the Blend Two Attr.

7) The output goes through a blendcolors (so I could make a switch on/off with reverse nodes) then to the joint.


The idea is that when I turn the blend two attr up to 1 from 0 it pins the elbow, and it works on a flat plane, but when the arms in any other pose it misses the elbow locator (which is also the elbow pole vector).

Here's my scene file:

https://www.dropbox.com/s/lf396doup...ArmRig_bent.zip


Would appreciate any help.
 
  02 February 2013
Originally Posted by JaredTaylor: Hi guys,

I have my elbow pinning setup completed. The last thing I can't figure out is that when it's in anything but a T Pose (it works if the arms are on a single plane) the pinning kind of misses the pole vector and ends up in an odd place, but near it.

Hopefully someone can look at my file and tell me what I'm doing wrong here?

I'll walk you guys through what I'm doing first. Here's a picture of my graph:



1) First I divide the distance shape of the entire arm by the global controller's scaleY. This is for global scale, which isn't currently setup properly so it wont work right in the scene example as it's not relevant.

2) Then I divide the result of 1 by the absolute length of the arm.

3) I multiply the length of the upper arm, and lower arm, by the result of 2)

4) The result of 3) outputX into condition colorIfTrueR. colorifFalseR is set to the length of the upper and lower arms respectively.

5) The condition checks if the distance of the entire arm (distShape) is greater or equal to the absolute length of the arm.

6) The result of that plugs into a 'Blend Two Attr' input[0], the distance of only the upper and lower arms respectively plugs into the input[1] of the Blend Two Attr.

7) The output goes through a blendcolors (so I could make a switch on/off with reverse nodes) then to the joint.


The idea is that when I turn the blend two attr up to 1 from 0 it pins the elbow, and it works on a flat plane, but when the arms in any other pose it misses the elbow locator (which is also the elbow pole vector).

Here's my scene file:

https://www.dropbox.com/s/lf396doup...ArmRig_bent.zip


Would appreciate any help.


OK, personally I don;t use this method anymore as I have simpler ways if I need to setup my own and I have a script that creates IKRP stretchy knee/elbow pin limbs with Global scaling. The script comes with Jason's Animator Friendly Rigging set which is probably where you got your info.

I have run across the issue you're having. Thea rm will shoot to a few spaces in front of the pole vector right? This has to do with how you set up your arm. To trouble shoot this try setting up a perfectly straight arm with no bend and then set the angle then 0 it back straight. Then set up your stretchy and elbow pinning on that arm. You should find that it will pin correctly then, however, because it's already perfectly straight the stretch itself will have no pop to it.

You can also set the arm up with a bend but using the orthographic cameras to do so so that they are all on the same plane and distanced correctly. But for trouble shooting's sake try making a straight arm and see if it works.
 
  02 February 2013
Thanks for the reply.

I mentioned it works with a straight arm. But yes, that's the exact issue.
 
  02 February 2013
No one knows how to solve such a common problem? :(
 
  02 February 2013
You can't solve this issue on this particular arm. The first thing I check when building an arm is the position of the shoulder, elbow and wrist. Are they perfectly aligned when looking through the front camera ? I even wrote a vector based check script in my autorig to fix it, because if the arm is not perfectly straight in the front view, I know it won't work correctly. It is very important. It tried my usual pin elbow setup (quite simpler) on your arm, and it doesn't work neither.
 
  02 February 2013
Originally Posted by Pahuska: You can't solve this issue on this particular arm. The first thing I check when building an arm is the position of the shoulder, elbow and wrist. Are they perfectly aligned when looking through the front camera ? I even wrote a vector based check script in my autorig to fix it, because if the arm is not perfectly straight in the front view, I know it won't work correctly. It is very important. It tried my usual pin elbow setup (quite simpler) on your arm, and it doesn't work neither.


This was my point as well. the problem lies in your arm position. However, you can fake the elbow pinning really easily by using another bone chain that's parent constrained to follow the stretchty IK bones except the elbow. Have the elbow orient with offset to the elbow

and point contrained no offset (between your pole vector and your stretchy elbow.)

Then just SDK your weight from 0 to 1 and the point contraint will lock the elbow down faking the effect.

This is the method I've been using for simple game rigs as it's less nodes, and less, global scaling issues.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 08:03 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.