Blender to Unreal Engine 5: Complete animation workflow

Animation & Rigging

Note: The solutions presented here also solve the problem of: “Unreal Engine sockets scale things up and make them very huge.”

01. Making Sure Of Unreal Engine’s and Blender’s Scaling Systems Match

When a skeleton imported into Unreal Engine from Blender, root joint is up-scaled by 100. This is due to Unreal calculate its units in centimeter, whereas Blender does it in meters. I will be talking about this issue in detail in the third section “Unreal Engine: Root Has Incorrect Scale Issue: A Deep Dive” but to avoid any enormous object appearances in Unreal, we should go to Blender’s “Scene Properties > Units” and set the unit scale value from 1 to 0.01 before we even begin animating and more importantly before we rig (attach the bones to our mesh). Because if the mesh is already rigged, and if we follow this produce, the moment we scale up/down our meshes the origin point of the mesh will get super messy.

After setting up the scale of the scene, we should select everything in our scene, press “S” to scale everything again and type 100 to get back them to their original scale.

If we need to summarize what we did here:
  • Changed Blender’s World Unit to Unreal’s World Unit to make them match their unit scaling
  • This change scaled our mesh down by 100. To return our meshes into their original state, we scaled them up 100 times.

The important thing here is not the mesh’s original scale, but making sure of that Blender’s world unit and UE’s world unit match.

02. Before to start animating, make sure the origin of your objects are at the center of the world and activate “Fake User”

Set the 3D cursor in the middle of the world and set origin to the 3D cursor. Everything’s origin should be centered here and aligning witch each other both the skeletons/rigs/meshes.

Activate “Fake User” in the action editor

If you already animated everything without setting origin point of the mesh at the center of the Blender’s world, you’ll realize that you can not change the location of the origin. Technically you can, but the moment you play your animation it’ll go back to where it was before or it’ll break the animation completely. So it is important to place the origin before to start animating.

Why does this matter?

If you ever brought a mesh into Unreal Engine, whose origin point was not at the center of the Blender’s world, you’d know the mesh you brought in is floating and you need to manually move it to put it back to the right place. It’s kind of hard to explain without demonstrating it in a video, but it’s always good to have all of your meshes origins at the same place so when you import them into Unreal, everything is located at exactly how they were located in Blender. If this part is hard to grasp, just let me know in the comments so maybe I can upload a GIF later.

What can we do if we already animated our mesh to change the origin then?

I strongly suggest just starting from scratch. Based on my experience, it always breaks something. I am not 100% sure if it’s the next step that causes the majority of the issues, but I encountered animations not looping properly (For example; in my scene as you can see in the screenshots I have a hand gun and arms. At first, the animations would play in sync, and then they would de-sync and start going through/glitching into each other in Unreal, even though everything was perfectly fine in Blender. After applying the principles that I mentioned here to this animation, everything just played perfectly.)

If you are okay with manually adjusting the location of the mesh you imported and do not mind encountering “socketing” issues, you can still go with it. But let me underline it again, I advise against it.

What does “Fake User – Save this data-block even if it has no users” in Action Editor do?

I suggest leaving this option enabled (by default it is disabled) if you want your animation to be exported properly. I haven’t look into deeply why it is happening exactly, but Blender sometimes does not assign the keyframes and when you export your animation in the FBX format, some of the keyframes or in some cases the whole animation is missing. Activating this option makes sure of that every keyframe is exported.

03. Apply All Transform On EVERYTHING

This part is very very very important. As we can see in the following screenshots, my arm mesh and arm armature has different values for their scales. For animation to work properly in Unreal, location, rotation and scale values of the armature and the mesh should be matching. To make them match, we should click on the mesh and the armature by one by => Hit “Ctrl + A” and apply “All transforms”.

Arm Armature Values in the Item Panel
Arm Mesh Values in the Item Panel

After we apply all transforms:

At this point, we are ready to start animating. Since this is not a “How to animate?” tutorial, I won’t be diving into that . So when you are done with the animation part, we can move onto the next step.

04. Blender to Unreal Ideal Export Options

Under the Geometry tab, set “Smoothing” option from “Normals Only” to either”Face” or “Edge”. I always go with the “Face” option but setting it to the “Edge” option seems like doing the same thing too, which is: Correcting the normals for Unreal. If you ever imported something from Blender to Unreal, I am pretty sure you faced the following error message:

“No smoothing group information was found in this FBX scene. Please make sure to enable the “Export Smoothing Groups” option in the FBX Exporter plug-in before exporting the file.”

Setting smoothing option to “Face” or “Edge” fixes that.

Under the armature tab, we’ll uncheck the “Add Leaf Bones” options. This option generates extra bones that Unreal does not need and, actually leaving this option enabled causes problems in Unreal Engine, since it generates new bones and changes the hierarchy of the bones that we created. (Blender adds these newly generated bones at the bottom or at the top of the armature, when this option is left enabled.)

