Blender FBX and gltf exports are not imported correctly

Hi there,

fist things first I’m using Blender 2.81a and Unreal Engine 2.24.2 as well as the 1.0(beta?) of the gltf importer plugin in Unreal.

When importing the gltf file unreal strait up refuses to import animations because of “invalid joint weights”. Mesh and materials are imported just fine:
invalid-joint-weights.png

When importing the fbx file with these settings:

The import seems to work fine, but the imported animations are empty at first sight:

If you look closer you may see a tiny cube at the bottom of the thumbnail. So the animation somehow scales the imported mesh way down.
Does anybody know what to do? The mesh itself does have the correct scaling just the animations are messed up.

All the files used in this example can be found here: https://drive.google.com/drive/folders/1q1PBeQfHW_PPNW9b7DyK5Jiivc9sFvms?usp=sharing

Edit:

So I found out that the scaling problem does direct relate to the apply scalings export settings in blender:
image_183582.png

However no matter which settings I choose, I woun’t get a result in which the scaling is correct. Any idea if this is a Blender or Unreal Problem? I’ll try to report this issue to the blender community as well if I find a website where I can do that.

Thank you guys.

Cheer Edregol

I’m having the same issue with glTF. I don’t know what to do.

For me, gltf and FBX import the model at different sizes.

If you set the gltf scale to 1 on import, the model is about 20% bigger then the FBX counterpart.

this can be due to both the beta unreal import, and the implementation of it in blender.

Regarding your animation FBX issue, you need to set the scale.in blender to the proper size. Meters, .001 I believe.
Then you probably need to scale your model up or down to be correct. Export again remove the apply scale settings. Leave apply transforms.
At that point the animations on import and the mesh should match without issue.

From Blender 2.8 fbx to Unreal, I have found consistently that the basic defaults from Blender are best. Don’t make any unusual scale settings in Blender and don’t adjust it on import or export. keep the scale in Blender as 1 unit is 1 Meter. Don’t change this at the scene level or object level. Keep it at default. And make all of your characters to real world scale in Blender. Human is roughly 1.7 meters on and average. So that is 1.7 Units.

For the export settings from Blender keep the scale settings at default which is All Local, and 1. Apply Unit is On and Experimental Apply Trans is off.

Blender and Unreal seem to have this unusually workable relationship, whereas other apps such as Maya or Unity which apply the 100 scale difference with fbx unless you use “Experimental Apply transforms”, which only works in some cases otherwise it is bugy. But you don’t even need that here.

And to be clear the math between Blender and Unity is 1 to 100. So it is 100x in Blender to be the same as Unreal and .01 coming from Unreal to be the same as Blender. However by default in fbx this is already taken care of.

Alembic is another story. For that you have to change the scale settings on export or import to 100 as well as a 90 degree rotation on import.

The default blender scale was in Inches last time I had to change it so what you are saying could be correct with the latest version but was definitely not in prior versions.

What you are correct about is that unreal uses the metric system, therefore if you make your model in blender to match correct metric system sizing you’ll end up with a working import regardless.

Thanks guys I’ll give this a try.

Sorry to point out your error. But no. Absolutely not ever. Blender has never had default inches since I have been using it in 2008. And it is exactly as I have described it. Exactly to a T with no question. Been doing this a loong time. I have been working with Blender professionally for 10 years. The default units and scale differences are the same as they have always been.

It may not have been inches, but it was definitely never just Meters.
You had to change it from None to Meters to have imports work right at the very least, almost less then a year ago with 2.79
Or in my case using most pre configured versions at an office where Americans use Inches, changing it from inches to Meters.

Regardless of that, as of the latest version all you should have to do is ensure you are in meters and that the scale is correctly set to .01 in order for Unreal import/Exports to work 100% correctly.
Particualty with Animations.

SINCE the OP has issues with animations, you coming in and saying that the scale doesn’t matter will only get him more confused.

Tl: DR;
To import FBX aniamtions correctly from blender to unreal the default unit system must be set to Metric, and the Unit Scale must be set to 0.010000

