FK/IK seamless switching in 3ds max 8


#1

How can i setup a leg and arm rig to be able to switch from FK–>IK. I was told i could wire their weight to a slider but don’t know how to go about the process. I’m new to rigging and would like some detailed help please.


#2

many methods for ik/fk:

blended method:

1ik chain
1
fk chain
1*deformer chain

This is where you blend the deformer chain between the ik-fk with a slider. Also you have buttons for matching the fk to ik and ik to fk.

Seamless Snap method:

Same as above but you handle the blend and aligning all in one go - you end up with two keys. It snaps the fk<->ik seamlessly.

im guessing you mean the classic three bone method, basically you make 3 chains one fk, one ik and a defomer chain. Then you put an orientation constraint on the deformer chain bones between there corresponding fk and ik bones. Then you control the constraint value with a slider.

On top of this you have two extra buttons for matching ik to fk and fk to ik. Fk to ik is pretty easy as its just three bones. With ik you also have a swivel angle so you need to make a fake swivel angle on the fk chain for the ik to snap to.


#3

Thanks Eek for taking time out to help, i’m honoured.:bounce: BTW great face rig research you are having. Still waiting for you to be done.:thumbsup: But the problem i’m having is i don’t know how to go about it. I afraid i need something more practical. If you have any link to an online tut i would be greatful. Bu if you can show me yourself that would be even great.


#4

I’ll make a tutorial for you tonight. A few questions - do you know how to make bones? constraints? and wire parameters? if not read up on theses today.


#5

Yeah i can do all of what you listed.


#6

The auto aling thing always bugged me, i had no clue how to do that, would be great if you could adress it on your tutorial aswell. thnx
Andre


#7

Aligning the ik to fk, yes its a handy trick - most people dont talk about this when building the rig its not hard to setup.


#8

Fk/IK Blended method:

I will just use bones for this, you could add shape controllers and advise you do to hold the sliders and buttons etc.
Step 0:

In the top viewport create a helpers>point object name it “root”.

Step 1:

In the top Viewport build a fk arm chain including the upper arm, lower arm and hand. With the names:

[i]“fk_upper”[/i]
“fk_lower”
[b]“fk_hand”[/b]

Make a helpers>point object, calling it "fk_lookat" select it and assign it a animation>constraints>position constraint and select the “fk_upper” bone.
Select the “fk_lookat” point object again and go into the motion>position>position>position constraint rollout press ‘Add Position Target’ and press the “fk_hand” bone.
Select the “fk_lookat” point object gain and assign it a animation>constraints>lookAt constraint. Select the “fk_lower” bone.

Create a new helpers>point object, show parameters rollout>display>box checked. Name it “fk_swivel” and align it both positionally and orientationally to the “fk_lookat” .
Select the “fk_swivel” point,change the ‘reference coardynates’ to ‘local mode’ and in ‘move mode’ move along the x axis the point away from the elbow. Link the “fk_swivel”
point object to the “fk_lookat” point object.

Step 2:

Copy this chain with the names:

[i]“def_upper”[/i]
“def_lower”
[b]“def_hand”[/b]

move it slightly down.

Step 3:

Copy this chain with the names:

[i]“ik_upper”[/i]
“ik_lower”
[b]“ik_hand”[/b]

Move it slightly down.

Run an ‘HI’ (history independant) iksolver from the “ik_upper” to the 'ik_hand" bones, call it “ik_control” .

Create a helpers>point object and place it away from the elbow. Call it “ik_swivel”

Select the ik handle (the blue cross at “ik_hand” ) and go into the motion panel>IK Solver Properties rollout>Ik solver Plane.
Click the ‘None’ button below ‘pick target:’ and select the “ik swivel” point object.

create a helpers>point object with the name “ik_hand_control” show>display box checked. Select the “ik_hand_control”, in the heirachy>pivot>adjust pivot rollout press ‘align to world’. Align the “ik_hand_control” point object to the “ik_hand” bone both positional and orientationally.

Select the “ik_control” handle and assign it a animation>constraints>position constraint, select the “ik_hand_control” point object.
Select the “ik_hand” bone and assign it a animation>constraints>orientation constraint, select the “ik_hand_control” point object.

Step 4:

Select the “def_upper” bone and assign it an animation>constraints>orientation constraint. Select the “fk_upper” bone. Select the [i]“def_upper”[/i]
[b][/b]bone again and in the motion>rotation>orientation constraint rollout press 'Add orientation target’ and select the “ik_upper” bone.

Select the “def_lower” bone and assign it an animation>constraints>orientation constraint. Select the “fk_lower” bone. Select the [i]“def_lower”[/i]
[b][/b]bone again and in the motion>rotation>orientation constraint rollout press ‘Add orientation target’ and select the “ik_lower” bone.

Select the “def_hand” bone and assign it an animation>constraints>orientation constraint. Select the “fk_hand” bone. Select the [i]“def_hand”[/i]
[b][/b]bone again and in the motion>rotation>orientation constraint rollout press ‘Add orientation target’ and select the “ik_hand” bone.

Step 5:

Select the “def_hand” bone, in the modifiers panel>modifiers list assign a ‘Attribute Holder’. Select the “def_hand” bone again and open a new
maxscript>new script. Evaluate this code:

 
 
ikfk_ca = attributes ikfk_attribs
(
parameters ikfk_params rollout: ikfk_roll
(
'ikfk_blend' type:#float ui:ikfk_slider animatable:true 
)
rollout ikfk_roll "IK-FK Options"
(
slider ikfk_slider "IK-FK Blend:" range:[0,100,0] ticks:0
 
group "Snap:"
(
button snap_fk "FK to IK" across:2 width: 65
button snap_ik "IK to FK" width: 65
)
on snap_fk pressed do
(
$fk_upper.transform = $ik_upper.transform
$fk_lower.transform = $ik_lower.transform
$fk_hand.transform = $ik_hand.transform
)
 
on snap_ik pressed do
(
$ik_hand_control.pos = $fk_hand.pos
$ik_swivel.pos = $fk_swivel.pos
)
)
)
 
custAttributes.add $def_hand.modifiers[1] ikfk_ca

Step 6:
Select the “def_upper” bone and go to animation>wire parameters…>transform>rotation>orientation constraint>orientation weight 0 then
select the “def_hand” bone and go to modifed objects>Attibute Holder>ikfk_attribs>ikfk_blend.

In the bottom left window type:

“100-ikfk_blend” then press the ‘<—’ button and ‘connect’.

In the top left window select the ‘orientation weight 1’ and in the bottom left window type:

“ikfk_blend” then press the ‘<—’ button and ‘connect’ and close the window.

Select the “def_lower” bone and go to animation>wire parameters…>transform>rotation>orientation constraint>orientation weight 0 then
select the “def_hand” bone and go to modifed objects>Attibute Holder>ikfk_attribs>ikfk_blend.

In the bottom left window type:

“100-ikfk_blend” then press the ‘<—’ button and ‘connect’.

In the top left window select the ‘orientation weight 1’ and in the bottom left window type:

“ikfk_blend” then press the ‘<—’ button and ‘connect’ and close the window.

Select the “def_hand” bone and go to animation>wire parameters…>transform>rotation>orientation constraint>orientation weight 0 then
select the “def_hand” bone and go to modifed objects>Attibute Holder>ikfk_attribs>ikfk_blend.

In the bottom left window type:

“100-ikfk_blend” then press the ‘<—’ button and ‘connect’.

In the top left window select the ‘orientation weight 1’ and in the bottom left window type:

“ikfk_blend” then press the ‘<—’ button and ‘connect’ and close the window.

Step 7:

Parent the “fk_upper”,“def_upper” and “ik_upper” bones to the “root” point object.
Align these three to the “root” point positionally. Align the “ik_swivel” point to the “fk_swivel” point positionally.

Also this is in no way a an advanced setup, its just here to help you get off the start post.


#9

Hey man, thank you very much, i will start studing this very hard now. Do u know where i can find good information about professional rigs: Im from Brazil and its kinda hard to buy one of those dvd riggin sets, also most of the tutorials i found on the net doesnt say much about the roight way to create bones ( the alinging thing with the world orientation ).
anyway thank you vety much for your help.
Andre


#10

Hi Andre,
Our upcoming RiggingPro will be available in download form sometime next week. You can already view a demo here: http://3dquakers1.com/webroot5/download.php?det=27
If you need more info, just let me know.


#11

Thanks Eek! I really appreciate it. Now to go try it out.


#12

EEk that was very nice from you, it’s difficult to find good material about rigging for 3dsmax and it seems that a lot of people don’t like to share this kind of information or something…i’m not really into rigging ( i’d like tho ) but i’m glad to see that there is people like u here! :slight_smile:


#13

Thanks for explaining it so accurately, Eek :wink:


#14

Eek, thanks a lot man, you are great :slight_smile:


#15

Hi Eek and all,

 1st, thanks for posting this.  I was about to sit down and try to figure this out myself just a few hours before stumbling on this awesome post.  Has anyone actually tried Eek's instructions step-by-step?  It's entirely possible that I'm misunderstanding or missing a step, but I've hit a snag with snapping Fk-&gt;IK.  I think that the problem is in the maxscript line "$fk_upper.rotation = $ik_upper.rotation".  Am I wrong in thinking that the IK bone's rotation isn't exposed because it's rotation is hidden by the IK solution?  Maybe we need an exposeTM helper there?  

 Thanks,

 BradT.

#16

Try using the .transform property instead of .rotation - worked fine for me here.


#17

Yup - all works fine here - bear in mind that transform will take scale position and rotation so is the quickest way to get all three. As regards the rotation of bones being hidden by an ik solver, it doesnt let you set the rotation of a bone with an ik solver but it does let you get it which is all you need for the snap.


#18

yes, ill tweak the tut. Did transform work?

Transform.rotation is in world space so that should work

rotation.controller is local space infact all controllers are in local space except constraints which are additive.


#19

Woo hoo! Using .transform made it work here. Thanks Joconnel and Eek!


#20

Great stuff - ill tweak the tut.