# Elbow Pinning - Help me work out one last kink

 02 February 2013 JaredTaylor Technical Artist   portfolio Jared Taylor Wellington, New Zealand 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. share quote
 02 February 2013 gagex2z PRO portfolio gagex2z Tampa, USA 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. share quote
 02 February 2013 JaredTaylor Technical Artist   portfolio Jared Taylor Wellington, New Zealand Thanks for the reply. I mentioned it works with a straight arm. But yes, that's the exact issue. share quote
 02 February 2013 JaredTaylor Technical Artist   portfolio Jared Taylor Wellington, New Zealand No one knows how to solve such a common problem? :( share quote
 02 February 2013 Pahuska Veteran   portfolio FERRACHAT Guillaume Maya Rigging/Scripting Valence, France 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. __________________ VIMEO http://the-rigging-clown.blogspot.fr/ share quote
 02 February 2013 gagex2z PRO portfolio gagex2z Tampa, USA 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. share quote
 02 February 2013 JaredTaylor Technical Artist   portfolio Jared Taylor Wellington, New Zealand 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 share quote
 02 February 2013 gagex2z PRO portfolio gagex2z Tampa, USA 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. share quote
 02 February 2013 JaredTaylor Technical Artist   portfolio Jared Taylor Wellington, New Zealand Awesome, thanks! share quote
 02 February 2013 gagex2z PRO portfolio gagex2z Tampa, USA Originally Posted by JaredTaylor: Awesome, thanks! np, lemme know if it works for you. share quote
 02 February 2013 HobblesLake Office Funny Guy   portfolio Daniel Arata Character TD USA 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. share quote
 02 February 2013 JaredTaylor Technical Artist   portfolio Jared Taylor Wellington, New Zealand 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. share quote
 02 February 2013 JaredTaylor Technical Artist   portfolio Jared Taylor Wellington, New Zealand 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. share quote
 02 February 2013 Pahuska Veteran   portfolio FERRACHAT Guillaume Maya Rigging/Scripting Valence, France 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) __________________ VIMEO http://the-rigging-clown.blogspot.fr/ share quote
 02 February 2013 JaredTaylor Technical Artist   portfolio Jared Taylor Wellington, New Zealand 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 :( share quote

 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 vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.