|10 October 2012||#1|
Wellington, New Zealand
Join Date: Jan 2007
IK/FK Matching - Almost There..
I'm setting up IK FK matching for a rig - if I match the FK on top of the IK, it works fine because I'm just taking the rotation of the joints and applying it to the controllers. But if I match the IK on top of the FK it's always ever so slightly off - just enough to see the pop, enough that it's not good enough to use in production.
I even completely rerigged all the legs just because of this, and the second time around it happens too. There is no popping when switching IK/FK in a zero'd pose - they do line up appropriately. It only pops if I rotate the hip joint on anything but Z. Using ONLY Z works fine.
I'd prefer to avoid posting my scene file as it's for someone else, I could remove everything and just leave a leg in there or what not maybe, if it's necessary.
I want to stress that all rotation orders are the same and all joint chains are identical except for the unnoticeable rotations the IK gets from IK handles. The knee joint can ONLY rotate on one axis for all 3 chains. Also it's important to note that the pole vector controller is perfectly aligned to the ik handle plane.
I'll talk through what I've done so far.
1. I position a locator directly onto the leg's pole vector control and parent it under the FK hip.
2. I position a locator directly onto the FK ankle and parent it under the FK ankle.
3. I xform to get the transforms of the pole vector locator
4. Since the pole vector is point constrained to the foot, I get the translation values of the group node above the pole vector that actually contains the constraint.
5. I subtract the values from #4 from #3 (the xform)
6. I apply the result to the pole vector and it snaps perfectly on top of the locator
7. I xform the position of the ankle locator and move the leg IK controller on top of it
I'll post my code too if it helps, I've made it so it looks at what leg switch (the controller that switches between IK FK) you have selected, as well as whether it's in FK or IK, and automatically decides what action to take.
This is a four legged creature, hence the naming L_F_ or R_B_ (for left front or right back).
Last edited by JaredTaylor : 10 October 2012 at 08:55 PM.
|10 October 2012||#2|
Animator - Character Setup
Ha Noi, Viet Nam
Join Date: Aug 2009
If you send me the scene, i can tell you where the mistake is, i know what you mean but there are many thing might happend, start with the setup, group, transform bla bla bla.
|10 October 2012||#3|
Join Date: Sep 2003
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.
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
|Thread Closed share thread|