Jump to content
Hash, Inc. Forums

IK/FK Switch thought...


3DArtZ

Recommended Posts

Hey guys, so, I've been knocking myself out trying to work through what I suppose is potential smart easy way to handle a pure on off IK/FK switch and as far as I know, it is currently not possible to do in software.

But for anyone interested in killing a few moments to read here is the idea....

1. have regular arm bones, shoulder, bicep, foream, hand.

2. have normal IK set up.... hash 2001 style.

3.have ON/Offpose called IKpose, where the IK constraints get activated.

4.have ON/Offpose called FKpose where the FK stuff gets activated.... basically just locking the bones

but with this addition.

Constraints that manuvuer the ik bones to exactly where they WOULD be if you were moving the arm via

IK.

Now, we animate.

1. at frame Zero turn on FK. at frame 15 position arm.

2. Hit Button(this does not exist right now) that forces the positional data of the arm bones to a key frame..(ACTUALLY this would be embedded in both poses so that it would be a seemless action, but happen evertime you turned one on or off)

3. turn off FK

-arm stays exactly where it is because the ind. bones are keyframed.

4. turn on IK. Arm stays exactly as it is. Becuase the IK bones were piggy backing on the fk bones movement, when IK turns on it turns on where FK left off.

5. go to frame 30 and position via IK.

6.Hit this imaginary button again, all the bones involved have their position made official with a keyframe

7. Turn off IK

8.turn on FK and position bone as it was at frame Zero to frame 60.

 

Play animation. The movement goes off with out a hitch or skip and it totally seemless.

I know this becuase I have done exactly this, but I had to force the key frame. On a large model, that would not work because every item would get keyed, opposed to just the desired bones.

 

I've been sorta kinda asking the hash guys to add this Extremely simple(NOT in a programming sense, I have no clue about that, but in an EndUser sense)

but very useful item but have yet to hear back.

Anyone have any thoughts on why this would not be a great addition?

I can post a sample of what I was talking about if anyone is interested.....

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

  • Hash Fellow

If forcing a key on just certain bones is the issue ( not sure I read it right) you can CTRL-select any arbitrary set of bones in the PWS and force a key on them.

 

If the bones had some clever naming convention they could be easily found with the selection filter (tiny triangle at top of PWS)

Link to comment
Share on other sites

Okay okay, welcome to my insanity!

First of all, I got a nice note from the hash guys about the idea.....Thanks, I feel real now!:)

 

Here are 2 vids that demonstrate what I'm talking about about.

this is just a quick example.....

from 0 to 15 FK

from 15 to 30 IK

from 30 to 45 FK

 

http://www.vrcops.com/Vids/Fk-IKVidA.mov

http://www.vrcops.com/Vids/Fk-IkVisabilityA.mov

 

What can you guys make of this? Does anyone see an advantage over blending? I think fewer bones and easier setup are the first issues....

But again, it can't be done right now without forcing the key frame....

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

I've often wondered what the big advantage is of having a complex constraint system on the arms. AM's native implementation of IK and lockable bones works really well when doing the IK to FK switch.

 

Here's a quick example - the section where the arm is red, is IK. I used a simple pose switch to show/hide the bones, and would have used it to turn on/off the bone locks, but there seems to be a problem with doing that currently.

 

There are no constraints involved so setting keys is painless.

 

So, what is it I just don't get?

 

VIDEO updated.

 

Phil

fk_ik.mov

Link to comment
Share on other sites

Phil, right, I think I'm coming from your school of thought on this.

But the reason why I had been pestering with making the keyframe thing automatic is because people probaly would not want to get involved with manually hitting the keyframe.

 

I actually could see myself making great use of the setup as is and I wouldn't have to get involved with setting up a relatively more involved blending pose.

 

The main advantage to making a auto keyframe maker is to keep from havin to put a keyframe on the whole model or going in and keying branches or ind. bones.

 

