Trouble with Blender to UE4 animation import

Hello everyone!
I am currently experiencing a rather weird and annoying issue when attempting to import a keyframed animation in UE4. Let me illustrate my situation :

I have created a custom character, and imported its mesh and rig as a SkeletalMesh and a Skeleton asset respectively. I then imported a test “idle” animation in UE4 and it works flawlessly.
I have taken the idle pose and keyframed a run cycle (in Blender). I imagined that it would work fine in-engine, having used the same settings both in Blender and during export. However I am getting two issues with this animation.

Whenever it imports fine in engine, I get this :

The animation plays perfectly fine, but some bones are twisted, thus resulting in what you see

I modified some keyframes and attempted reimporting. And now the import fails completely, and I get this error :
Mesh contains Armature|root bone as root but animation doesn’t contain the root track.
I don’t really know what’s going on right now, so if anyone could shed some light, that’d be great.

Transforms, rotation and scale were applied in Blender, so we can rule that out.
Animation is not being re-targeted to my knowledge. The skeleton that the animation uses is set to the same one I imported in UE4 (that is also being used by the idle anim). Exporting and importing the .FBX with different scale settings always produces a broken animation (like in the screenshot). I exported using Blender’s FBX exporter. ASCII exporter produces an FBX file that UE4 can’t use

Strangely enough, importing the animation and assigning it to the Hero_TPP skeleton succeeds, but obviously produces a broken animation.

Let me add that importing the animation .fbx in 3DS Max and any other programs works perfectly fine. It’s just UE4 giving me this problem

I’ve seen sorta similar problems. I don’t know about being unable to import a version 6.1 format fbx. You can try looking here and here.

It might help if you upload your .blend file so that others can troubleshoot with the source animation.

First off, thank you very much for attempting to help!

Do you want me to include the mesh as well, or is the armature/skeleton + keyframes enough?

I’ve tried authoring other animations but only my “idle” one works. Weird indeed. Started the project from scratch and I still have this issue

I had spent a good two week troubleshooting issues with Blender export and UE4 import in search of a good workflow. As far as I’m concerned, such a workflow does not exist. I can bring custom meshes and animations into UE4, but there’s a bit of witchcraft involved to sidestep some bugs that are making fbx import less than smooth.

Upload your trouble animation. I’m guessing you are keeping separate files for your skeletal mesh and your animations, so a blend file for each animation and one for the skeletal mesh. In truth should be asking for the mesh and the animations, but I have a hunch I won’t need them.

Exactly. I have a blend for each animation, the skeleton, the mesh + skeleton, and the mesh alone.

Dropbox - Error — works fine
Dropbox - Error — does not work fine / does not import
Dropbox - Error — does not import

I’ve made a quick modification to the run file. It has a small change that I make to all my animations to get them to play correctly. The change may or may not help, but I’m guessing it’ll be good enough. Download here.

No dice.
Getting “Mesh contains Armature|root bone as root but animation doesn’t contain the root track.”

Do you remember what changes you made to the animation to cause it to break import?

No, sadly. I edited the keyframes, but I don’t know what actually caused it to break

Upload your mesh, I don’t have anything to debug without the mesh. I’ll bring everything into UE4 and try to figure out the problem.

Will do in a couple of minutes.
If it’s not too much, can I ask you to run the fix on this .blend? This one imports fine, but appears broken inside UE4.

Ok, tell me if this one work better. Download here.

So, I’ve been fighting this too. Trying to export a skeletal mesh to Blender, then export it from Blender so it can be imported back into UE4 and work with the existing animations.

There are a few issues that get in the way. Some of them are solvable, some I don’t think are with the current FBX Importer and Exporter in Blender. I’ve come to the conclusion that something in the Blender FBX Importer or Exporter messes with bone orientation. This issue has been raised with the Blender foundation, but the tickets I’ve seen all have a comment in them from the Blender developers along the lines of “this looks like a problem with UE4”. Of course, it’s not, because no other 3D package has this problem.

