View Full Version : FK to IK Instant Switch
12-03-2004, 01:50 AM
Hey, I been asking and looking all around for anyone who may know or has created an instant FK to IK and IK to FK switcher. I am using the Package Man setup but I want to make a change.
I am not looking for how to blend the two, what I want is a script that will say take my IK arm that has been animated into a different position, and with run of a script, switch to the FK arm and put it in the exact same location as the IK arm was.
An example of what I am looking for is in the LowMan rig (http://lichiman.aniguild.com/index.php?mod=lowman). He has a button that can instantly switch the two which I think would be great so I don't have to overlap and blend the two arms.
But the problem is that the script is commented or barely commented in spanish and it makes things very hard to find what is what because of naming and variables and such.
I asked him if he had a script that would work for another character rig, he said no and right now doesn't have the time to write one.
So I am looking for something that will do the same if anyone has any ideas? I don't know of any other rigs that can do this so or are documented so I can alter to fit my rig. I can code, but I don't have the time or the skill right now to code this. So I was wondering if anyone else had any ideas
Thanks a lot for your time!
12-03-2004, 07:10 AM
Maya should have a buildt in IK/FK blending switch when you create an IK chain, is that not what you need?
12-03-2004, 08:03 AM
no, that isn't what I am talking about
I have the skeleton all set up so it can blend between ik and fk ... but as you know if you move the IK arm into a location and blend to the fk, the skin moves to where the fk arm. So say that your ik arm is raised and your fk arm is lowered to the characters side, when you blend, the skin of the charcter's arm is now moving top to the bottom, understand.
what I am looking for is a script that will immediately take the fk arm and put it in the same exact location so there will be no need for blending it will be perfect switch over with no noticiable movement in the arm to the other one, same goes from going from fk to ik
I know how it should be done in theory, the math to match where each joint is and then do the neccessary move to the same postion. Just dont' know how it is done
12-03-2004, 10:11 AM
Hey scottiedoo, don't know if this is perzactly what you're after but couldnt you orient constrain the fk to the ik joints and have an attribute on the ik controller to switch the constraints on and off?...dunno...
Which one is bound?
12-03-2004, 10:22 AM
Yeahhhh, I thinkkkk I get what you're talking about. But I still think that should take care of it, are you using an older version of Maya that doesn't have the buildt in switch???
Because what sumdumguy is suggesting should work, and I believe that is the way that buildt in switch works. I believe... You have one set of joints which has the skin bound to it.
Then, you have your IK and FK joint chains. The third joint chain (with the skin bound to it, and isn't FK or IK), then has each joint point and orient constrained to the corresponding joints in both the FK and IK joint chains. This way you can have your FK/IK blend attribute (a float value, ranging from 0 to 1), controlling the point and orient constraints of each chain. So say, when the IK blend attribute is 1, it tells the point and orient constraints for all the joints in the IK chain to be turned on, and the constraints on the FK chain to be turned off. Set to .5, and they are both turned on and the third joint chain, with the skin bound to it, is midway between both of these IK and FK joint chains.
At least that's the way I remember a similar switch I made for a spline IK/soft body spline IK system working. Maybe that is of some help to you, or am I still not really getting what you're talking about???
12-03-2004, 01:46 PM
seven6ty: you really don't get what I am saying do you... you may want to read a little better
I don't like repeating a third time, but I will
I DO have an IK arm, and FK arm, and a skin arm all of them are correctly set up to blend between eachother BUT like I said BEFORE is that I do not want the skin arm to move when I am switching from one to another.
I want the fk arm to EXACTLY match the POSITION of the ik arm when I switch it to fk and vice versa so there is no movement from one arm to the other. It is too hard to lay by hand one set on top of another.
here is what a fk to ik blend looks like, this is what I don't want. I want both arms to be on top of one another but when I do switch to the other with having to cause orient and point constrant problems
sumdumguy: I tried to do some orienant constrants. It works keeping the fk to the IK but I can't get the IK to follow the fk. Even if I do a point constraint on it to keep the end effector on the fk it doesn't like it causes eiether of the arms to move
seven6ty: I am using maya 6.0.1.. I do know what I am talking about and what I want. It is not built into maya not even the bonus tools, this is a more complicated thing to do I know.
thanks for your help
12-03-2004, 02:31 PM
There was some posts with code on this subject over on creaturetd. Sadly, they seem to have been eaten (there was a loss of some of their database). I think there might be one over on highend3d, though. Worth a quick look.
12-03-2004, 03:39 PM
I took a look over at highend, didn't see anything really
I studied the code from the lowman rig script that does exactly what I want so I may be able to break it down and make my own script, it's not too hard, but there are some thing that I wouldn't know how to do so it may take me some time to write it and follow how they did it.. interesting stuff..
12-03-2004, 03:48 PM
Actually, it is at high end, just found it:
Its on this page:
12-03-2004, 06:57 PM
Oh, hehehe, oops. Yeah, sorry... I was browsing the forums and posting while intoxicated last night. :)
But I also found this: http://www.katz3d.com/script.html
12-04-2004, 04:01 AM
thanks a lot for your help, I must have missed it,
I'm going to try both of these scripts out and see if they work
12-04-2004, 10:51 PM
Hey scottiedoo let us know what solution you come up with?...
It would be handy for me too
12-22-2005, 03:19 AM
Scottiedoo if you could tell us which one worked and how yo got it to work it would be great
Im having this problem
12-22-2005, 03:19 AM
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.