But yes, I say down with complex. After all, it is basically how your model is posed at specific points in time.

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

Sounds like what we need is a "smart" keyframe button.

 

Keys would be set only if several conditions applied.

 

 

IF

1. Translation/rotation/scale values have changed from the previous keyframe.

AND

2. These values did not match the existing interpolated value between existing keyframes.

THEN set the key for that value.

 

Then there would be no need to select bone/branch/model and key type. :)

 

To simplistic/ignorant? :unsure:

 

Personal bad monkey slap.

 

Phil

Link to comment
Share on other sites

I probably don't completely understand what you're saying, Mike. However, my thinking was that if you have an IK arm setup, an FK arm setup and the bones that are tied to the actual geometry, then, make the IK hand controls available in FK it would make the arm positioned pretty much where it needs to be when you make the switch. You would probably still have to adjust the elbow in the IK pose, but it would be very doable. That's what I did in Squetchy Thom.

 

Like I said, I may be misunderstanding what you're trying to do.

 

 

------------------------------------------

EDIT

------------------------------------------

 

I forgot to mention, the IK hands can be turned on in the "Arms" tab using the "IK_right/left_hand_control" while in FK...if you have IK on, they are on automatically.

Link to comment
Share on other sites

David, hey....

Hmmm, I have to take a look at your set up.

Are you saying that you can hop between Ik and Fk without blending?

next, before I get a look at your set up, the difference initially is that you would only need your geometry bones and your IK setup without an extra set for the fk....

 

I don't know, maybe I went the wrong way here, but I don't think so.

If one could fire off keyframes for preflagged items and embed that in a pose, setting a pure on/off switch for IK/FK would be a very light easy to make setup....

 

Mike

Link to comment
Share on other sites

Are you saying that you can hop between Ik and Fk without blending?

 

You can, but, you would most likely need to adjust the elbow...there's a control on the wrist point toward the back for that. What you would do is enable the IK hands while in FK, position the arms how you want (moving the IK hand controller to where the hands are located since they will stay in place but still orient the hands unless you do), then, switch to IK arm controls and tweak as necessary to match the position...it shouldn't be too much tweaking. The IK/FK switch is a slider, so, it should be easy to blend if it's needed as well.

 

next, before I get a look at your set up, the difference initially is that you would only need your geometry bones and your IK setup without an extra set for the fk....

 

There are geometry bones for everything, an IK bicep and forearm, an FK bicep and forearm and the hand control has an IK, FK and geometry set of bones unto itself. The hand bones are all tied to the arm using "translate to" constraints to targets on the ends of the forearms.

Link to comment
Share on other sites

I went back and tried the FK/IK switch using Squetchy Thom and found that the only movement I got (when the arm was positioned correctly) was the difference in the arm from the FK to IK poses in the default positions...which could be corrected in the pose for the IK arms if you were so inclined. Although, a good way to get around that would be to move the arm in FK to close to where you need it, go to the keyframe you want the IK to start (it would make it easier if you use the IK hand controls in FK), position the hand/arm in IK and allow the slider to blend between the two over that amount of keyframes.

Link to comment
Share on other sites

Splinesmith, thanks for the info. I've seen the tute.... I believe that is also a blending with 3 arm chains.

 

My whole battle charge has been an on off function over the same frame with a very light bone set up.

 

No matter though, cause a function would have to be added to the software, and I don't think that can happen over night!

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

I apologise if I've got the wrong end of the stick here, but are we talking about an IK rig which has an IK target at the root of a hierarchy, or just a simple IK chain which is automatically implemented in A:M when bones are attached to their parents?

As far as I'm aware there's only one way to switch between FK and an IK target, and that is through keyframing and blending.

I've tried to set up a rig which had the IK target automatically follow the FK bones, so there wouldn't be any need to position and key the target when the time came to switch, but it's never worked successfully.

There is a certain other program which has this ability to jump from FK to an IK target seamlessly, is that what you are after Mike?