Blender to Unreal Ideal Export Settings

Underneath the “Bake Animation” tab, we’re gonna deactivate NLA Strips, and Force Start/End Keying but leave “Key All Bones” and “All actions” enabled.

Leaving all of these options enabled creates animations that we don’t need some of. For examples; still/”blank” animations. If you have a complicated animation, drop the “Simplify” value to 0 and set the “Sampling Rate” to 0.1. I already explained what these values do here, but if I need to summarize it quickly, both of these options check the animation you created and get rid of similar key points to optimize the animation. On theory it works, but most of the time it gets rid of the keyframes that you actually want to keep. I suggest setting the “Simplify” value to zero and adjusting the value of “Sampling rate” option depending on the requirements of the projects. To learn more about it, you can refer to this post.

If you leave “Add Leaf Bones” option enabled, such problems will be present in Unreal.
Unchecking “Add Leaf Bones” option fixes all of these issues

Leaving “Key All Bones” and “All actions” enabled sometimes still bring into Unreal those still animations we mentioned about earlier. In such case, I advise checking which animations are the ones that you want to keep, and which ones are the ones that you do not need, and delete the ones that you don’t need.

Extra note: When I bring a mesh or animation to Unreal, I uncheck the “Create Physics Asset” option on the menu that pops when you drag and drop the FBX file to Unreal, if I won’t need it. It’s just a small tip, if you like keeping things organized. I suggest always using the “Import” button rather than “Import All”. Don’t exactly know what causes it, but in the past “Import All” button prompted problems when I brought animations into Unreal. Let me know if you encountered similar issues. I could look into it and see what might be the exact issue but so far didn’t feel the necessity to do it, considering that it could be a small bug.

Unreal Engine: Root Has Incorrect Scale Issue: A Deep Dive (Optional Read)

Now we’re going to talk about something very very common and weird and happens almost all the time when we export meshes/animations from Blender and import them into Unreal. To demonstrate the issue, I’ll be going to my “FPS Blueprint” template and replacing the default FPS arms with the arms I created.

The arms are placed as expected.

Now, I’ll be assigning the animations that I created for them.

So far so good.

And the problem will begin when I create another skeletal mesh (which is going to be the sidegun I modeled). Let’s see how that one will go:

I was expecting the sidegun to be placed inside of the hands, just as in Blender. But… What’s going on here? (If I set the location and rotation values to 0, and the scale to 1 1 1, it will appear inside of the hands by the way.)

But the problem does not end with that. When I attach the animations to it, things get even weirder:

The gun disappeared??? Well, actually it did not. It’s position and scale changed:
But why? Why is this happening?

If we check transform properties of the mesh, we’ll see that, some values in the location window are off. (But even then, these values DO NOT represents the actual current location of the mesh. And when we check the mesh scale, everything actually looks alright in that regard?

The problem is in the bone, that is at the of the hierarchy. Let me show you what I mean:

Inside of my “Content Browser” in Unreal, I’ll find the skeleton of my gun, which is named as “lets_test_it2_Cube_003_Skeleton”. If I open this skeleton in the “Skeleton Tree” displayer and select the top bone, I’ll see something very weird:

You can press on the yellow marked area, if you can not see the bone hierarchy of your skeletal. By default Unreal opens to “Asset Details” window.

If we check the scale of the skeletal, we’ll see that, it’s set to 8.559013 rather than to 1. 1. 1. This could be a small mistake that we did in Blender and remember, the bigger issue began when we assigned the animation to the gun. Let’s find that animation file and investigate it this issue further then:

The root bone’s (It was renamed as Root1 by Unreal at the beginning, just an extra note, so everything is normal in that regard.) scale looks fine here. But what if I go, and investigate the parent bone?
A-ha! We found the problem. When we apply this animation to our gun asset, it plays the animation as we want Unreal to, and as the information represented in here, Unreal scales the object in 99.999992 x 100 x 100 in its respective axis.

But we didn’t want any of this. Why is this happening? What can we do to stop Unreal scaling our parent bone x100?

The problem is that, Unreal calculates its scenes in centimeters, while Blender does it in meters. If we go to Blender’s “Scene Properties” and set the “Unit Scale” from 1.0 to 0.01, our Blender project file and Unreal’s unit scaling parameters would match:

This is the workflow I follow whenever I need to animate something in Blender and bring it into Unreal and the experience was as smooth as a butter since I figured out the compatibility issues and how to ease them between these two softwares. Blender is a great software, and it’s integration with Unreal has improved tremendously since I’ve started using it so if the experience was a bit rough, I can definitely understand that but I do believe Blender is getting better everyday and it’ll just be a lot easier to use in the future regarding importing/exporting stuff to and from other softwares.

Let me know if there’s any part that confused you or calls for further explanations. Other than that, happy Blending!

Leave a Reply

Your email address will not be published. Required fields are marked *