1 Tutorials LightWave 3D Simple IK Chains Qua Jan 26, 2011 3:17 am
Admin
Admin
by Joel B Fant and William "Proton" Vaughan |
Part I: Preparation Hi folks, welcome to a tutorial on simple IK chains. I'll be assuming that you have worked with LightWave enough to know how to get around fairly well. We'll be using a scene and object supplied by William "Proton" Vaughan for this exercise. The following is a link to the source files in ZIP format. ik_proton.zip Inverse Kinematics is goal-driven. You set the hierarchy chain (bones or objects) to try to meet a goal object. You set the items in the hierarchy to follow the goal, and the solution will try to place that item's pivot as close as it can to the goal object's pivot. You can also set multiple items in the hierarchy to follow different goals. Ok, let's get at this. Open up Layout if you haven't done so already, and clear the scene if it is not. Add the ik_proton.lwo object into the scene. The object already contains skelegons, so use Convert Skelegons into Bones and we'll have some bones to setup for an IK chain. If you're unfamiliar with it, Convert Skelegons is found under the Items tab > Add > Bones menu. Now we have 12 bones to adjust settings for. Start with the bone named Base: select it, and open its Item Properties panel. Set the Bone Weight Map to the map named "Base." You won't need to mess with any other settings. Continue up/down the hierarchy, and set the weight maps for bones Rope01 through Rope09 to the map named "Rope," and set the weight map for the Rock Bone to the map named "Rock." I bet you already figured that out, though. If you'll notice, there is a small bone called Tip Bone at the end of the chain, and it's outside of the object itself. For this bone, turn Bone Active off. It will not serve to deform the object at all. Since IK will try to match the pivot point of the goal-seeking item to that of the goal itself, we do not want the large Rock Bone trying to match the base of the rock to the goal, but rather to match the top of the rock to the goal, hence the sole purpose of Tip Bone. Let's go ahead and create a goal object before we do anything else. Create a null and name it Goal. Now move it 2.5 meters up the Y axis at Frame 0. This way, when we fully activate IK and the IK chain snaps toward the goal, it will stay in the same position. Soon we'll start setting up the IK chain of the bones. I'm going to do this somewhat backwards, to show why certain settings do what they do. Select the object named Goal. It should already have a keyframe at 0. Go to frame 30, and move Goal to about 1 meter on the Y axis, and 1.5 meters on the X axis. Create a keyframe here. Now, also go to frame 60, and create a keyframe with Goal at 0 on the Y axis, 0 on the X, and about 1.5 meters on the Z axis. This will be a simple test animation for seeing if IK is working properly or not. Return the timeslider to frame 0.Part II: Setting up IK Ready to set the goal-seeker? Select Tip Bone, and open its Motion Options panel. For Goal Object, select the object named Goal from the drop-down. Move the timeslider forward and then back, and you should see a dotted line appear between the pivot of Tip Bone and the pivot of Goal. Scrub through the animation, and you'll see nothing happens. That's normal so far. Select the next bone in the hierarchy, Rock Bone. In the Motion Options panel, go to the tab marked Controllers and Limits. You'll notice that each rotational controller is still set to Key Frames. Change the first one, Heading Controller, to Inverse Kinematics. Scrub through the animation again. Still nothing happening. Go back to Tip Bone, and select the IK and Modifiers tab of the Motion Options panel. Turn on Full-time IK, and scrub through the animation again. This time the rock should look like its trying to follow the goal, but only on Rock Bone's Heading axis, making the rock bend backwards. Go back to the Rock Bone's Controllers and Limits settings, and change the other two controllers to Inverse Kinematics as well. Now the rock will lean to the side, and sortof roll around to the back. Now set all the other bones to have Inverse Kinematics as their Heading, Pitch, and Bank Controllers. Don't do this to Base Bone. Leave those Controllers set to Key Frames. If you set them to Inverse Kinematics, that bone will also bend around, thus bending the metal anchor the rock is tied to, and we don't want that anchor to move. Also, don't mess with Tip Bone's settings, as changing its controllers will have no effect. Now scrubbing through the animation, you'll see everything bending properly to follow the goal. The scene file ik_proton.lws is an example animation by William Vaughan using this same setup, if you'd like to look at that and see how one might use this setup. |