GYAZ Export Tools (Seamless Blender To Unreal 4 (FBX))

Last Update: April 7, 2020 for Blender 2.82
Addon Version: 2.82.1

Seamless Blender To Unreal 4 Export

The addon focuses on moving assets from Blender to Unreal 4 making iteration painless using Blender’s default FBX exporter.

Blender vs UE4 standards:
Blender: -Y is forward, +Z is up, 1 unit is 1 meter
UE4: +X is forward, +Z is up, 1 unit is 1 centimeter
The addon expects assets to be correctly set up for Blender. Do not divert from Blender standards because the addon won’t work then, and it also breaks a lot of things in Blender.

Scale:
Making characters and animations for Unreal 4 in Blender requires you to set the scale unit to 0.01 but this messes up physics, viewport navigation, creating primitives and who knows what else. You end up with a half broken Blender if the scale unit is not 1. The addon exports skeletal meshes to fbx with correct bone scales when the scale unit is left at 1.

Root Bone:
The default fbx exporter also force adds a root bone to armatures, so to keep the root bone also the root bone in Unreal the addon changes the animation of the root bone to object animation and deletes the root bone. This way you can export root motion to Unreal because the fbx exporter calculates root animation from object animation.

Correct root bone orientation:

Pick Bones To Export:
The addon also makes it possible to hand pick which bones in a rig are exported. So basically, you can have an elaborate rig with a thousand bones, define export bones, save it as a preset, and from then on, you’ll have an easy workflow: animate and hit export. The addon makes it also possible to export multiple actions into separate fbx files, export only the armature with bone and shapekey animation.

Export Any Rig:
Create a simplified version of any armature for export with the ‘Extra Bones’ feature. You can make a new bone from any existing bone with a new name and override its parent. ‘Constraint To Source’ and ‘Rename Vert Groups’ should be checked and Export Bones > All Bones should be unchecked for this to work.

Animations:
A single animation can be exported without meshes making it easy to iterate, since you only have to update a file with a single animation not with a file with dozens of animations. The addon makes it possible to not include the meshes even if you need shape key animation, something that can’t be done with the default fbx exporter alone.

Textures:
All textures are gathered from cycles image texture nodes and exported into a folder called “Textures” next to the fbx file.

Collision and Sockets for static meshes:
Prefixes: UBX (box), USP (sphere), UCP (capsule), UCX (convex hull), SOCKET
Example: Object --> UBX_Object, UBX_Object.001, UBX_Object.002, UCX_Object
Collision (mesh) and socket (single bone armature) objects are gathered automatically and should not be selected.

LODs for static meshes:
LODs are also automatically discovered solely based on object name suffix and exported to the same file as the render mesh.
Example: lod0: Object, lod1: Object_LOD1, lod2: Object_LOD2, …
LOD0 should not have a suffix.
LODs for skeletal meshes always showed up in Unreal in the wrong order, so they should be exported as separate files.

Mesh Checks:
You’ll also get a warning if your meshes have no uv maps, no second uv map (optional), no material, mesh has ngons, mesh is not triangulated (optional). You can also force 8/4/2/1 bone weights per vertex (optional).
In Unreal if a skeletal mesh has more that 4 bone weights per vertex, it uses the 8 bone weights per vertex path which harms performance and there is absolutely no way to check this in Unreal. Reducing this count for LOD models is also a great way to boost performance. Unity only supports up to 4 bone weights per vertex, so it’s not a problem there.
Of course, for best results you have to set up bone weight limit manually in weight paint mode (Toolshelf > Limit Total) and adjust weights and limit again…, but it’s good to put your mind at ease that there’s no way you end up exporting more than 4 weights. And for LODs, where quality doesn’t matter that much, it’s a good automated method.

Assets are categorized into 4 types: static meshes, skeletal meshes, skeletal animations (with shapekeys), rigid animation (object animation).
When exporting skeletal meshes/animations, only the armature needs to be selected and all meshes should be parented to the armature. Mesh children of the armature can opt out from being exported in the Export Filter Panel.

Static Mesh Morph Targets (Shape Keys):
Unreal 4 only supports morph targets for skeletal meshes, but they also bundle a 3ds Max script that packs morph targets into UV channels. Toolshelf > Export FBX > Extras > Shape Keys In UVs can encode shape key positions and normals read from another object into an object’s UV channels and vertex color. This only supports a few shape keys since a mesh can only have 8 UV channels and 1 vertex color in Unreal. If normals are packed up to 3, if only positions are packed up to 5 shape keys are supported.

Decoding Static Mesh Shape Keys in Unreal:

Location:
2.80: Properties Editor > Scene > Export
2.79: 3D View > Toolshelf > Export FBX

Unreal Import Settings:

  • all three must be true:
    – ‘Transfer Vertex to Abolute’
    – ‘Convert Scene’
    – ‘Force Front X Axis’

Blender 2.82:

Blender 2.79:

Total noobs, who know nothing about nothing should use these settings:
k%C3%A9p

You can make these the default settings in Preferences > Addons > GYAZ Export Tools

18 Likes

Thanks for sharing your addons ! I also download other addons from github !
Cheer!

