Last Update: August 27, 2020 for Blender 2.83
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.
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.
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.
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.
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.
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:
2.80: Properties Editor > Scene > Export
2.79: 3D View > Toolshelf > Export FBX
Unreal Import Settings:
- all three must be true:
– Transfer Vertex to Absolute
– Convert Scene
– Force Front X Axis
Total noobs, who know nothing about nothing should use these settings:
You can make these the default settings in Preferences > Addons > GYAZ Export Tools