I understand that you are trying to do right by the Op but think if you really want to help Blender people, on the Blender side you need some education. You have been a great help on the Unreal side to me, so far. And you have gained my respect.

But I can see that you have some of your facts about Blender a bit wrong.

It is late here. But I will dedicate a small tutorial series to this, so that others can have this cleared up as well. I have this planned for the artists in my studio anyway. And will include some of the data I have learned from you , here, in recent threads as I have tried to put together my knowledge on the Unreal side of things.

In the mean time I recorded a video series on the basics of Blender. If you are interested you can go here:

https://www.youtube.com/playlist?lis…2_HAf5_un_FpyM

And play particular attention to the videos I recorded about scale. (However the part about the Unity scale in one of the videos, needs to be updated).

There have been a lot of years freelancing with clients and running and small studio of Blender artists providing game assets behind what I am saying. For now, you will have to trust everything I am saying is correct.

I will record videos soon.

Hey guys,

first of all, thanks for being so active I appreciate your help!
Anyway that discussion actually got me a bit confused.

My takeaway where 2 things:

  1. Do not change any default blender export settings and export as is while making sure that blender units are set to meters.

I did change my units to centimeters before since I find it more easy to work with.

  1. The same as above but set scale settings to 0.01 in fbx export.

Interestingly enough that matched the scale of animation and mesh.

In the end nothing did really work though. Leaving the export settings to default did not change anything. With fbx the mesh is fine but the animations are way too small. gtlf won’t work at all.
Changing the scale on export in fbx did match the size of animation and mesh, but now mesh and animations are way too small.

As soon as I export animations the scaling is all messed up. Before that everything is fine.

I reset my blender settings and exported things from a “factory” fresh blender installation.

I’ve tried exporting with blender 2.79, 2.81a, 2.82 and 2.83 all versions had the same results.

By the way [USER=“29278”]Richard Culver[/USER] thanks for the playlist. I did watch the videos addressing the scaling. Still I seem to do something wrong…

@Edregol
Try my blender plugin from here
http://mosthostla.com/gamedev/bonebreaker

Load up your file after install and use the import button to import a mannequin.
Check to make sure that the scale of your asset works against the mannequin.
Delete the mannequin (make sure to get both the mesh and the armature).
Export via the Faces button of the plugin.

you may want to couple that with the custom FBX exporter
http://mosthostla.com/gamedev/ue4curves

[USER=“29278”]Richard Culver[/USER]
maybe I do have some of my facts wrong. But my blender plugin works and has been working since I created it - with the scale settings I mentioned…

Yes. But I am talking about what works in native Blender with no plugins. You don’t need to solve this with a plugin. You never mentioned anything about a plugin. That is another piece of information. So to remain scientific about this, I recommend resetting to Blender defaults and follow my instructions.

The interchange between Blender native defaults and Unreal Engine works perfectly fine. You just have to understand the very basics and then proceed.

@Edregol

So the reason you are confused is because you have many moving parts. And conflicting information.

Keep in mind that I do this for a living. Exporting assets to game engines with and without animation using the fbx exporter from Blender. Just recently I rebuilt a scene in Unreal that my team had animated in Blender. So this information is very fresh on my mind.

Just from your description, I can see you are trying to go too many directions at once. And also there may be other things that are entered into this equation.

First and foremost is the file format.

.fbx works completely differently than Alembic for instance. You approach these completely differently.

gltf is something else entirely.

I would say keep it simple. First just get fbx to work with a simple one character or object. And verify the scale is correct on both sides.

And the gradually build from there. You can either build a scene in Unreal with many parts, or use Datasmith to import larger scenes which is what it was designed for.

For animation I would stick with tried and true .fbx. It works very smoothly for this. And in my opinion the best option.

As promised, I will get around to making a video on this.

The FBX export has it’s issues (or I wouldn’t have rewritten parts of it).
That said, most of the videos in your playlist being for .79, things are a bit out of date.

