Batch exports FBX static mesh, textures, collision and LOD (LOD in separate FBX Files) for unreal engine. This script is very useful for indie game developers who want to keep a library of assets in a scene ready for export to Unreal. Advantage is if you have 100 models in your scene and you need to make changes or modifications to models this script will quickly batch export based on selected models.
Paste script in blender> save scene> select all desired mesh> click batch export.
The script takes each mesh resets the transformation to the center of grid and exports each mesh out as an fbx in the saved scene directory. No need to select collision mesh and LOD, they will get exported automatically based on the base model selection. Accidentally selected a collision mesh or LOD, export still works. No Collision mesh or no LOD, export still works!
Exporting base model+collision mesh in blender for unreal compatibility in one fbx file requires the collision mesh to have the same name with a prefix, [UBX_..(Box Collision),USP_..(Sphere Collision), UCX_.. (Convex Collision)].
eg. UBX_Cube (collision mesh) and Cube (Base Mesh)>Select both meshes> Export FBX.
Exporting LOD and base model in one FBX file in blender is not supported. LOD is exported separately.
LOD must be saved with a suffix .._1, up to .._6 LOD is supported.
eg. Cube (Base Model), Cube_1 (First LOD), Cube_2 (Second LOD)..
Textures are mostly created in Unreal. You can add different materials to different objects, join the objects and export it out to Unreal. In unreal you can assign different textures to the different materials.