Jump to content
Hash, Inc. Forums
mtpeak2

TSM2 FK-IK Switch Update

Recommended Posts

Here is a zip file. It contains an import model to update existing TSM2 rigs, for seamless fk/ik switching for the arms. It also contains an updated leg script, to allow seamless fk/ik switching for the legs and an import model to update the TSM2 rig, for both the arms and legs. These import models update the constraint setup of existing relationships of the TSM2 rig, so you MUST run the rigger before importing these models. The scripts are not capable of creating these poses.

 

For arms ONLY, import the update model into an already rigged biped character and save.

 

For the legs, the script is for newly rigged models, then import the update model after running the rigger. Save model.

 

 

If you want to update the legs of existing models, you will need to make a duplicate bone of the "1 right foot IK control" (NO CHILDREN), make it a child of the "1 right foot control" and name it "1 right foot IK control target". Do the same for the left foot. Once you created these bones you can import the update model. (See Image)

 

[EDIT] I posted new versions of the import models, v13-v14 and a v15 versions. These deal with the "Error Loading String" issue in the realtionship names.

TSM2_Update.jpg

TSM2_Switch_Script.zip

Share this post


Link to post
Share on other sites
Here are 2 zip files. One contains an import model to update existing TSM2 rigs, for seamless fk/ik switching for the arms. The other zip contains an updated leg script, to allow seamless fk/ik switching for the legs and an import model to update the TSM2 rig, for both the arms and legs. These import models update the constraint setup of existing relationships of the TSM2 rig, so you MUST run the rigger before importing these models. The scripts are not capable of creating these poses.

 

For arms ONLY, import the update model into an already rigged biped character and save.

 

For the legs, the script is for newly rigged models, then import the update model after running the rigger. Save model.

 

 

If you want to update the legs of existing models, you will need to make a duplicate bone of the "1 right foot IK control" (NO CHILDREN), make it a child of the "1 right foot control" and name it "1 right foot IK control target". Do the same for the left foot. Once you created these bones you can import the update model. (See Image)

 

 

Could you make a vid tutorial

Share this post


Link to post
Share on other sites

I posted new versions of the import models. In v13-v14, the relationship names have an "Error Loading String" in it, but in v15 they don't. So the zip file now contains both versions, ones with errors and ones without, for the arms and legs.

Share this post


Link to post
Share on other sites
Could you make a vid tutorial

You know my answer to that question.

 

It's not that difficult to do.

Share this post


Link to post
Share on other sites

Hey Mark, do you think there's a way to fit a middle state in the IK-FK thing?

 

This would be "elbow K" where the elbow keeps a fixed position and the shoulder and upper arm move to match it, much like the upper arm and lower arm move to meet an IK hand target in regular IK.

Share this post


Link to post
Share on other sites

I'm not sure I understand what you are trying to do?

 

Would aiming the elbow controller at a target do what you want?

Share this post


Link to post
Share on other sites

Just aiming the elbow controller won't do it, partly because it can't pull the shoulder into position.

 

This is for shots where one has elbows on a table. The spine or hands can move about ( within limiits) and the elbow stays put on the table surface.

 

 

 

Translate constraining the FK upper arm (Which does pull the shoulder) to an external null at the elbow point gets an approximate effect but not as solid as a real IK structure.

Share this post


Link to post
Share on other sites

I'm guessing this is what you want?

 

This will require a few additional bones and a rewrite of the arm script. I haven't tested how this will affect the regular FK/IK setups. It will take some planning to get everything working together.

tsm.mov

Share this post


Link to post
Share on other sites
I'm guessing this is what you want?

 

This will require a few additional bones and a rewrite of the arm script. I haven't tested how this will affect the regular FK/IK setups. It will take some planning to get everything working together.

 

That's essentially it!

 

In actual practice the lower arm would need to be not affected by the movement above the elbow and the null that defines the elbow pivot point would need to be pose-able to the place where the elbow skin contacts the table rather than at the actual bone joint.

 

But you have the core concept correct there.

 

 

This isn't an emergency need of mine so don't drop whatever else you are doing to do this, but this is something rigs are being expected to do more now these days.

Share this post


Link to post
Share on other sites

It should be doable.

 

This setup will also have to be an import model. The script won't be able to do it.

 

Now is this something you want to work while in FK or IK or both?

Share this post


Link to post
Share on other sites
Now is this something you want to work while in FK or IK or both?

 

Actually it would be a third mode that you switch to instead of the other two.

 

I sort of envisioned it as being a center position on the same slider between FK and IK but I don' know if that's feasible. Or maybe it's a new position beyond either the FK or IK positions?

 

One slider is better than two.

 

If you always had to switch to one of those before you turned on ElbowK, I guess it would not matter which since it is so easy to switch IK FK anyway.