Link to comment
Share on other sites

I know I'm not quiet understanding what you are wanting. But when I set up my FK/IK on/off pose I do it by putting IK constraints on my bones and in off having them enforced to 0% (I have my hand bone orient like my IK null, and the forearm is IK'd to the null at the wrist). Then when I want to switch to IK from FK I just drag my null to where the hand bone (FK) is, orient it like the hand bone and flip the switch, it's pretty close and then I can fiddle with it to get it smooth. I think I'm understanding that you want that last bit(move null and orient like hand) automated?

 

Could you just do this with another pose, where the IK bone is translated and oriented to the hand bone until you hit the on/off then the hand bone is oriented like the null and the forearm is IK'd?

 

Is this something you work with a lot? Seems like a lot of rigging and set up, might take less time to just tweak the animation to match.

 

Anyway, good luck.

 

-Alonso

Link to comment
Share on other sites

I've tried to set up a rig which had the IK target automatically follow the FK bones, so there wouldn't be any need to position and key the target when the time came to switch, but it's never worked successfully.

There is a certain other program which has this ability to jump from FK to an IK target seamlessly, is that what you are after Mike?

 

Right, you are on the right end of the stick I think. There is blending which what everyone seems to use, usign the 3 chain set up.

then there is the philosophy of the "keyframe".

I set up the rig so that the IK bones would follow as they would if they were in control of the arm(refer to 1st video), so that when they turn on they are in the identical spot and no arm jump and way fewer bones.

BUT, they keyframe issue is the missing link. You have to manually put it in and that's what I was trying to see if I could get added to the app. Presently you have to hit the make keyframe button. which you'd either hit the whole rig system with a keyframe(overkill) or you would have to go after the branch of the ind. bones..... tedious.

 

Mike Fitz

www.3dartz.com

 

 

Is this something you work with a lot? Seems like a lot of rigging and set up, might take less time to just tweak the animation to match.

 

Anyway, good luck.

 

-Alonso

No, the opposite... if they keyframe feature was in the software as suggested above, setting a pure ik/fk on off pose would take not but a few moments and way less bones and constriants.

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

. turn on IK. Arm stays exactly as it is. Becuase the IK bones were piggy backing on the fk bones movement, when IK turns on it turns on where FK left off.

 

I set up the rig so that the IK bones would follow as they would if they were in control of the arm(refer to 1st video), so that when they turn on they are in the identical spot and no arm jump and way fewer bones.

 

Now that is a GOOOOOOOOOOOOOOOOOD idea!!!!!!!

 

Blending between IK and FK (as I do in much the same way as Stephen has described) makes me break out in a cold sweat. If I could just turn it on... and the IK hand stays there...........

 

oooh baby

 

That would rock!!!

Link to comment
Share on other sites

I "think" I just came up with a solution to what you are trying to do. I've setup a 2001 rigged model that when in FK mode position your arm and then you force key on the hand target for the IK setup, switch to IK and the arm stays in position. Change frames and position you hand target where you want it and then force key the forearm bone, change frames again and switch to FK and the arm is in position. The key to making this work is removing the orient like constraint on the bicep and placing a translate constraint on the hand target to the hand while in FK mode (off) and turning the enforcement to 0% in IK mode (on). You will also need to remove the hiding of the geometry bone in the on/off pose so you can position the elbow with the forearm and force keyframe. I can post a model for you to try.

 

Here's a test clip, you can see by the left arm when the FK/IK is turned on and off.

Link to comment
Share on other sites

Hey Mark, I'm psyched you've taken a jab at this. If anyone can get something worked out on this,

I bet you could.

But, I think the best response to this is

"Where's the solution?"

you still hit the wall where I did, forcing the keyframe.

Actually you have a few extra steps involved. In my current set up, you can turn the control on and off on the same keyframe.

 

