Request for help - placing polevector ctrl

 12 December 2004 Laa-Yosh Edge looper   Tamas Varga Lead character modeler Digic Pictures Hungary Request for help - placing polevector ctrl I'm stuck with the following problem... I want to place my polevector control object for an IK limb that is somewhat bent (in a rest pose) so that - it does not affect the rotations on the IK limbs (which are set to 0,0,0 at the moment) - it is positioned at the same height as the knee (or at the same X position as the elbow) First I snapped the control object to the middle joint of the chain, then moved it out a bit along the world Z axis. This, however, did not work as the rotation plane of the joints is usually not aligned to the ZY world plane - I got some tiny rotation offsets on the IK joint chain. So then I've tried pointconstraining the control to the start and end joints so that it gets in the midpoint, and then aimconstraining it at the middle joint of the chain. So far so good. However, our elbows/knees are usually quite far from the middle of the limb (upper arm is usually longer than lower arm, etc), so if I now move the poleCtrl object out a bit along it's aim axis, it'll end up somewhere near the start/end joint, but certainly not aligned to the middle joint. Now, I suppose that simple constraints won't be enough and I'd have to do some math to find the rotation plane of the limb, and then move the control object on that plane... which is way beyond me and my Mel skills. Can anyone help me out in this? Thanks in advance... :) __________________ Tamas Varga share quote
 12 December 2004 anthonymcgrath Expert   portfolio anthony mcgrath United Kingdom its prob not the solution everyone will recommend here but I get my armControl object (usually a nurb circle), snap the circle to the end joint of the limb, freeze its transformations. next parent the ikhandle to the circle - this should allow you to move the ikhandle and zero it out by setting the translate of the circle to 0,0,0. as for the polevector, the ikhandle has a parameter called 'twist' (assuming you've made an RPsolver!). Add an attribute to your armControl nurbCircle called polevector (or similar!) and use the connection editor to link them up. This has a few advantages for me: -you dont get any slight shift in the arm like you do when you add a polevector constraint -you can control the objects arm position and elbow point from one node. -one less object to add to a character set!! hope this helps ant toon uk Last edited by anthonymcgrath : 12 December 2004 at 06:10 PM. share quote
 12 December 2004 DangerAhead Rigger Lover   portfolio Geordie Martinez Character TD - Rigger - Massive TD Industrial Light & Magic San Francisco, USA perfect location for Pole Vector controller On your IK handle, you have values for Pole X, Pole Y, Pole Z. Just move the decimal point for all of those values until your polve vector icon pulls away from your rig. Mulitply by 10 usually does the trick. Then you have the world coordinates of the pole vector handle Then : then I hope this helps. share quote
 12 December 2004 anthonymcgrath Expert   portfolio anthony mcgrath United Kingdom Hey Danger - thats a class solution too - didn't know you could do that Got any good spine solutions too? What do you think of xsi's spine making facility? ant newcastle uk share quote
 12 December 2004 unparent Frequenter   keith bruns senior technical artist Kojima Productions Los Angeles los angeles, USA there used to be a script on highend that would do this nicely for you, called buildPoleVector.mel. If it is not there still, I can send it to you. Basically it would build the pole vector constrained to a locator right in front of the joint in a way that would ensure the joints didnt move. If the locator isnt placed exactly where you want it, you just need to create 2 curves to generate the "plane" that the pole vector would lie on. Then just move your object to the locators position, freeze, and create pole vector. It sounds like a lot of work, but is really very fast once you do it once or twice. (sorry for the kinda crappy explanation, feel free to contact if you have any questions.) -unparent share quote
 12 December 2004 asod Veteran   Character TD Great Thinking DangerAhead I've scripted the solution so we can have perfect 0 0 0... now the world is safe again. ``````//-------------------- // Build Guide Cruve to place the PoleVector node //-------------------- global proc perfectPoleVector() { // Get Select IK. string \$Ik[0]=`ls -sl -type "ikHandle"`; if (!`size(\$Ik)`) { print "Select IK First\n"; return; } string \$StartJoint[0]=`listConnections -d off -s on (\$Ik[0]+".startJoint")`; float \$StartJointPos[2]=`joint -q -p \$StartJoint[0]`; // Get IK PoleVector value multiply by 10. float \$PoleVector[2]; \$PoleVector[0]=(`getAttr (\$Ik[0]+".poleVectorX")`*40); \$PoleVector[1]=(`getAttr (\$Ik[0]+".poleVectorY")`*40); \$PoleVector[2]=(`getAttr (\$Ik[0]+".poleVectorZ")`*40); // Create Curve curve -d 1 -p \$StartJointPos[0] \$StartJointPos[1] \$StartJointPos[2] -p (\$PoleVector[0]+\$StartJointPos[0]) (\$PoleVector[1]+\$StartJointPos[1]) (\$PoleVector[2]+\$StartJointPos[2]) -k 0 -k 1 -n (\$Ik[0]+"_PoleCurve"); }// End getPoleVector `````` __________________ Character TD & Concept Art wannabe AsOd ><((((º>™ asisudai@gmail.com share quote
 01 January 2005 Morganism Extruded Plastic Dingus   portfolio Morgan Loomis Animator Weta Digital Wellington, New Zealand This is just a thought, I don't know if it would work, but could you parent the PV control under the hip joint, move it in local space to make sure that it stays on the same plane as the joint chain, and then unparent it when you get it where you want it? __________________ No school like the old school. share quote
 01 January 2005 asod Veteran   Character TD Quote: parent the PV control under the hip joint It wouldn't work, let me explain to you what is the PolaVector: The polaVector is the vector of the ik chain ( all the joint within the ik ). so taking just the first joint orientation isn't going to be on the vector. __________________ Character TD & Concept Art wannabe AsOd ><((((º>™ asisudai@gmail.com share quote
 01 January 2005 Me109 Аниматоры   Jamie Telford Animator / Setup Artist Australia make sure your bone chain is only bent in one axis.. if you have the knee joint kinked in a additional axis...the pole vector will always have this problem... it is best to create the bone chain the front view insuring that the joints are snapped to grid... (create the bones with no primary or seconday orientation too ) then rotate the bone chain from the hip to fit the leg... this is the best way around it.. and you'll achieve excellent IK behaviour too... __________________ My maya tutorials <-- good stuff here! Website: www.jamietelford.com share quote
 01 January 2005 Laa-Yosh Edge looper   Tamas Varga Lead character modeler Digic Pictures Hungary Thanks for the various suggestions, guys - it seems that the only real solution is to keep the 3 joints perfectly on a plane (xz, zy etc.). Or maybe we'll try to use a different bind pose and rig pose in the future... whatever. __________________ Tamas Varga share quote
 01 January 2006 CGTalk Moderation Expert Thread automatically closed This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum. __________________ CGTalk Policy/Legalities Note that as CGTalk Members, you agree to the terms and conditions of using this website. 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.