Txukie/ January 24, 2017/ Blender, Gaming, Indie, Modelling, Rigging, Software, Unreal Engine 4, Workflow/ 0 comments

I’ve recently struggled more than usual to get this to work, so I’ll store it for later reference.
My sources are this great Youtube video and this post on the Unreal Engine forums.

Initial Setup

First thing to do is to correct a “feature” in Blender, the FBX export plugin adds a root on top of our armature root. That could create problems when exporting to UE4.

Python script modification
Python script and where to modify it

Under Blender/2.78/scripts/addons/io_scene_fbx/ edit the file named export_fbx_bin.py. You need to find the following section.

elif ob_obj.type == 'EMPTY' or ob_obj.type == 'ARMATURE':
empty_key = data_empties[ob_obj]
connections.append((b"OO", get_fbx_uuid_from_key(empty_key), ob_obj.fbx_uuid, None))

And comment it like so.

#elif ob_obj.type == 'EMPTY' or ob_obj.type == 'ARMATURE':
#empty_key = data_empties[ob_obj]
#connections.append((b"OO", get_fbx_uuid_from_key(empty_key), ob_obj.fbx_uuid, None))

Then, download Manuel Bastioni’s plugin from here, unzip it under Blender/2.78/scripts/addons/ and activate the plugin under File|User Preferences|Add-ons|, also make sure to save your settings so you won’t have to do this step again.

Blender Addon Settings
Blender Addon Settings

Creating a new character

On a fresh Blender file, delete the cube and set the scene units to centimeter (Metric and 0.01 unit scale).

Then, click on the ManuelBastioniLAB tab, select a preset of your liking and click on Init Character.

Configure the character as your will, the only setting that is important here is inside the Pose Tools section, where you should select the T-pose.

However, before finalizing, you need to delete the modifiers except for the armature (DO NOT APPLY ANY OF THEM).

Make sure it looks more or less like this.

Now we can click on finalize. I like to clean things up as well, and delete all cameras and lamps.

The issue that needs to be corrected now is that our character is too small, measuring only a few centimeters, so we need to scale it by 100 or so. Select everything and hit S then type 100 and press Enter. You can adjust to a correct zoom level with the Home key.

This scaling needs to be applied to the object, otherwise we will have bone weight issues in UE4. You do this by pressing Ctrl+A and selecting Apply Rotation and Scale.

We are now ready to export our character to an FBX formatted file. These are the export settings that work for me, but YMMV.

Under UE4, these are the import settings that work for me. Using this process I don’t get any errors.

Open up the newly created skeleton. There is a section called Retarget Manager where you need to select the Humanoid Rig and make sure you assign each node to its corresponding bone in your skeleton. You should do this for your source and your target skeletons. Also, make sure everything is saved.

Now, find the element that you want to retarget, right click on it and select Retarget Anim Assets|Duplicate Anim Assets and Retarget.

Fill the menu as you prefer, making sure you select your target skeleton (the one we just imported) and placing the files under our desired folder. Once everything is ready hit Retarget.

Share this Post

Leave a Comment

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.