1 Tutorials LightWave 3D Animation Basics: Constant Walk Cycle Qua Jan 26, 2011 3:15 am
Admin
Admin
by Chuck "webfox" Fox |
One problem with creating a walk cycle with a stationary character and no groundplane is that the feet are inconsistent when they come to make contact with the floor of the scene that they later encounter. Your walk cycle looks good as your character floats in space, but when it performs in the scene, even though you have plotted out how far to move your character, there is still slippage within the steps. Here is how I have designed a visual aid for creating a consistent walk cycle. Note that your character will always be stationary with respect to the parent null until you are ready, later, to set it in motion. Do not move the parent null or you will encounter problems. At the begining of the walk cycle, measure the distance from the tip of Toe1 to the tip of Toe2 on the X or Z axis depending on which direction your character is walking. Use parented nulls like a ruler or use the ruler tool if necessary to properly gauge the distance. From the end of toe1 to the end of toe2 is the distance of one step. We'll call it "D" for distance. (When you parent a null to the other - not parented in place mind you - the distance of the child null *is* the distance, so you don't have to do any math by subtracting the location of the child from the parent null. This makes an easy tool, as does the ruler you can add in layout. For me, this is what I've been doing and it's not big dealio to use 2 nulls.) Fig. 1 Two Nulls Used to Determine the Length of the Stride. In this case, D=951.92mm. I was really shooting for one meter, but it looked a little long in the stride for my uses, so I shortened it. My character has an inconvenient stride of 951.92 mm and 46 frames. It's no big deal and we'll work with it. Normal tutorials usually refer to 1 meter strides and 30 frame walk cycles because it's convenient. I don't have time to rebuild my scene right now. Maybe later.... I am planning to rebuild all my tutorials right after I'm finished reading the dictionary cover to cover, building a boat in my basement, and digging a moat around my home....( ie. Get what you can from this. It'll be a bit of a wait.) The reason my character is off from standard examples is because he was carrying a heavy load and moved more slowly because of it. Note: Do NOT measure from the heel of one foot to the toe of the other or you will be adding the length of the foot to the length of the stride and it will throw you off. Fig. 2 Another Angle I used a red/green walk strip object to help guide my foot strides by moving the strip a set, repeating distance under the character's feet. I made a box that was 1 meter wide (x), .3 meters thick (y), and 951.92/4 mm long (z) - or 237.98mm. The stride is 951.92mm, so, divided by 4, this gives me an even 4 blocks per stride... enough to visually support my analysis of my animation while I check for heel or toe slippage. This first block was red. I duplicated it and set it next to the first and made the new one green. Now I have a red and green block that is half as long as the stride. I used the array tool to create a long walkway for the character rather than copying, pasting, and visually re-aligning over and over. Fig. 3 Cross Section of the Walk Path in Modeler This strip, when moved 951.92 mm on the Z axis every step gives me half the distance of a walkcycle for my character. Obviously, if your character has a 1 meter or 1000mm stride, then one fourth of that will be a 250 mm block instead of the 237mm block I had to use in my scene. Just set the motion of the whole strip object to repeat after the last keyframe and keep the motion linear so that it's constant. You will have a consistent, infinitely moving walkway under your character that you can adjust the stride against. It should look like the graph in the motion below, but with 250 mm at keyframe 15 instead of 237mm at key 23 like I was using. Fig. 4 The Motion Graph of the moving walkpath. (Click for larger image) Built this way, you can see when a toe or heel is not moving at the same speed as the ground below it and will stand out against the moving differently colored tiles very nicely. It will look like this when the feet move at the same pace as the moving path. Fig. 5 Perspective Animation of Walk Path (Click for video) In any event, the ends of the path may catch your eyes, but the green/red pattern flows smoothly. When you zoom in as in Fig. 6 , you can see that the ends won't catch your eyes anymore and it appears to be a smooth, neverending, moving path. Fig. 6 Zoomed In (Click for video) This is all it takes to set up a smoothly moving path to gauge your character's feet/hooves/tentacles/whatever against. If your feet don't move at the same rate as the moving path, then the feet are not constant and their motion has to be adjusted so that they keep in alignment with the moving path. Key every frame if you have to so that the feet are constant, otherwise you'll get slippage. Now, with everything but the walk path visual aid parented to a universal null, or if you want to be fancy, parent everything to a child null of the universal null and label it "Stride_Null" or something like that. In any event, whichever you choose to move, the universal null or the stride null, it will move your whole rig the distance and velocity of the chosen null. Say your stride is 1 meter. Then move your null one meter along the axis of the character's walk cycle. The Stride_Null moves along one axis, (Z?), so, say, every 15 frames, you have one step, then Z should be incremented by D, the length of the stride (in my case, D was 951.92mm - yours may be longer or shorter) , every 15 frames. In the motion graph, if you use "offset repeat" as the post behavior for the null, it will keep adding to itself and your character will walk toward infinity without slipping its feet. (Be sure that your motion is linear or you may get jerky speed.) If you find that your feet are still sliding, then your stride isn't consistent. Kill the stride null's behavior and try editing your animation again against the moving path. Now you can drop your walk cycle into any scene. Keep proper notes in case your character doesn't walk an even meter with each step. |