Let's take the IK bones following the fk bones.... they have all the positional data in them while piggy backing ont he fk bones. Select an IK bone and hit R, you'll see all the positional data greyed in the channels.

But trick now has to be to be able to feed that data to the bone, to make it official... to make it key frame, so that when all the contraints are switched, they bones don't jump back to their default.

Ok, so in a nutshell, figure a way to make the piggybacking bones data official inbetween the pose switch.

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

Mike, in this setup there is 1 on/off pose, no hinge setup (even less setup and bones) and no IK bones, just geometry bones and a hand target. The forced key frame on the forearm and the hand target is the same thing as hitting your imaginary button you are using, I am only keying 1 bone per switched setup. Are you saying you want this done automaticly when the pose is turned on/off without hitting an imaginary button or the force keyframe?

Link to comment
Share on other sites

Right, I was saying that it would be useful to have a function(expression) or something that could trigger the forced keyframe other than hitting in manually as it is now.

 

Even with 1 pose holding the set up, you can't feed the bone data. Or maybe you can, I just have not been able to see a way....

Link to comment
Share on other sites

How's that merged "SuperRig" going guys? I want Mike Fitzgerald, David Simmons, and Mark Skodacek to put together an easy-to-control, IK/FK switched, automatic heel-raiser, face control, hand control, and whatever else it is Robert Holmen and Zach Brewster-Geisz want, and I want it SOON. We need to start TWO character tests.

Link to comment
Share on other sites

Martin, it would be nice to get a list from Robert and Zach, so we know what they want put into it. IK/FK switching or blending? There's a big difference between the two. Blending is not a problem, switching is not, unless you want it automated.

 

Mike with the setup I have, geometry and hand target ONLY (there would be no tranfer of bone data to the IK/FK setups, because there is none), create 2 on/off poses (FK/IK) as you did and by using an expression with get chortime or what ever it is on the forearm and hand target, can we then gain the tranform data (chortime will give you up to date data in an action or choreography, correct) that we need to position the bones in each on/off pose? Assuming we can't put 2 expressions in 1 pose and the on/off property doesn't cancel the expression, you can then create a new on/off pose that toggles the 2 setups on/off. Don't know enough about expressions to know if it would work. What do you think?

Link to comment
Share on other sites

Man..... we are either talking about the same exact thing or we are talking about apples and oranges!!!!!!!!

:blink:

I just don't know.

I have not taken a look ChorTime function as I don't think it will do what I was saying....

but in trying to keep track of what we are all talking about, I'm not totally sure what my name is anymore!!!

 

Maybe we should exchange some files? Either way, I can't get to it tonight and tomorrow is sunday.

So I'll be watching football. Go Giants!

 

But, back to this again.... The setup you are now using that doesn't use bones other than the geomerty and hand target.... is it usable in animation? did you set it up with limits and such?

 

Also I am thinking that you have things working up to the keyframe point....

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

I setup a model from the cd, right arm only, to see if I can get it to work (quick experiment) but it's pretty easy to set up. I haven't had time to test whether it would work for the legs, tomorrow. I can send you the model for you to look at and test to see if this is what you are after, but I guess it's up to Robert and Zach to make the final call, FK/IK BLENDING or SWITCHING. Switch is going to take more time since we are still trying to figure it out.

Link to comment
Share on other sites

Also I am thinking that you have things working up to the keyframe point....

 

If the ChorTime function works the way I'm hoping, there would be no need to keyframe anything, because it would get the present (up to date) transform data to position the bones. But as I said, I don't know enough about expressions to know if this will work. Hopefully someone with more knowledge of expressions will chime in. David, any thoughts on the matter.

Link to comment
Share on other sites

Mike,

 

I just watched your movies and read though the thread, very slick set-up you have there. I know you want to make it seemless but just curious as to how many keyframes you had to set?

 

Is it just a matter of keying a couple branches? If so maybe you could just make a pose that toggles the visability of the bones so they would be easy to key.

Link to comment
Share on other sites

