TUTORIAL: How to remove extra root bone from Blender Armature and Retarget

I want to thank and praise God for showing me a solution which I would like to share with other Blender users who may be discovering the extra root bone issue for the first time, suddenly realizing that it will prevent root animations (a very important feature for actions like climbing up a ledge)!

Firstly, you can fix this problem by simply renaming your armature inside Blender to Armature before exporting. As of 4.16, UE4 will automatically remove the extra bone on import (but ONLY if the above naming is followed!).


EDIT: As of Blender 2.93.2, the alternative solution by krisredbeard (shown below) which allows you to use ANY name for your armature and export without the extra bone still works!

Source: Prevent Blender FBX Exporter adding extra root bone – Kris Redbeard

1. Download and install Notepad++ or another editor.

2. Navigate to the “io_scene_fbx” folder in your Blender installation directory. Mine is the portable version of Blender, so yours may be slightly different: C:\blender-2.93.2-windows-x64\2.93\scripts\addons\io_scene_fbx

3. IMPORTANT: Create a back-up copy of the file “export_fbx_bin.py” on your Desktop or somewhere else in case you make a mistake or want to go back to the previous behavior.

4. Now double-click and open “export_fbx_bin.py” with Notepad++ or your preferred editor.

5. As of Blender 2.93.2, you should see the following on lines 2575 to 2577:

2575: elif ob_obj.type == 'EMPTY' or ob_obj.type == 'ARMATURE':

2576: empty_key = data_empties[ob_obj]

2577: connections.append((b"OO", get_fbx_uuid_from_key(empty_key), ob_obj.fbx_uuid, None))

6. Comment out these lines by adding a “#” at the start of each:

2575: #elif ob_obj.type == 'EMPTY' or ob_obj.type == 'ARMATURE':

2576: # empty_key = data_empties[ob_obj]

2577: # connections.append((b"OO", get_fbx_uuid_from_key(empty_key), ob_obj.fbx_uuid, None))

7. Save the “export_fbx_bin.py” file in Notepad++ or your editor.


Now, if like me, you already had your old skeleton and a bunch of animations imported into UE4, along with an Animation BP, blendspaces, etc, you will want to reuse all of that info! To do this, you will need to RETARGET. Here’s how:

  1. First be sure you have a back up of your entire project! This is SO important in case you mess up. I was able to repeat the process below multiple times because I had a backup I could keep restoring folders from.

  2. Import your new skeletal mesh in its T-Pose (IMPORTANT: You MUST export your FBX mesh from Blender with BOTH a Scale of 1 and a Delta Scale of 1. Otherwise, root motion animation will get messed up! Don’t worry if your old skeleton used a different delta scale, we will compensate for this later). Make sure to CLEAR the skeleton selection before hitting import so UE4 will actually import the new skeleton! (I also chose to import a new Physics Asset, but that was because mine had never been modified yet.)

  3. If you get this warning in your message log: “Imported bone transform is different from original. Please check Output Log to see detail of error”, you have extra “Delta Scale” applied in Blender. Go back and re-export with both scale and delta scale @ 1.0

  4. After importing to UE4, rename your new Skeletal Mesh, Physics Asset, and Skeleton as desired. Hit Save All.

  5. VERY IMPORTANT! If you have sockets on your old Skeleton, open it, and in the skeleton tab, select any sockets on a single bone, right-click and choose Copy Selected Sockets (or Ctrl-C). Open your NEW Skeleton, right-click on the corresponding bone, and choose Paste Sockets to Selected Bone (or Ctrl-Shift-V). Remove the _0 addendum from the pasted sockets’ names in both the “Skeleton Tree” and the “Details Panel”. Repeat this step for any other bones with sockets. When done, save your new skeleton, and close Persona.

  6. Right-click on your OLD skeleton and choose “Retarget to Another Skeleton”. You will get the message, “You need to close Persona or anything that references animation, mesh or animation blueprint before this step. Continue?” Press Yes.

  7. On the Select Skeleton dialog, uncheck “Show Only Compatible Skeletons”. Now, select your NEW skeleton from the list. IF your old skeleton had a delta scale of anything other than 1.0, then you will ALSO need to uncheck “Convert Spaces to new Skeleton” (otherwise your mesh will turn into a horrifying contorted monster!). Now press “Retarget”. All your animations associated with your old skeleton will now be updated to work with your new skeleton minus the extra root bone! I think it’s automatically saved at this point, but Hit Save All to be on the safe side. :slight_smile:

  8. Next, open your Character Blueprint, select your Skeletal Mesh component and update it to be your new mesh.

  9. If you had any delta scale on your old mesh, you may notice your new mesh shrink (or possibly grow!) here. In this case, don’t worry, just add whatever delta scale you had applied in Blender right here inside UE4, using the Mesh’s scale setting in the Transform tab (in my case it was 2.0). Compile and save.

  10. Now you should be able to safely delete++ your old assets (see note below). It may ask to replace references, but if they’re not referencing anything important (other than themselves) you can force delete them. ++However, if you made changes to your old physics asset and want to keep using those changes, you may want to consolidate your NEW one to your OLD one. I have not needed to myself, but you can try the following (remember to make a backup of these files in case something goes wrong!):

Select both your old physics asset and your new one with Ctrl-Left Click. Then Right-Click, select Asset Actions > Replace References.

In the Replace References dialog, select your OLD physics asset to consolidate to and click “Consolidate Assets”.

Hit “Make Writable and Delete” to remove the new physics asset, and close the dialog box.

That should be everything! I hope this tutorial helps.

-Adam

3 Likes

i really really love you man <3

Hey, so glad it was useful! :slight_smile: Have a Merry Christmas!

Awesome! It helped me a lot!!

Great to hear it worked for you! :slight_smile:

Hi, I keep getting stuck with the import error message. I’ve applied the scale and delta scale of 1.0 to my rig and my LODs. Is there a scale/delta setting somewhere else that needs to be set?

Actually, I just figured out it’s because I still had animations in my Blender export. I exported just the rig with those scale settings and it imports fine.

Unfortunately, retargetting the animation has distorted the animation a bit (there is a root motion jump which doesn’t travel as far). I tried re-exporting the animation .fbx (with the unwanted root bone and scaled to 1 just like the rig-only, but without the armature rename), but that seems to distort the mesh after retargetting.

Hi, I wish I could be of more help, but I haven’t worked with animation in UE4 for over a year, so I’m a little rusty at present. :slight_smile: Did you un-check “Convert Spaces to new Skeleton” in step 7?

Actually, it was an error on my part. I realized one of my exports didn’t scale the delta transforms correctly (I had several exports trying different things to get it work, and it was hard to keep track of all the changes between them).

I have it all working now! Thanks so much for your guide! I was stuck on this for days until I came across this :slight_smile:

You are very welcome! That’s great to hear you got it working. :slight_smile:

Muchas muchas gracias !

1 Like

Hi,
I finally solved this problem without any hassle.
If you export with the Blender “Better Fbx Importer & Exporter” addon, the “Armature” text is removed automatically.
I would definitely recommend.

2 Likes

Thank you!