CGTalk > Techniques > Character Rigging
Login register
Thread Closed share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 02-22-2013, 12:42 AM   #1
JaredTaylor
Technical Artist
 
JaredTaylor's Avatar
portfolio
Jared Taylor
Wellington, New%2BZealand
 
Join Date: Jan 2007
Posts: 1,230
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.
 
Old 02-22-2013, 03:00 AM   #2
gagex2z
PRO
portfolio
gagex2z
Tampa, USA
 
Join Date: May 2011
Posts: 100
Quote:
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.
 
Old 02-22-2013, 03:25 AM   #3
JaredTaylor
Technical Artist
 
JaredTaylor's Avatar
portfolio
Jared Taylor
Wellington, New%2BZealand
 
Join Date: Jan 2007
Posts: 1,230
Thanks for the reply.

I mentioned it works with a straight arm. But yes, that's the exact issue.
 
Old 02-23-2013, 06:38 AM   #4
JaredTaylor
Technical Artist
 
JaredTaylor's Avatar
portfolio
Jared Taylor
Wellington, New%2BZealand
 
Join Date: Jan 2007
Posts: 1,230
No one knows how to solve such a common problem? :(
 
Old 02-23-2013, 12:15 PM   #5
Pahuska
Veteran
 
Pahuska's Avatar
portfolio
FERRACHAT Guillaume
Maya Rigging/Scripting
Valence, France
 
Join Date: Feb 2012
Posts: 79
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.
 
Old 02-23-2013, 05:38 PM   #6
gagex2z
PRO
portfolio
gagex2z
Tampa, USA
 
Join Date: May 2011
Posts: 100
Quote:
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.
 
Old 02-23-2013, 08:52 PM   #7
JaredTaylor
Technical Artist
 
JaredTaylor's Avatar
portfolio
Jared Taylor
Wellington, New%2BZealand
 
Join Date: Jan 2007
Posts: 1,230
Quote:
Originally Posted by gagex2z
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.


I can't really relate what you've said to practical means. Maybe if I already knew how to do it it'd make sense
 
Old 02-23-2013, 09:11 PM   #8
gagex2z
PRO
portfolio
gagex2z
Tampa, USA
 
Join Date: May 2011
Posts: 100
Quote:
Originally Posted by JaredTaylor
I can't really relate what you've said to practical means. Maybe if I already knew how to do it it'd make sense


https://www.youtube.com/watch?v=kF0SUt2bXHQ

check 10:30 on this video.
 
Old 02-23-2013, 09:18 PM   #9
JaredTaylor
Technical Artist
 
JaredTaylor's Avatar
portfolio
Jared Taylor
Wellington, New%2BZealand
 
Join Date: Jan 2007
Posts: 1,230
Awesome, thanks!
 
Old 02-23-2013, 09:19 PM   #10
gagex2z
PRO
portfolio
gagex2z
Tampa, USA
 
Join Date: May 2011
Posts: 100
Quote:
Originally Posted by JaredTaylor
Awesome, thanks!


np, lemme know if it works for you.
 
Old 02-26-2013, 04:43 AM   #11
HobblesLake
Office Funny Guy
 
HobblesLake's Avatar
portfolio
Daniel Arata
Character TD
USA
 
Join Date: Oct 2011
Posts: 97
I don't think the set up of your arm is the issue because the pole vectors are pretty spot on.

The thing I notice is that your elbow pin falls short. There's something iffy about your math.

The translate X value of elbow_JNT should equal up to the distance of upArm_DIST

and the translate X of wrist_JNT to dnArm_DIST.

Try moving midArm_LOC out and then change your translate X values manually and you'll see what I mean.
 
Old 02-26-2013, 05:42 AM   #12
JaredTaylor
Technical Artist
 
JaredTaylor's Avatar
portfolio
Jared Taylor
Wellington, New%2BZealand
 
Join Date: Jan 2007
Posts: 1,230
Quote:
Originally Posted by gagex2z
np, lemme know if it works for you.


Hey, worked great! Thanks for that.

@Hobbles - you might be right, but I'd have no clue where to begin as it works for everything else. The stretch functions perfectly.
 
Old 02-26-2013, 10:46 PM   #13
JaredTaylor
Technical Artist
 
JaredTaylor's Avatar
portfolio
Jared Taylor
Wellington, New%2BZealand
 
Join Date: Jan 2007
Posts: 1,230
Ok so maybe your method didn't work. In theory it did, but once I bind it to the skeleton it does... this:

That's a cylinder replacing the leg just to show it bound. Maybe I'm missing something really obvious here, it's possible, but it looks like it's only the knee being affected meaning anything weighted to the hip or ankle isn't going to function correctly.

 
Old 02-26-2013, 10:59 PM   #14
Pahuska
Veteran
 
Pahuska's Avatar
portfolio
FERRACHAT Guillaume
Maya Rigging/Scripting
Valence, France
 
Join Date: Feb 2012
Posts: 79
Here's what's happening, it actually quite simple :

The knee joint is constrained to the pole vector. It only translates; the hip joint and the knee ones have not been rotated. Even if the bones look correct, the leg is not really bended. I guess you're just missing one simple step. The bones chain is probably not meant to influence the model directly. You can probably find how to fix this in gagex2z's video (I haven't watched it entirely yet)
 
Old 02-26-2013, 11:05 PM   #15
JaredTaylor
Technical Artist
 
JaredTaylor's Avatar
portfolio
Jared Taylor
Wellington, New%2BZealand
 
Join Date: Jan 2007
Posts: 1,230
Quote:
Originally Posted by Pahuska
Here's what's happening, it actually quite simple :

The knee joint is constrained to the pole vector. It only translates; the hip joint and the knee ones have not been rotated. Even if the bones look correct, the leg is not really bended. I guess you're just missing one simple step. The bones chain is probably not meant to influence the model directly. You can probably find how to fix this in gagex2z's video (I haven't watched it entirely yet)


Yup, that's pretty much what I was saying. Unfortunately there are no extra steps on his video and he doesn't cover binding it, so not sure if it even works :(
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 07:50 PM.


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