joshenes

Portfolio
- Demo Reel
- Gallery
- Game Specific
- 2D Artwork
- XSI->Maya
- EasyBATCH

Information
- News
- Resume
- About Me
- My Goals
- Contact

Tutorials
- SimpleFOOT
- EasyROLL
- EasyLITE
- EasyLOCK

Links
- VFS Alumni

EasyLOCK IK Hand-Locking Mechanism by Josh Enes

Locking down your IK hand, the EASY (and fun) way.

Some of you probably have your own favorite way of stopping a hand from moving around, but here is my favorite way. It lets you lock down your hand, but still be able to animate the hand bone. I will also show you how to set up some custom parameter sliders so you can enable, disable, and blend the hand lock the easiest way possible.


1 STEP 1: Ever wonder how the pros keep their IK hands locked into place? Me too, but I suppose it's something similar to this: Create a control object, constrain the arm effector's position to the control, and constrain the hand orientation to the control, then set up some way to effectively blend it. Confused? Don't worry we'll go through it step by step. If you think you understand it already you can download the finished EasyLOCK Project here. Otherwise read on and we will explore what I like to call the EasyLOCK IK Hand-Locking Mechanism (it's much simpler than it sounds).
2 STEP 2: First you will need a character to work with. Get ARM MAN here (drag link into XSI) if you don't have one, or want to use the same one I did for the tutorial. The first thing we need to do is to create a control object that we will use to move the hand around. I prefer using implicit cubes, however you may like to use a sphere. Get | Primative | Implicit | Cube/Sphere and name it something appropriate like Arm_Control_Right. Now Transform | Match Translation the implicit to the arm's effector (we will use the right arm). Then Constrain | Position the arm's effector to the implicit control. This is the usual setup for free-motion IK arms, but it is not useful if the hand must remain in contact with another object. Move the character's COG around and notice that while the hand's position is locked, the rotation is not.
YES_I_KNOW_IT_IS_MISSING STEP 3: To correct this problem we will first Transform | Match Rotation the implicit control to the root of the palm/hand bone, then Constrain | Orientation the root of the palm/hand bone to the implicit object. Move the character's COG around again. Now the hand is completely locked and the kingdom is saved... for now. The reason we constrained the root of the hand is so the locking of the hand will not interfere at all with rotation keys on the palm bone. You are free to continue animating the palm bone even after the hand is locked. To lock the hand onto a moving object simply place a null on the object and make it a child of that object, then constrain the position of the implicit control to the null.
4 STEP 4: Now it's time to set up some nice custom parameters to control all this in one fell swoop. Select the implicit control object and switch to the Animation panel (Press 2). Next click Create | Parameter | New Custom Parameter Set. Name the parameter set EasyLOCK or Hand Lock Controls or something similar. Next Create | Parameter | New Custom Parameter or simply press Shift-P. Name this parameter Enable and change the type to Boolean. Boolean parameters are either on or off and are displayed as check boxes which are easy to animate. Now create another Custom Parameter using one of the two methods you just learned. Leave the type of this one as Floating Point Number, name it Blending, and change the default value to 1. With the implicit control object still selected press Alt-Enter, this will bring up all parameters for the object including Custom Parameters. Your parameters should show up at the bottom of the window. Make sure there is a check in Enable's box. Now we have our Custom Parameters set up. By default EasyLOCK will be enabled.
5 STEP 5: There are a few ways to link the Custom Parameters to the constraints we have set up. In this tutorial we will use expressions since they are very robust. Open an Explorer window and locate the arm's effector, open up it's Kinematics | Constraints subfolder, and click on the icon to the left of the Position Cns. Right click on the green button to the left of Active and choose Expression Editor. With the mouse over the text entry area, press F12. The popup which appears contains all the top-level objects in the scene. In this case we want an object from the ARMMAN_Model, so choose that. Press F12 again, now all the objects under the model are displayed. Choose the implicit control object for the right arm. Once again press F12, now choose the Custom Parameter Set you created earlier. One more press of F12 will allow you to select the Enable parameter we created. Now click Validate, then Apply (at the top right). Now repeat these steps for the Blend Weight slider for the the Position Constraint, using the Blending parameter instead of Enable.
6 STEP 6: Now that we have created those expressions, we don't need to make them again for the Orientation Constraint on the hand root. Lock the Position Constraint window using the Keyhole icon to the left of the X. Open the hand root's Orientation Cns and place the windows side by side. The green keying buttons beside Active and Blend weight have now become equal signs, telling us they are now exactly equal to another value (our custom parameters). Right click Active's equal sign and choose Copy Animation now right click the green keying icon for Active in the Orientation Constraint window and choose Paste Animation. You can copy Expressions just like animation! Repeat the process for the Blend weight buttons. EasyLOCK is now set up and is ready to be used. To access the EasyLOCK parameters select one or more of the implicit control boxes you set up EasyLOCK on and press Alt-Enter. The parameters will appear at the bottom of the window. Before you begin animating with an EasyLOCK enabled limb, it's a good idea to save at least position and rotation key on the implicit control incase you rotate it by accident, even if you are not using animating EasyLOCK parameters for that scene. The hand/palm bone can be animated regardless of EasyLOCK's status. You should be able to animate the implicit control too, but I didn't test it. To stop the hand from moving, simply don't animate it while it's locked (linear curve). Other than that, EasyLOCK works just like a normal IK chain.
7STEP 7: Robust... sounds like a rapping robot. Get the finished EasyLOCK Project here. It includes all the files I used in this tutorial including ARM MAN, your non-edible buddy with six arms and a small animation test using EasyLOCK, showing how it could be useful to you. That's it, have fun! Once again, don't hesitate to e-mail me if you think you've found a mistake in this tutorial or if you have problems. joshenes@hotmail.com.