Standing position, walking cycle, stop

Hello! I have a rigged 3D human model (with Inverse kinematics), ready for animation. I want to animate the following things:

  1. From standing position, the human starts to walk.
  2. Walking cycle.
  3. The human stops from walking.

How should I do this?

Use the NLA to put the 3 animations one after the other, and maybe use a Follow Path constraint to make your armature move along a curve, or just move the armature from point A to B if it’s a straight line?

How realistic do you want the movements? A simple walk cycle can be pretty easily done but it looks really bad. A realistic cycle requires going through the animation steps (no pun intended) over and over, adding more detail each time.

Start with the character in a standing position at frame 1. Add a keyframe to all control bones.

Go to frame 20 and slide one foot forward one step. Adjust body position forward about 3/4 as much distance. Add keyframes to foot/body control bones.

Go to frame 40 and slide other foot forward one full step. Adjust body position forward equal distance. Add a keyframe. The body should be directly over both feet as the other foot lifts to take a step.

Continue this process for as many steps as needed. Make sure you add keyframes for every adjustment of every body part!

Go through the steps again and again to improve body movements. Make sure you update the appropriate keyframes.

Adjust arm movements: left arm back when left foot goes forward, right arm follows left foot for balance, and visa versa for other side. Body goes down slightly in midstep. Knees bend slightly with weight of body on forward leg. Body leans forward slightly with each step then straightens back up when foot firmly planted.

The hardest part is with the foot placement. Heel comes down first and foot rolls onto toes and the body crosses over it as other foot is lifted heel first then toes and moves forward.

The trick is to key in the main foot/body positioning first. Use 20 frames per step if animating 24 frames per second (you can adjust the speed of the walk later if necessary).

1 Like

Thanks for the ideas!

In fact, I want the “Walking cycle” animation to keep going as long as I want.
From the perspective of the game engine, I want the “Walking cycle” to continue, as long as I press the input key: “W” key.
Could Non-Linear Animation Editor help me achieving this goal? If yes, how?

Regarding “Follow Path”, initially, I thought of making the animation happen on the spot, without moving the model in the 3D space.
Would the “Follow Path” be a better solution? Why?

oh, if it’s for a game, it’s different, I can’t tell, in that case you can’t use NLA and Follow Path, the only sure thing is that you need to prepare a walk cycle, do you know how to do without sliding?

Here is an explanation for a walk cycles, except at the end, instead of muting the root bone, bring it back and block it at its original location: https://blender.stackexchange.com/questions/159782/lego-walkcycle-sliding-problem/159796#159796

Thanks for your great step-by-step explanation of creating the walking animation!

In fact, I want this animation to be a part of a First-Person Fighter & Shooter game. So, I want this animation to be nice enough for a video-game. It doesn’t need to be too sophisticated, it is enough to not creep the players out :smiley:

The thing is that because this animation is for a video-game, the animation can last 10 seconds, but also can last 1 minute or even more. All depends on how long the ‘W’ key is pressed.

Therefore, the “Starts to walk” and “Stops from walking” animations occur only once, while the “Walking cycle” is depend on an input, and last as long as it receives this input.

If it’s for a game then it becomes a bit more complex. You need to save the different parts of the entire movement (start, left step, right step, stop) as separate actions. You will also have to pay attention to the distance for each step if you want to keep the feet from sliding, and move the root bone along with the mesh. That’s about the best I can help you with that.

Well, I haven’t encountered this problem yet, probably because I haven’t tested an animation in a game engine yet. But, in order to avoid such problems, I don’t move the root bone at all. But, this is only my opinion, I haven’t tested this tactic and I don’t know if this is the optimal solution.
I guess it is similar to your solution:

Thank you for the link with the explanation of the walk cycle, but my main focus now is how to create several animations and merge them into one, and repeat some parts of the animations (Left Step, Right Step) as long as an input is received (‘W’ key is pressed).

Thank you for your advices!

Next, I will research how to manage actions and how to loop them.

For a “Forward Walk” cycle, make a walk cycle that starts and ends in the same pose. For various reasons, I recommend making this pose the “foot forward” pose. I also recommend making sure there is NO root motion. In Blender, make sure the entire walk cycle keeps the model in the same place, despite looking like they are walking. When you import the asset into the game engine, make sure that if Root Motion is an option for importing, that it is disabled.

The NLA Animation editor, in conjunction with the Dope Sheet (Action Editor mode), lets you save Actions. Make your animations using these. If you save an action as “walk.forward”, for example, one of the animations will be “walk.forward” when imported (generally speaking).

Unity and Godot have something called Animation Blend Trees which can play animations based on inputs received from a keyboard or controller, but importing and using assets in game engines is far beyond what can be discussed in this thread. Whichever engine you’re using has documentation detailing steps to import assets, and preferred file types (FBX, collada, etc.). GL, HF :slight_smile:

1 Like

Great explanation! :slight_smile:

In fact, I made the walking cycle to start and end in a standing position. I did this, because, in my game, the standing position is the default state. From this state, the player can run, jump, or attack. That’s why, my “Walk” animation has 3 phases:

  • starting
  • walk loop
  • stop.

Regarding root motion, I also assumed that it is better not to move the root bone. Thank you for the confirmation!

Just these days, I figured out how to manage Actions, and the Non-Linear Animation Editor, thanks to this awesome tutorial:

By the way, I use the Godot engine, and import the assets in GLTF format.
Thanks for the hints about importing the animated model! :slight_smile:

1 Like

I have managed to create the complete animation, thanks to NLA Editor.
I can even loop the actions that I need:

Editor type → Nonlinear Animation → press ‘n’ key → Strip → Action Clip - Repeat [here you insert the number of repetitions]

For this, you have to have the latest version of Blender: 2.83.

But, I have to specify concretely how many times i want the action to be repeated.

Of course, this is a progress, but now, I want the ”walk loop” action to continue as long as I press an input key.

I wonder how could I do this in Blender, or, what should I do in Blender to simulate that in the game engine.