Share this post


Link to post
Share on other sites

It's proving to be a bit challenging, but I think I'll eventually get it.

Share this post


Link to post
Share on other sites

It seems to me like there ought to be a way to use the existing bones, but... I suppose that once that Shoulder-Upperarm set becomes an IK construction it would need some sort of pointer like the elbow or knee has when an arm or leg has the usual IK arrangement.

Share this post


Link to post
Share on other sites
excuse me -

does this apply for Eugene?

 

If Eugene is rigged with TSM2.

Share this post


Link to post
Share on other sites

I believe Eugene (at least the Eugene's I've seen... the ones on most A:M CDs) is rigged with the 2001 rig.

If someone rerigged him with TSM I don't believe that version has been shared yet.

Share this post


Link to post
Share on other sites

Eugene (the skeleton?) Would be an easy re-rig since he doesn't have any skin that needs to be weighted between two bones.

 

If you haven't done a TSM2 rig yet he would be a good starter example.

Share this post


Link to post
Share on other sites

I have it working pretty well ONLY if the upper arm in NOT translated in FK or IK. If it is translated, the control bones start losing their positions when switching between setups. I think the problem starts with the arm bone aiming at the upper arm. I don't think there's going to be away around that, except if I change how the original setup works. I could probably get it to work if I use a shoulder control bone, rather than using the translation of the upper arm. I'm thinking TSM2 users wouldn't like the change though. I'll keep working at it and see if I can still work around the problem.

Share this post


Link to post
Share on other sites

It seems to me that since we can turn off and on any and all constraints with poses this should be possible.

 

But like I say, don't put off anything pressing for this. This is a back burner type item.

Share this post


Link to post
Share on other sites

I know all about turning constraints ON/OFF, but aim at constraints, in combination with other constraints, do not like to play nice when trying to create a seamless switch.

Share this post


Link to post
Share on other sites

It seems I got just about everything working together, according to my tests. The only thing that doesn't work is the arm stretch pose. I'll look at that tomorrow. So far I only had to add 5 bones, for the right arm, to get the setup to work and quite a few constraints. All the bones are duplicates of existing bones, so rewriting the script, to add them, shouldn't be a problem.

Share this post


Link to post
Share on other sites
Eugene (the skeleton?)

Oh man, thank you for that. I was wracking my brain yesterday trying to remember what the name of the skeleton model was!

Share this post


Link to post
Share on other sites

Well I spoke too soon. There still is an issue with the aim at constraint setup of the TSM2 rig. Since the FK/IK setups of the TSM rig can be translated to position the shoulder, it causes the elbow IK setup to jump when switching. I can't figure out how to fix this with the existing setup. I'll keep trying to figure it out.

Share this post


Link to post
Share on other sites

Well Robert, I've come to the conclusion that the elbow IK won't work in the TSM2 rig. I would have to redsign the whole arm setup.

Share this post


Link to post
Share on other sites

i toyed with it a bit, but nothing robust yet.

 

Is there a way to turn "attached to parent" on and off?

Share this post


Link to post
Share on other sites

Here's the closest I've come. As you can see, the shoulder jumps when switching from elbow IK to arm IK (frame 19 to 20). The switch between arm IK to arm FK has no issues (frame 29 to 30). I thought it had to do with the aim at constraints, but as you can see in the mov, the control bones are in the correct position when switching. I've looked deeper into the rig and it seems to be the inter arm bone setup causing the issue.

tsm2.mov

Share this post


Link to post
Share on other sites

Well I haven't changed anything in the setup, but you can get it to work, not perfectly though. If I convert the FK arm keys to the IK elbow, things work smoother, though you will get the shoulder animated during the supposed FK animation. I also had to force keyframe the torso, so it didn't have any movement during the supposed FK animation.

 

The first part of the animation is the converted FK, then it's switched to the IK elbow, and finally to IK arms at the end. As I said, there is movement in the shoulder during the FK and IK arms, but that's something I don't think I can get rid of.

tsm3.mov

Share this post


Link to post
Share on other sites

W O W ! ! !

 

Just discovered this. Bit late...

 

This is simply AMAZING. the old switch was SOO annoying most of the times. To have this seamless switch is PRICELESS!!!

 

THANK YOU SOOOOOOO MUCH!!!!!!!!

 

Elmi.

Share this post


Link to post
Share on other sites

Yes, thanks again, Mark, where ever you are!

Share this post


Link to post
Share on other sites

Wasn't the old switch a pose slider from 0(FK) to 100(IK)...?

 

Yes.... and that's exactly what I was JUST thinking......

Share this post


Link to post
Share on other sites

BTW, this FK-IK switch add-on that Mark made... still works great!

It is a genuine boon to animation!

Thanks, Mark!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...