For my capstone in Grad school, I wanted to combine my college studies with my personal interests. I made a goal to create a system that could solve for quadrupedal (for legged animal) leg movement that could also transition between different gaits based on the animals current velocity.
This project was a great exploration of Unreal's animation systems in C++, particularly how custom animation solvers are built. I also learned other elements of Unreal, such as adding modules to the VS solution.
prodecural animation in games is a well studied topic, but not as many games have procedural animations for animals that are not bipedal. On top of this, animals have different gaits based on both their body type, and the speed they are going. It is not as simple as CCDIK/FABRIK solvers to not represent four leg movement well because they do not respect the individual joint constraints very well (which joints rotate first?).
Through research I discovered that much of an animals body and leg movment can be reconstructed through a few rules for different parts of the body. It was decided that:
These rules are dependent on where the animals feet are in space; so it was imporatnt to figure out how the feet locations were to be found. It was concluded that the animals gait was the main determinant in when/where the feet moved .
An Example of trying to use Unreal's control rig for procedural movement; using multipbone solvers is complicated and does not produce good results
Through This picture, we show the order of operations for the Leg solve; 1. extend the should towards the location 2. place the foot at the desired location, and 3; let a single ik solve the knee.
To build this, there had to be two parts;
The solver was created in C++; a module was added to the project, and within it the necesary classes for an Unreal Animation BP Sovler node were created (FAnimNode_SkeletalControlBase and sub classes for solving parts). A custom solver node was compiled and added to the animals animation BP.
The foot location was determined by a gait system in a GaitMovement Compoenent, made in BP. This sould move scene componentes related to each foot, whose location would be passed into the animation BP to update the feet location. The results are seen in the video up top.
From this Project I was able to learn valuable understinag of the Unreal Engine, including how modules are created and how C++ integrates well with other parts.
An example of the FAnimNode_SkeletalControlBase function. It's important to implement all necessary parent classes before the solver implementation.
This is the Overview of the Gait Components' functions and properties. It has functions which determine a gait cycle as well as when to transition gaits