Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

IK to FK switch snapping issue

tevin93
Advocate

IK to FK switch snapping issue

tevin93
Advocate
Advocate

hello

 

I have been working on a animation where I have the character pick up a cup from a table. In the anim I animate and interact with the cup in IK then move the hand and pick up the cup in FK.

 

the problem I have is that you can clearly see the switch as the arm switchs from IK to FK.

 

I've tried to smooth the transition and make the transition happen over 4 or five keys or putting the arm in position first then switching in the pose when it picks up the cup. but the arm breaks especially at the wrist.

 

Any help would be amazing thank you 

 

https://drive.google.com/file/d/19DxfS7kblA0XYUM0Xw-A3XMFKYjLpQ2v/view?usp=sharing

 

IK_FK_Switch snapping.png

 

Ive attached a short video of the switch and a picture of the rig breaking

0 Likes
Reply
881 Views
27 Replies
Replies (27)

mcw0
Advisor
Advisor

If you are using a blend over a number of keys, this will always be an issue.  Might I suggest doing a switch at a single frame instead of a blend over a number of keys.  And in your case, going from IK to FK is easy.  All you have to do is at the frame of the switch, match the rotation values of your FK to the IK.  No pops.

0 Likes

tevin93
Advocate
Advocate

Yeah I've tried that to match the rotation values and switching on a single key but there is still popping in the arm and I've flattened or smoothed out the keys so that theres no hitches in the graph editor even deleting keys to make sure theres no keys stacked on top of each other but again theres still popping you can try download the folder i provided you might have better chance of figuring it out unless theres something I'm doing wrong

0 Likes

tevin93
Advocate
Advocate

Yeah I've tried that to match the rotation values and switching on a single key but there is still popping in the arm and I've flattened or smoothed out the keys so that there no hitches in the graph editor even deleting keys to make sure there no keys stacked on top of each other but again there's still popping you can try download the folder I provided you might have better chance of figuring it out unless there's something I'm doing wrong

0 Likes

mcw0
Advisor
Advisor

How have you implemented your IK/FK switching?  Do you have separate IK and FK joint chains going through a blendColors node controlled by a switch attribute?

0 Likes

tevin93
Advocate
Advocate

 

I'm sorry I didnt understand any of that. if you mean do I have a IK and FK switch in the channel box that connected to a separate control then yes Ive tried deleting keys and zeroing the attributes but I always get the pop  in the forearm and Bicep....I've even deleted the keys on those on the shoulder and elbow control  the key that switches from ik to fk 

 Screenshot 2024-12-23 041005.pngScreenshot 2024-12-23 041042.png

0 Likes

mcw0
Advisor
Advisor

If both the IK joints and the FK joints match in rotation values, then the problem is how those values are being applied to your bind skeleton.  I would select the bind joint and see what the rotation values are.  Also, if you could post a screen grab with that bind joint selected, showing the channelBox, that would be helpful.  Or you can graph the bind joint in the node Editor.  Find how the bind joint is driven.  How the rotation values are being set.

0 Likes

tevin93
Advocate
Advocate

I'm not sure these screenshots are what you meant by the bind joint I'm not familiar with this rig or much of rigging but these are screens shots of the upper arm(shoulder joint), elbow joint and wrist joint all of which are screenshots of before and after the switch from IK to FK along with the values in the channel box it might be easier for you to see for yourself from the folder link I provided if you have maya 2023 as the rig only seem to work on that or higher...on the upper arm joint there is a difference in rotation values but when i try to make the the same it just reverts back to  what it was ...sorry if this doesnt help Shoulderupperarm joint frame 55Shoulderupperarm joint frame 55

 

Shoulderupperarm joint frame 56Shoulderupperarm joint frame 56

 

Elbow joint frame 55Elbow joint frame 55

 

Elbow joint frame 56Elbow joint frame 56

 

wrist joint frame 55.png

 

wrist joint frame 55wrist joint frame 55

 

0 Likes

mcw0
Advisor
Advisor