Hey David, that's actually not a bad thought considering what we can achieve at present with the software end of producing the keyframe.

Also, I think If I keep the shoulder bone visible, using the "key branch" might actually include all the bones that would need to be keyed anyhows....

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

Here's a thought for the auto forced keyframe, how about a new option in the constraints that you can turn on/off that will force the keyframe on the constrained bone before the enforcement turns to 0%. The transform data is there, because we can manually do it, the constraint tells which bone to force the keyframe. In my setup, in FK I have the hand target translate to the hand then I have to force the keyframe on the hand target to keep it in position when I switch to IK. Then in IK I have a kinematic constraint on the forearm to the hand target, with this new option on, it would force the keyframe on the forearm to hold it's position (force a keyframe) when I switch back to FK and the arm will stay because the forearm will dictate the arms position. In Mike's setup I assume he is using orient like constraints on the arm bones, this option would work for that setup too. In my opinion, this is the best place for this forced keyframe option to make it fully automatic, even if we have to create 2 on/off poses, all we would have to do is create a 3rd on/off pose that toggles to 2 pose. Does anyone have a better option? Bob could that be done?

Link to comment
Share on other sites

I asked Bob Croucher to read this thread, and Mike's email about "auto-keyframing when IK/FK switch occurs." Hopefully, he can come up with something.

 

NIIIIIIIIIIIIIIICE!

 

 

I think this will give us the best IK/FK switch out there.

 

Mark, once we have the feature of calling a keyframe it can be set up any number of ways, including what you suggested.....relationships, poses, expressions(hopefully...)

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

Hi,

 

I think everyone's problems would be fixed if every constraint could automatically bake its values onto the current frame whenever it was triggered from the ON state to the OFF state.

 

I don't know if this would break any current rig or setup. I don't believe so. It could be made optional, but my first impression, is that, I can't think of any time in which you WOULDN'T want this. Kind of makes me wonder why I didn't think of it before.

 

The feature in itself is not that difficult, and doesn't present a high risk for newly introduced side effects, although there is always some risk. Can it be whipped in there quick enough for the TWO rigs? That is a good question. Do I dare do it in v12, which is released? Or do I settle for v13, which won't even go Alpha for a while yet? These are questions which can only be answered in a company meeting with the Grand Puba present of course. I guess we'll find out soon enough...

 

I have always been talking about an easier way to attach and unattach FK and IK rigs. I am glad that all of your discussion and hard work, trying to improve the rigs, and software, has led us here.

 

Thanks,

Bob

Link to comment
Share on other sites

Hi,

 

I think everyone's problems would be fixed if every constraint could automatically bake its values onto the current frame whenever it was triggered from the ON state to the OFF state.

 

 

Sounds like a great idea! :D

 

This should also fix a lot of the issues that occur between actions during transitions.

 

--On second thought, how will this help during a FK to IK switch? The IK target null will still need to "jump" to the new bone location created during the FK animation.

 

Phil

Link to comment
Share on other sites

 

--On second thought, how will this help during a FK to IK switch? The IK target null will still need to "jump" to the new bone location created during the FK animation.

 

Phil

 

Hey Phil, actually I'm a bit in the shakey phase when reading this too,but to ans. the question about the

IK target..... if set up properly it will be constrained to the hand bone during fk, and during ik the hand will be constrained to the ik target so that they are allways in the same place reguardless if in IK mode or FK.

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

 

--On second thought, how will this help during a FK to IK switch? The IK target null will still need to "jump" to the new bone location created during the FK animation.

 

Phil

if set up properly it will be constrained to the hand bone during fk, and during ik the hand will be constrained to the ik target so that they are always in the same place regardless if in IK mode or FK.

 

Mike Fitz

www.3dartz.com

 

Agreed, but it won't help with the default AM2001 rig that most users are going to start with.

 

