1 Tutorials LightWave 3D Walking Heel to Toe Qua Jan 26, 2011 3:19 am
Admin
Admin
by Jonathan West |
I am an old-skewl lightwave user. I still use older tried and true methods of doing things but I have taken to the new tools which make many of the old skewl things obsolete ie: the motion mixer and morph mixer. I was on flay today and I was looking at many of the tutorials offered for creating a good walk cycle. Man was I disappointed. I see robots, spiders, but very few effective ways of making a human walk. Sure there are good general tutorials on making a character walk but few deal with the toe. A small portion of forward motion in a human is based on our walking also on the ball of our foot during the last milli-secs of the propelling leg. It is that singular phase of our walk cycles that give us constant forward movement. If you tried walking without using the ball of your foot, your would find that forward motion is encumbered and inefficient not to mention it takes more energy to walk. In this tutorial I will show you how to fill in that gap to produce a more effective human walk cycle. First you need a character. For all training purposes I decided to use the default scene called "AdvancedCharacter.lws found in the characters directory. If you did not install the scene files onto your harddisk, you can find the scene file in the content directory on the Lightwave CD. All users of 7.X should have this scene and all supporting files. Okay now we are all on the same sheet of music. The rig is done and this is pretty much how I set up all of my human characters. Animation can be very tedious, especially if you don't know how to script or use expressions. It is a common oversight of new users to skip this very important aspect of animation. Well today we are going to use expressions to complete this project. There are 9 objects that we need to concern ourselves with:
During the rigging stage, all of the other contraints and goals should have been taken care of. Animation is best done using nulls as shown in this scene file. 1st we must decide how we want the character to walk. Depending on your needs, you may want your character to move forward and other times you may want them to just perform the motion while maintaining station. For this tutorial however, we will use forward motion. Forward motion synchronized to the ankles:
Now we have our expressions panel up. As I said earlier, I am old skewl. Some of you learned to center the hip by this method center([channelA], [channelB]). I use the other method however which is more to type but works just the same. In the channel field, scroll down to "position Z" and input this expression in the expression field: (LEFT_ANKLE_GOAL.pos(Time).z)*(RIGHT_ANKLE_GOAL.pos(Time).z)/2 All this is telling you is PELVIS_CONTROL Z position is equal to the 1/2 product of LEFT_ANKLE_GOAL Z postion and RIGHT_ANKLE_GOAL Z position. Now let's test the expression. Move the LEFT_MASTER or RIGHT_MASTER back and forward along the z axis. The PELVIS_CONTROL should always remain between the two. This is usually done with the foot controls, LEFT_MASTER & RIGHT_MASTER however if we used those controls, we would lose the influence of the ankles and the additional forward motion to make the animation realistic. You probably noticed that the stance is also a bit far back. Modify this stance by adding or subtracting a number at the end of the expression. For this tutorial use "-.05" Your expression should now look like the image above: (LEFT_ANKLE_GOAL.pos(Time).z)*(RIGHT_ANKLE_GOAL.pos(Time).z)/2-(.05) Now we need to test the expression. Select either the RIGHT_MASTER or LEFT MASTER and move it along the z axis. The hip should maintain its center. Now we have setup the means by which our character will achieve forward motion. Now to set up the feet. What needs to happen now is that the characters fore-step should start on the heel and the aft-step should end on the ball of the foot. Sound complicated? Actually it is quite simple to pull off. 1st let's setup the left Ball of Foot.
breakdown of the expression: "min(0.." restricts your pitch to values below 0. without this addition, the foot would pitch in the opposite direction when the values were inverted which they are when the feet change position. The rest of the expression takes the values of RIGHT_MASTER and the negative LEFT_MASTER and divides the entire expression by .03. The reason why you want the inverted value of LEFT_MASTER is so that it returns a negative when the value of LEFT_MASTER is less than that of RIGHT_MASTER. The division of .03 defines the amount of pitch. The smaller the number, the greater the pitch per distance between RIGHT_MASTER & LEFT_MASTER. Let's test the expression now. Select RIGHT_MASTER and move it forward along the z axis. The rear foot should begin to stand on the ball of the foot and move higher as the distance increases. This will cause the ankle to move up and forward allowing the hip to also move forward. Now let's work on the heel.
This is pretty much the same expression for the LEFT_BALL_PITCH with the exception that we don't want the value to fall below the 0 therefore we changed min to max and divided the expression by a larger value of .05 instead of .03 so that the foot would not pitch as much. Again we should test the expression to make sure it works correctly. Select the RIGHT_MASTER and move it along the z axis. As you move ahead of the the LEFT_MASTER you notice the left foot moves to the ball of the foot and as you move it behind, it stands on the heel. Now all we need to do is apply these expressions to the right side. Copy each expression and apply them to the correlating null. Once you have the expression copied you will have to make one simple modification to each of the newly copied expressions. You must swap left and right values. ie: for the LEFT_HEEL_ROTATE we have: max(0,(RIGHT_MASTER.pos(Time).z+-(LEFT_MASTER.pos(Time).z))/.05) however for RIGHT_HEEL_ROTATE you should have: max(0,(LEFT_MASTER.pos(Time).z+-(RIGHT_MASTER.pos(Time).z))/.05) Do this for all expressions on the opposite side and test the resolve. If all goes well then your setup is complete. Now when you begin to keyframe your walk cycle, the feet will automatically adjust heel to toe and you hip will move with the motion of the ankle to achieve extra forward motion to smooth step transition. In closing, this is not the best model to use when creating this type of expression as it bounces up and down when it walks however you do get the point, automation makes animation easier. The number of things you can do to make your cycles more interesting are only limited by your imagination. The foot should also stamp down on the forward step. This can be done using conditional expressions but that my friend is another lesson. |