In the attributeEditor for both the upperArm and the elbow, there is a connection to "offsetParentMatrix".  That is where the problem is.  You need to select that node and graph the inputs in the NodeEditor.  See what values are present and how they are controlled.

0 Likes

tevin93
Advocate
Advocate

I've never used the node editor or done any of what your mentioning you will have to either show me or tell me in the simplest way step by step  how to do any of that. Ive takenscreen shots of the offset matrix for frame 55 and 56 for the shoulder and elbowShoulderupperarm joint frame 55Shoulderupperarm joint frame 55

 

Shoulderupperarm joint frame 56Shoulderupperarm joint frame 56

 

0 Likes

mcw0
Advisor
Advisor

To do a switch you have to check on the same frame.  Select the upper arm joint and switch from IK to FK at frame 55.  You don't care about frame 56.  At frame 55, there should be no shift in the pose when you switch from IK to FK.  If there is, then there's a problem.

To track the problem, keep the upper arm joint selected and open the Node Editor.  It's under the "Windows" menu on the menu bar.  Click on "Windows" and in the drop down menu, about half way down, you will see "Node Editor".  Click on that.  Since it's most probably your first time, the upper arm joint should appear in the Node Editor window.  

Screenshot 2024-12-24 101025.png

To it's left should be the multMatrix node, in your case, it will be named something else.  But it's still a multMatrix node.  And that is connected to the joint's offsetParentMatrix.  If your joint is still selected, shift select the node to it's left which should be the multMatrix node, click on the number "3" on your keyboard to expand the nodes.  Now you can see a detailed list of plugs.  And you can see what is connected to what.
Screenshot 2024-12-24 101113.png

To the left of the multMatrix node, you will see its inputs.  Most likely, those will be the nodes that affect your rotation.  Select each of those nodes and inspect their rotation values.  They should match.  If not, then this is where your problem is.  They need to match.

If by chance those inputs do not have rotation values, then continue tracking inputs by selecting those nodes and clicking on the icon circled in green in the above image.  Continue this process until you find 2 nodes that have rotation values.  I hope this makes sense.  Good luck.

0 Likes

tevin93
Advocate
Advocate

i think Ive done what you mentioned correctly. if it is correct.

 

the node in the white box is the upper arm joint: TheInterview_Rigging:upArm01_r_skn

first node frame 55_2.png

 

first node frame 55.png

 

 

 

the boxes in red have 0 rotation values

 

the boxes in yellow all have different rotation values to TheInterview_Rigging:upArm01_r_skn (node in white box)

6th node yellow frame 556th node yellow frame 55

 

7th node yellow frame 557th node yellow frame 55

 

8th node IK Controller yellow frame 558th node IK Controller yellow frame 55

 

0 Likes

mcw0
Advisor
Advisor

Please select TheInterview_Rigging:upArm01Skn_r_multmat and track its inputs.  You are looking for an IK and an FK node that connects as inputs to compare rotation values.  And it should only be for the upArm, no hands.

0 Likes

tevin93
Advocate
Advocate

these are the nodes I've been able to find that are linked to TheInterview_Rigging:upArm01Skn_r_multmat that seem to be associated to the upper arm

 

The nodes in the yellow box's offset parent matrix rotations match, but not all of their translate attributes match in the offset parent matrix. The same nodes, the two nodes in the green square's transform attributes rotation values and their offset matrix values match, both match, with one seeming to be keyed.

 

The nodes in the red box their attributes  all match

Screenshot 2024-12-27 043621.png

0 Likes

mcw0
Advisor
Advisor

Since we know TheInterview_Rigging:upArm01Skn_r_multMat is connected to the upper arm skin joint, all we want is to trace back the inputs to TheInterview_Rigging:upArm01Skn_r_multMat. In your image, it's only showing a single input. There should be at least one other input. Please select the multMat node and graph the inputs. Ideally there will be an FK and an IK connection.  Trace the inputs until you find both an FK and an IK node that have rotation values that can be compared.   Ideally, they will be uprArm _fk and uprArm_ik.