Looks like a solid and very useful add-on! Thank you for making this. Do you have any plans to expand/ further develop it besides possible bugs?

I also wanted automatically gather LOD and collison meshes but Unreal’s built in LOD and collision generation methods make this functionality not so needed since with most of the assets you can generate these in Unreal.

What functionality would you add?

I need some help .
After i click export ,blender give me this error messages !

I need some extra steps to make it work ?

Is it possible export separate file to same fold ?
Some time,I only need export separater files in same folder, don’t need create own folder for every separatefile.
And it look if i disable “Export Textures” ,i can export select files, and Blender don’t give me error messages!

Big thanks~

1.You have to give more info than that, like what you try to export, what rendering engine the materials are for and what exporting settings you are using.

My guess is that you’re trying to export textures from BI materials, textures from BI materials won’t be exported. I fixed a bug, so now it won’t throw this error, update the addon.

2.If you don’t want to export all the objects in separate folders, just check ‘Pack Objects’.

Hi
Thanks for your answer !
The error message is gone after i update the addon !
I think it is my fault, “Export Texture” is working after i convert all BI materials to Cycle Materials,this is realy awesome!
Is it possible that export all select objects to separate files in same place, not combine all objects in one file?
We like export componets to separate files, and put them together in unreal . so we can only need update the part that we need .
For example, we have a Machine prop named" GunM", We have a fold named " GunM" in U4 project, Every componets is in this fold .They share some texture and material folder. It is very easy to oganized.

Added an option “Organizing Folder”, turn this off if you don’t want the extra folder.

Big thanks your update !
The addon is awesome !
Maybe we can add a “units check tool " ? It is very easy to forget to setup correct units, when we have lot’s of assets need be imported to blender.
if we not setup units correctly , the tool can give us a option " if need setup right units for us” ?

You don’t need to change the unit, that’s why I wrote the addon in the first place for not having to change the default unit length with skeletons. It’s a bad idea to change that, read the first post for details. Just make sure you import in Unreal with the setting, “Transform Vertex To Absolute” checked.

Thanks !
I learn more from your addon !
Cheer!

Can you export with this into mudbox? Or are there better ways? I maybe want to model in blender and paint in mudbox. Thanks

This uses Blender’s default fbx exporter, so it should work, but the default fbx exporter alone could be enough too. This does a lot of extra stuff that helps when you do the final export to a game engine but is not necessary when just moving geometry to another DCC tool.

Thank you helluvamesh.

2.6 Fails to register with nightly build:

Exception in module register(): /home/user/.config/blender/2.79/scripts/addons/GYAZ_export_tools/__init__.py
Traceback (most recent call last):
  File "/home/user/.blender/blender-2.79-0a968510bf6-linux-glibc224-x86_64/2.79/scripts/modules/addon_utils.py", line 370, in enable
    mod.register()
  File "/home/user/.config/blender/2.79/scripts/addons/GYAZ_export_tools/__init__.py", line 195, in register
    sys.modules[currentModuleName].register()
  File "/home/user/.config/blender/2.79/scripts/addons/GYAZ_export_tools/export_tools.py", line 2859, in register
    bpy.utils.register_class (PG_GYAZ_ExportProps)
ValueError: bpy_struct "PG_GYAZ_ExportProps" registration error: texture_format_override could not register

Fixed it.


nope. 27:

Exception in module register(): /home/user/.config/blender/2.79/scripts/addons/GYAZ_export_tools/__init__.py
Traceback (most recent call last):
  File "/home/user/.blender/blender-2.79-0a968510bf6-linux-glibc224-x86_64/2.79/scripts/modules/addon_utils.py", line 370, in enable
    mod.register()
  File "/home/user/.config/blender/2.79/scripts/addons/GYAZ_export_tools/__init__.py", line 195, in register
    sys.modules[currentModuleName].register()
  File "/home/user/.config/blender/2.79/scripts/addons/GYAZ_export_tools/export_tools.py", line 2911, in register
    bpy.utils.register_class (PG_GYAZ_ExportProps)
ValueError: bpy_struct "PG_GYAZ_ExportProps" registration error: texture_format_override could not register

Can you install it in the stable Blender version? On Windows it works for me in both the stable and the nightly versions.

Sure, np. 2.79b

Exception in module register(): '/home/user/.config/blender/2.79/scripts/addons/GYAZ_export_tools/__init__.py'
Traceback (most recent call last):
  File "/usr/share/blender/2.79/scripts/modules/addon_utils.py", line 350, in enable
    mod.register()
  File "/home/user/.config/blender/2.79/scripts/addons/GYAZ_export_tools/__init__.py", line 195, in register
    sys.modules[currentModuleName].register()
  File "/home/user/.config/blender/2.79/scripts/addons/GYAZ_export_tools/export_tools.py", line 2911, in register
    bpy.utils.register_class (PG_GYAZ_ExportProps)
ValueError: bpy_struct "PG_GYAZ_ExportProps" registration error: texture_format_override could not register
  1. Replace the export_tools.py file with this:
    file deleted

  2. What’s you OS? Mine’s Win7.