This post describes how to import animations from UE4 into blender, edit them and then import the edited versions back into UE4. This workflow relies on the awesome blender plugin developed by Jim Kroovy called Mr-Mannequins-Tools. This plugin takes care of almost everything especially if one wants to create animations in blender and import them in UE4 (refer to the official tutorial to see how this works Blender & Unreal | Mr Mannequins Quick & Painless Export Process - YouTube).
This plugin works with the default Mannequin character but also with the ALS (Advanced Locomotion System) character. I have looked very long for a way to do this and found nothing, hence why I want to share my findings.
Requirements
- Blender: Download from Download — blender.org
- UE4: Download Unreal Engine - Unreal Engine
- Mr-Mannequins-Tools: Download the repository as a Zip-file and import it into Blender as a plugin, GitHub - Jim-Kroovy/Mr-Mannequins-Tools: Read the wiki installation instructions for sublime character rigging, intuitive Blender imports and easy Unreal exports!
Consider supporting Jim Kroovy via Mr Mannequins Tools
Exporting animation from UE4
First, open the UE4 project you want to export the animation from. In the content browser double-click the animation that you want to edit in Blender.
In the animation editor, choose “Export Asset” and then “Animation Data”.
Choose a path to save the FBX file to (leave the settings at their default configuration).
Importing animation to Blender
Open Blender and delete the default cube. Go to scene properties and change the lenghth units to centimeters. This step is not strictly necessary since the plugin should be able to handle this but I like to work with centimeters since its the units UE4 uses as well.
If you have enabled the Mr-Mannequins-Tools plugin you should get the option to add a template from the add menu. Open the add menu by hovering over the User Perspective view in Blender and pressing SHIFT + A .
Mannequins-Tools are available. If not click “Install…” and provide the path to the Zip-file from the Github-Repository or the Gumroad page.
Next, add two Mr Mannequin Templates and place one of them five meters apart from the next one on the X-axis. This can be done by adding the first one via SHIFT+A , exiting the pose mode by pressing CTRL+TAB , then using the mouse to drag a box selection around the armature (skeleton) and![|849x880](file:///C:/Users/domin/AppData/Local/Temp/lu121885fng.tmp/lu121885fwh_tmp_b12b5e60e57acf14.png)
the mesh. After selection press G, X and then 500 to move the first character five meters on the X-axis.
Add a second Mr Mannequin Template, exit pose mode but leave it at the zero location.
The reason why we add two characters is that we need one that we import the animation onto and a second one that where we edit this animation. When selecting a Mr Mannequin Template and importing an animation from UE4, the plugin will actually re-parent the mesh of the character to the imported armature, which means that the many nice features of the template rigging system (e.g. IK bones, splines, etc.) will not be usable to edit the animation.
To make it a bit easier, re-name the template in the center to “animation_import_proxy” and the one with the offset to “animation_character”.
Next, select only “animation_import_proxy”, make sure that the armature is selected and not the mesh. Go to “File → Import → Mr Mannequins FBX”. Check “Import Actions” and select the FBX file you exported from UE4.
The template named “animation_import_proxy” should now display the exported animation.
If you select only the armature and use CTRL+TAB to enter pose mode, you will notice that the armature can be changed but the character remains in the same position. To actually edit the animation and use the plugin armature, we will now delete the “animation_import_proxy” (or hide it). After this we select armature and mesh of “animation_character” and press G, X, -500 to move it back to zero.
If you now select the armature of “animation_character” and enter pose mode via CTRL+TAB you should be able to assign the animation. To do this we change to the animation tab in Blender.
Above the timeline, change the view from “Dope-Sheet” to “Action Editor”. In the action editor choose the imported action.
It is also a good idea to rename the action (just double click it in the drop down and enter a new name). Since the animation is now being applied to the plugin armature that works different compared to the UE4 armature, some things may need to be changed. In the example animation the head of the character is looking into the wrong direction, because the IK bone is not part of the animation. To correct this, the IK bone can either be disabled or the action can be changed to account for this.
To include IK bone, make sure the timeline is at the proper point in time, move the bone and the use I to insert a keyframe for the bone.
Editing animation
The next step is to change the animation to your liking or use it as the basis for a new animation. There are very good animation tutorials available online, therefore I will not focus on this topic in great detail.
Exporting animation from Blender
With the animation done, select the armature only and go to “File → Export → Mr Mannequin FBX”. Leave all settings as they are.
Importing animation to UE4
Go back to UE4. Drag and drop the newly created FBX file into the content browser. In the import dialog, choose the skeleton of the original animation as the target skeleton, leave everything else as it is.
If everything worked correctly, you should now have the edited animation in UE4 as it was in Blender.
If you notice anything that does not look properly or some artifact from the IK bones, you can easily go back to Blender, change it, run the export again without changing any parameters and hit the “Reimport Animation” button. This literally takes only seconds and makes correcting small mistakes very easy.