0 Likes

mcw0
Advisor
Advisor

Alternatively you can try selecting the ik and fk joints directly. Copy and paste the following into the script editor window and hope we are lucky.

 

select -r TheInterview_Rigging:upArm_r_ik;

 

select -r TheInterview_Rigging:upArm_r_fk;

0 Likes

mcw0
Advisor
Advisor

Just thought of another way to approach this.  Let's see what the fkik switch is connected to.  Copy and paste the following into the scriptEditor window and run it.  

Then after running this code, open the NodeEditor to see what it is connected to.  Hopefully it will be a blend node of some sort.  Actually, there will most likely be at least a couple.  One for the upper arm and another for the lower arm.  And maybe a third for the hand.  The upper arm blend node's inputs should be the FK and IK nodes we have been searching for.

 

 

string $attrs[] = `listAttr -ud "TheInterview_Rigging:armSettings_r_ctr"`;
for($attr in $attrs)
{
    if(`gmatch $attr "f*"`)
        break;
}
select -r `listConnections -s 1 -d 0 ("TheInterview_Rigging:armSettings_r_ctr."+$attr)`;

 

 

 

 

 

0 Likes

tevin93
Advocate
Advocate

I put this script into the scene script editor and the node in the green box is the only one that showed up... I then clicked on input and output connections and there are a lot of connections but these ones that I have moved and shown here are the only ones I could see connected that related to the upper arm as well as the multimat node as well

 

the node called TheInterview_Rigging:upArm01_r_skn had rotation values of  =rotate x: -61.059

                                                                                                                                             rotate y: -69.35

                                                                                                                                             rotate Z: 80.894

the nodes in red box all had a rotation value of rotate x: -12.952

                                                                                      rotate y: 0.000

                                                                                      rotate Z: 0.000

 

 

 

string $attrs[] = `listAttr -ud "TheInterview_Rigging:armSettings_r_ctr"`;
for($attr in $attrs)
{
    if(`gmatch $attr "f*"`)
        break;
}
select -r `listConnections -s 1 -d 0 ("TheInterview_Rigging:armSettings_r_ctr."+$attr)`;

Screenshot 2024-12-29 054909.png

0 Likes

mcw0
Advisor
Advisor

Thank you for posting that image.  I think we are getting somewhere.  I should have thought of this before.  Please select the ikHandle.  The grey node in the red enclosed area.  The startJoint of the ikHandle is the IK joint for the upper arm.  And the corresponding FK joint control for the upper arm is "TheInterview_Rigging:uprArmFk_r_ctr".  At least I hope so from the name.  The IK upper arm joint's rotation will be the result of your IK hand control and the pole vector.  And since you are transitioning from IK to FK, we don't need to worry about this joiint.  Just note the rotation values.  The FK control for the upper arm must match these values...at frame 55.

Screenshot 2024-12-29 000739.png
The rotation values on TheInterview_Rigging:upArm01_r_skn should be 0, 0, 0.  This rig is a bit sloppy.  But matching the FK upper arm control to the IK upper arm joint's rotation values should do the trick.

0 Likes

tevin93
Advocate
Advocate

yeah this rig was created by either Lupin House or Firelight Studio for their competition that I tried to submit this anim for but I missed the deadline twice because of this issue so it became a personal project hopefully to use for my portfolio 

 

hopefully, these screenshots help as far as observing the rotation values a lot of the nodes are connected to many different other nodes so it is quite difficult to find or track their connections and for it to be remotely organised 

Screenshot 2025-01-01 182326.pngTheInterview_Riggingarm_r_ikhTheInterview_Riggingarm_r_ikhTheInterview_RiggingupArm_r_jntTheInterview_RiggingupArm_r_jntTheInterview_Rigging:upArm01_r_sknTheInterview_Rigging:upArm01_r_sknTheInterview_RiggingupArmFk_r_ctrTheInterview_RiggingupArmFk_r_ctr

0 Likes