https://www.turbosquid.com/3d-models/girl-model-1637866
Before we can use the models exported from Mixamo, we need to convert them to a format that is compatible with Unreal.
We will be using a Blender plugin called "Mixamo Converter" that contains a very usefull "Batch Convert". We just need to point to a folder and it will convert every fbx for us.
Mind the "Tranfer rotation disabled". In some cases this may be useful, but we will disable for now because it creates some problems with some Mixamo animations we chosen.
With this disabled our animations will only move straitgh forward (or left, or right etc...); but no rotations.
https://github.com/enziop/mixamo_converter
This is our folder with Mixamo exported fbx. The plugin will convert everything to that "output" folder. Be warned that the plugin does not have a progress bar. So it looks like it hanged; just wait.
Now we have everything that we need to create our project. We can start from a "black project". That will demand us to create everything. All the fun!
We will chose the C++ project to be able to customize our game using C++ later.
I have configured Unreal to use Visual Studio Code before (Edit -> Editor Preference -> Source Code -> Source Code Editor, if you wanna do the same)
Back to Unreal I have created the following four folders; to organize what we are going to do here.
I immediatelly hit Ctrl+S to save the current level.
After this we can go to "Editor -> Project Settings -> Maps & Mode -> Default Maps" and we can choose the current leval as the defaul for both the game and the Editor.
In my case I just called it "Sandbox".
Given that we are here, we can go to "Edit -> Project Settings -> Input -> Bindings" and create out input bidings.
We want W/S to walk/run; and D/A to walk sideways. Booster will allow us to unlock out "super fast run"! Probably not as exciting as it sounds...
Mind the scale chosen: from -2.0 to 2.0. This will make sense later.
Before we jump into the character creation we need to create our GameMode. We don't need to configure it yet.
Now we can start importing our model. First let us create two folders under "Character". Girl will contain everything related to this model we chosen. Mixamo will contain everything that is generic and specific to Mixamo; be it: Skeleton and Animations.
Now we can import the first model, where the girl is in the T-Pose. We will import this model to the Girl folder, because this will import the Girl model, its textures etc...
Import part here is to select "Import Mesh" and "Skeletal Mesh".
This is what we should get.
To keep things organized, let us move the Skeleton to the folder Mixamo and rename it.
Now we can start creating the Girl Character.
First step is to select the Girl Model for the Girl's mesh.
The model does not comes correctly aligned (multiple ways to fix this). Here we will just rotate the model here. It needs to be facing the blue arrow.
Then we decrease the capsule to more tigh embrace the model and we are fine.
Also create a "Spring Arm" and a "Camera" below the Capsule. Do not crate them below the Mesh.
With the character created we can go back to our "DefaultGameMode" and choose this Character as the "Default Pawn".
And choose this GameMode as the "Default GameMode" at "Edit -> Project Settings -> Maps and Modes -> Default Modes".
If we hit "Play" now, we should see our Character in its full glory. Static in its T-Pose. First milestone achieved!
We are ready to start importing our animations. We will start with the easiest one: Idle. GO back to the Mixamo folder and import the Idle fbx.
Do no import mesh. We want just the animation.
Inside the Girl folder, create an AnimationBlueprint. This will drive the model animation. Important to create an AnimationBlueprint to the Mixamo Skeleton we imported.
And create an "Blend Space" (not Blend Space 1D) inside the Mixamo folder. Also important to choose the correct Skeleton.
This will allow us the blend multiple animations together.
Inside the Blend Space, configure both horizontal and vertical axis to go from -2.0 to 2.0. (Starting to realize why our input is mapped to this range?)
From the righ pane, drag-and-drop the Idle animation to the very center of the space. You should see the Idle animation playing.
Jump back to the Animation Blueprint and dang-and-drop the BlendSpace and connect it to the "Final Pose".
Last step is to switch to the Girl Character blueprint and apply this "Animation Blueprint" to it.
If we hit play... Boom! Model animated.
We have everything in place to blend out walk and run animation.
But first go to the Girl folder and create a Struct. This will contain shared data between "Girl Character" and "Girl Animation Blueprint".
For now we just need two properties.
At the "Girl Animation BLueprint" create a variable and select this Struct as its type.
Drang-and-drop this variable as "Get" and connect its variables to the "Blend Space" inputs.
Now, we need to copy this data from the "Girl Character". To do this, go to the "Event Graph" tab, cast the "Pawn Onwer" to the "Girl Character" (better ways to do this, but this is fine for now), and copy both properties.
And switch to the "Girl Character" and react to input.
We chosen a very simple model here. We will LERP (interpolate) between where we are, and the axis value.
We don't need the "Print String" node, of course. It is there just to illustrate.
Go back to the Mixamo folder and import all other animations. Here we are importing: walking, running, strafe left, strafe right.
Deselect "Import Mesh"; and hit "Import All"
This is what you should get.
At our Blend Space, drag-and-drop these animations as below.
Hit "Play" and.... oh no. Our first bug!.
The problem here is that we exported all Mixamo animations with Root Motion. So the animation does not keep the model on its place, but we do not apply this transformation to the "Girl Character".
That is the reason of this loop.
What we need to is to tell Unreal to this for us. We can easily do this select all animations. And hitting "Asset Actions -> Bulk Edit".
Inside the "Property Matrix" we can enable "Enable Root Motion".
If we hit Play now... and we have our second bug. Now the model does not move.
We still have one little thing to do.
Go back to the "Girl Animation Blueprint" and under "Animation Preview" choose "Root Motion from Everything" and hit the "Apply" button.
Worst UI ever!
Well... what matters is now everything works.