Hello everyone! I’m a beginner in animation. This is my first post here, and I’ll try to express my thoughts, but they may be a bit chaotic, so I apologize in advance. I’ve looked through a lot of discussions but haven’t found a more or less detailed guide on the existing approaches to animation and how to use them. For over two weeks now, I’ve been trying to achieve realistic movement of a humanoid character using animation. If I’m mistaken about something, please correct me, as I’m just learning.
Studying the options on how to achieve this, I’ve realized that there are several main approaches to animation:
There are 2 main approaches to character movement:
-
The first one uses object movement through code/physics (transform/Rigidbody), and character movements are controlled through code, while animation plays independently of the movement and does not affect it.
-
The second approach uses animation for movement (root motion), and transitions between animations are used to make it walk, stand, or walk slowly. By adjusting the animation, we adjust the movement.
There’s also a mixed approach that switches between 1 and 2 depending on conditions.
The method of movement itself (root motion) can be further divided into 2 main categories:
- The first is FK, i.e., animation based on ready-made animation clips (here I include Mecanim and other assets like MxM or Animacer).
- The second approach is based on IK, where limbs are controlled directly through code and scripts (here I include Unity’s Rigging as well), and essentially we need to animate the character in code.
There’s also a hybrid approach, but as I understand it, it’s simply logic that switches between IK and FK at certain times.
Besides all this, there are different ways of movement: 8-directional or straight, but with torso rotation.
As an example of the result I want to achieve, I took a video from the Unity Addiction channel:
In my opinion, this is quite an impressive result, and I want to achieve at least something similar.
What I’ve achieved so far:
I’m using the root motion approach and would like to implement everything using Unity’s built-in animation system, Mecanim (despite all its drawbacks, I think it’s possible, though I could be wrong). I’ve also studied John Mac’s series of tutorials on creating an animation controller (I think it’s a pretty powerful starting point). In the series, he uses the root motion approach without using custom IK. (For now, let’s simplify the directions of movement and leave only forward movement.)
And finally, we come to my problem, based on the fact that I can’t seem to eliminate foot sliding at the start and end of walking (these are my personal improvements).
The main problem:
(At the start of walking) The problem is that the position of the feet when transitioning from one animation to another may not match the position of the feet in the second animation. And when transitioning from idle to walk, instead of the left foot staying in place and the right one moving forward, the right foot moves forward, while the left one moves backward, making it look like we’re walking on ice.
(There’s also a problem that we can start with either the left or right foot, but for now, I’m not considering this issue (let’s assume we always start with the left foot).)
To solve this problem, it was decided to find additional “start walk” animations where the foot is on the ground, and the transition looks like this: idle → start walk → walk, and it already looks good. (But here, too, there are problems, which we’ll talk about later.)
(At the end of walking) Here it’s a bit more complicated: if when transitioning from idle to walk we could choose to start with either the left or right foot (and we chose only one option), then here we have the concept of “step phase” (correct me if there’s a more correct term). We can have at least 4 foot positions (left forward, left supporting / left forward, right supporting / right forward, left supporting / right forward, right supporting), and there’s also a step length parameter that further complicates things.
And so, we need to write a system that will analyze the position of the feet and, depending on these parameters, choose one of several transitions.
But even after writing such a system, I still can’t achieve an acceptable result; incorrect transitions still occur somewhere and sometime. The question is as follows:
- Can someone correct my logic/theory I’ve outlined so that people who are also just starting their path in animation would have some guidance or materials?
- Most likely, I won’t be able to achieve a fully acceptable result using only the animation approach, or will I (I don’t know)? And I don’t want to use purely IK, as I want to leave the option to change animation clips for walking. So, do I need to use a combination of animation and IK, or can it still be done through animation? What do you think about this?
Thanks in advance for your response.