How about a "target" property for nulls that targets a bone like distorts do? With it on the null stays with the bone at all times, but is overridden by relationship driven constraints.

 

Phil

Link to comment
Share on other sites

Um...... why not?

I use the IK set up from the 2001 rig.

All you'd have to do is add the missing constraint pose.

 

Mike Fitz

www.3dartz.com

 

Adding a new constraint to the existing system is probably more then most new users would be able to handle.

 

Phil

Link to comment
Share on other sites

Phil the rig can be updated and posted to the forum. And then it would be on the next cd upgrade.

 

Who's going to volunteer to update ALL the existing available models? I'm not trying to be sticky about this, :) it just seems like there's got to be a better way to go about it.

 

That's why I made the "target" suggestion, it would be simple for users to select the null and set it to target the hand or whatever bone in their existing models. It should work with any existing rig that used nulls as targets to drive bone position/rotation.

 

Of course, I may be ignoring a basic reason why it would not work. :lol:

 

Phil

Link to comment
Share on other sites

I think it would be easier to add a couple constaints than to add another feature? element.

 

You don't have to dump the whole rig, you just have to add a pose.....

But again this is all based on the key frame issue being resolved.

 

Mike Fitz

www.3dartz.com

Link to comment
Share on other sites

--On second thought, how will this help during a FK to IK switch? The IK target null will still need to "jump" to the new bone location created during the FK animation.

 

With Mike's setup, there are constraints with the opposite ON/OFF state from the ik, which make the target follow the branch when IK is OFF. This also needs baked when it turns from ON to OFF.

 

Mike: One small item. With two separate poses, there is risk of having both ON at the same time causing circularities. I think it simplifies the usage of the rig, if there is just one pose called say IK Arms. Then have the different constraints turn ON/OFF, or OFF/ON when the pose is ON/OFF. I hope this makes sense.

 

I have begun testing this feature. I am having quite a difficult time with the timing. We must do the bake when everything is positioned as it was, but the constraint being turned OFF must be OFF already so that the results go into ordinary channels. I am sure I will get it right, but it is a little more tricky than I had hoped.

 

Bob

Link to comment
Share on other sites

--On second thought, how will this help during a FK to IK switch? The IK target null will still need to "jump" to the new bone location created during the FK animation.

 

With Mike's setup, there are constraints with the opposite ON/OFF state from the ik, which make the target follow the branch when IK is OFF. This also needs baked when it turns from ON to OFF.

 

Mike: One small item. With two separate poses, there is risk of having both ON at the same time causing circularities. I think it simplifies the usage of the rig, if there is just one pose called say IK Arms. Then have the different constraints turn ON/OFF, or OFF/ON when the pose is ON/OFF. I hope this makes sense.

 

I have begun testing this feature. I am having quite a difficult time with the timing. We must do the bake when everything is positioned as it was, but the constraint being turned OFF must be OFF already so that the results go into ordinary channels. I am sure I will get it right, but it is a little more tricky than I had hoped.

 

Bob

Bob, everything you wrote makes perfect sense.

I seperate the poses to keep the circularities from hitting eachother as you are seeing.

If you want to set this up into one pose, have the 2 seperate poses then create one pose that calls to

both the poses at oppostie extremes of the pose but it has to be percentage so that the software is

forced to acknowledge a point in time when both systems are off.

 

Mike

Link to comment
Share on other sites

So let me get this straight. What we're talking about now is the following work flow:

 

1. Animate the FK arms as usual; say, put Shaggy's hand on a door knob.

2. Now, click the switch to go to IK; and the bones will all stay _exactly as they were_, including the arm bones?!

 

Because if there's any sort of a jump, the transition is still a problem. Better than the current Hash rig, but not as good as it could be.

 

That's why I like to use IK/FK *blending*, not switching, and maybe I should have been more clear about that. The transition is still manual, but it can be animated, at least.

 

But if on/off switching can be guaranteed to be perfect, then I'm all for it.

Link to comment
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...