The reason the OP likely tried gltf (and I’m literally guessing here) is that with the gltf format and the (I think experimental) unreal plugin you can actually export/import vertex paint for a static mesh. That’s the reason I have been using it myself at least. And for that, it works alright despite the scale issue.

Additionally, the Plugin IS native blender. Almost all plugins are really.
It’s a set of algorithms that you could just do by hand one by one to achieve the final results.
Since I like to work for a living, instead of wasting time ad libitum by doing the same things over and over again, I packed the concept into a python plugin that makes it possible to go from A to Z.

The way I instructed the OP to use the plugin will simply force the scale to the correct settings.
He can be the judge of if that works or not by trying it.

Yes. There is something wrong. But it has nothing to do with export or scale or anything. I looked at your file and tried to export it. I got the same results as you did. I will work to figure out what it might be with how you rigged it or something. If I can’t find it, I will chaulk it up as a bug.

In the mean time I would suggest starting over with the same kind of scene but open Blender with the factory settings and create everything new.

When you export it. keep all of the defaults but make these settings:

If it still does not work, it is not the import export that is the issue. It is something you are doing or not doing or as I said, simply a bug.

I will look into it further.

Oh my god it was propaply a bit too late yesterday :smiley:

[USER=“3140864”]MostHost LA[/USER]
Thank you for the Blender Addon I will have a look into it!
In fact I was experimenting a bit on my own and I found another addon which helped me to export things successfully:
https://github.com/xavier150/Blender…lEngine-Addons

I’d really like to confirm your hunch here, but I was just looking for a working export format really :smiley: Since I’ve had my (not so pleasent) share of experience with fbx and 3dsMax, GLTF seemed to be a convenient all in one format. But it doesn’t seem to work with animations.

[USER=“29278”]Richard Culver[/USER]
Thanks for the effort of creating that step by step guide. The result ist stil the same for me though. Maybe there is still some kind of setup that needs to be done to the armature in order to be exported and imported properly? Maybe naming conventions?

I can’t recall if I’ve had that warning before but when importing the fbx file I get the following message: “Imported bone transform is different from original. Please check Output Log to see detail of error.”
No Idea what this is supposed to mean. Maybe this is a result of importing and exporting the same asset over and over. The link to the documentation does not document this specific warning.

Eventhough I’ve found an addon which allows me to export things I’d really like to know what I did wrong manually. Richard if you find out what I did wrong please let me know.

@Edregol

Can you share your actual log entry from UE4 - it should list the bones that either match or do not match. This is helpful in figuring out if perhaps a bone or a set of bones was mistakenly scaled or moved in edit mode or if the whole armature is off.

I’m filming the import myself right now to see what’s up with your file as well. just curious since this has gone on way longer then it should have at this point :stuck_out_tongue:

[USER=“29278”]Richard Culver[/USER]
Your export setting for scale should have Y Forward for Forward and Z Up for Up.
Since you have -Z forward and Y Up what scene transform settings are you using on import? (they are cut out, since they come in right under the Animation tab).

Yeah.

I recognized that message. I just needed some time to get to it. It is an Unreal bug. This does not happen with Unity. Maybe it is a combination of Blender and Unreal to be fair. But… As I have been repeating over and over and over, it is not. I repeat, not a scale issue. That all happens out of sight. You don’t have to do anything.

https://blender.stackexchange.com/qu…nreal-engine-4

Just rename your armature object to anything but Armature. Something like BoxRig.

It makes no sense at all to me. But it just so happens I always rename my Armature object. And this is why I never see this.

Simple. Done.

Here is how IT IS a scale issue

No. Don’t monkey about with those settings, it is a waste of time. And a rabbit hole. And there are many to fall into with this process. like messing about with scene scale and so on.

As I have been saying the export process works nearly flawlessly out of the box. You don’t have to do very much.

This Armature thing is a bit of a mystery. But clearly your plugin gets around it somehow.

Or not a mistery at all and your work files just need to be set with the proper scaling QED.