So, anyway, here are the issues.

First, Blender imports the root bone as the armature object. You’ll notice that the Armature (not the Armature Object) is called Root, and there are three root bones. UE4 can’t handle three root bones; it requires one.

This problem is relatively easy to fix. You can add a new root bone and name it “Root”, then parent the three existing root bones to the new parent bone. That will solve the hierarchy issue. However, if you export the model, the animations will be all wacky, with limbs flying around through space.

I’ve tried every set of import and export options and have yet to find a way to work around this. There are, however, two workarounds.

  1. Export the model, but import it into UE4 and have it then create a new skeleton for the model. You can then use animation retargeting to copy existing animations over to the newly imported model. I find this doesn’t always work, however. Sometimes, you get the same weird flying limb animations.

  2. Export the animations from UE4. Import them into Blender with the same import settings as you imported the model. The animations will work in Blender, but you’ll have to do a little work in order to be able to export them. First, you’ll need to make sure that the Action’s armature name matches the object being exported. Typically, when you import the animations into a file into which you’ve already imported [FONT=Courier New]HeroTPP.fbx (or whatever file), the new one comes in as a new armature with .001 appended to it. You need to manually change that to match the first one you imported in. You can delete the skeleton that gets imported - the action will stick around because they default in with a fake user (“F” button). You also need to make sure that you add the root bone and parent the three existing root bones to it. Finally, you need to make sure that the root bone has keyframes in the action. The easiest way to do that is to bake the action. That will create a new action with keyframes for every bone.

Once you’ve gone through those steps, you should be able to export the model and animations from Blender and UE4 will import them properly. You will either need to rotate the armature object 180° on the Z axis (Y axis in UE4), or else in the import settings specify a yaw of 180°.

Here’s hoping the Blender foundation eventually accepts that this is their problem and fixes it. Until then, it’s a heck of a lot more work to use Blender for skeletal meshes than Maya or 3DS Max or, frankly, any program that can use the official FBX SDK. :frowning:

Much better, but still has some issues. Here’s the mesh I imported in UE4 :

Dropbox - Error - .blend
Dropbox - Error - .fbx

In there you’ll find the mesh and it’s rig

A couple of notes :

  1. I imported the skinned mesh in UE4 as a Skeletal mesh. In “Skeleton” I picked “none” (so that an appropriate skeleton would be created - and it did). During import, I had to set its scale to 0.1 and yaw to 180 (because I most likely messed up placement in Blender)
  2. Rest of the animations were imported in UE4 with their scale set to 0.1 and their yaw set to 180. The Idle anim works, but the run anim does not

I think we’re having different problems, which sadly stem from common software. I’m having issues with completely custom content made by me, I’m not trying to modify existing UE4 assets
I tried re-importing the FBX files I exported both in Blender and 3DS Max - neither show signs of weird behaviour

Yes, I’m seeing some odd deformations on the mesh. Have you tried testing the animations on the mesh? Do the animations appear as they do in Blender.


Idle works fine and appears just like in Blender, fixed Run animation had some strange deformation going on at hip level in UE4 (some vertex were not reacting)

Some imperfections (clipping, smoothing errors caused by deform) might be due to the topology of the mesh as I’m still working on it - I had to make a quick change to it before readying up a UE4 version!

Unfortunately, the deformation issues are harder to debug since I’m not completely certain if those issues are caused by the fbx export from Blender. I notice that there’s some weird topology, especially near the belly that seem to spiral out. I’m not sure if that could cause an issue. Do you have a pre-triangulated mesh that I could look at?

The one I gave you was triangulated in Blender. Do you want one without triangulation?

Yes, if you have a mesh that made with quads, I can take a look at the edge loops. I’m going to be honest, I typically just import my skeletal meshes in quads and let the engine triangulate. Seems to give me the best results.

edit: So right, you may want to take another look at your edge flow and topology since that’s what may be causing those artifacts. Cleaning up those areas may yield cleaner results in engine.