Game artists rarely model one asset per .blend file. A kit of crates, barrels, rocks and wall pieces lives in one scene, side by side, and the engine wants each piece as its own file, with its origin where the engine expects it, a clean name and the right scale. Blender's exporters write one file per click. With forty props that is forty clicks, forty chances to forget "Selected only", and forty files that may each sit three metres away from their own origin. This guide shows what a good per-asset export needs, gives a short script you can use today, and lists what each engine expects.
#GLB or FBX?
Pick the format your engine reads best, not the one you used last time:
- Godot 4 imports glTF 2.0 (.glb or .gltf) natively, and glTF is the format its documentation recommends. FBX works too, through the built-in ufbx importer since Godot 4.3.
- Unity imports FBX out of the box. glTF needs the glTFast package from Unity.
- Unreal Engine 5 imports both FBX and glTF.
- Web engines such as three.js and Babylon.js load glTF, and GLB is the usual choice for the web because it is one compact file.
GLB is the binary form of glTF: geometry, materials and textures in a single file. If your engine reads it well, it is the simpler file to move around.
#Prepare the scene before you export
Most "the model looks wrong in the engine" problems are fixed in Blender before export:
- Apply rotation and scale (Ctrl+A, Rotation and Scale). An object scaled to 0.01 or rotated 90 degrees in Blender arrives with that transform in the engine, and every collider and script then has to live with it. A negative scale also flips normals.
- Decide where each origin goes. For props that sit on the floor, the bottom centre is usually right; for modular walls, a corner on the grid. Whatever you choose, be consistent across the kit.
- Keep 1 Blender unit = 1 metre. Godot and Unity use metres too. For FBX into Unity, the exporter option "Apply Scalings: FBX All" avoids the familiar 100x scale on the root object.
- Name things for the engine. Clean, unique names without spaces or dots become file names. Blender's automatic ".001" suffixes do not belong in a game project.
- Use LOD suffixes the engine knows. Unity builds an LOD Group automatically when an FBX contains meshes named
Rock_LOD0,Rock_LOD1and so on. Godot generates LODs for imported meshes on its own, so for Godot you often export only the first level.
#A short script: one GLB and one FBX per selected object
Save the .blend file, select the meshes you want, open the Scripting workspace and run this. It writes the files into an export folder next to the .blend file, moves each object to world zero for its own export so its origin becomes the file's origin, and puts every object back where it was. We ran it in Blender 5.2.2; it uses only Blender's own exporters.
import bpy, os
out = bpy.path.abspath("//export")
os.makedirs(out, exist_ok=True)
objects = [o for o in bpy.context.selected_objects if o.type == 'MESH']
for obj in objects:
bpy.ops.object.select_all(action='DESELECT')
obj.select_set(True)
bpy.context.view_layer.objects.active = obj
saved = obj.location.copy()
obj.location = (0.0, 0.0, 0.0) # origin at world zero
name = bpy.path.clean_name(obj.name)
bpy.ops.export_scene.gltf(
filepath=os.path.join(out, name + ".glb"),
export_format='GLB', use_selection=True, export_apply=True)
bpy.ops.export_scene.fbx(
filepath=os.path.join(out, name + ".fbx"),
use_selection=True, apply_scale_options='FBX_SCALE_ALL')
obj.location = saved
for obj in objects:
obj.select_set(True)
Know its limits before you rely on it. It handles objects without parents; a child's location is relative to its parent, so moving it to zero does not put it at world zero. It writes one file per object, not per collection. It does not detect LOD levels, it does not check for two objects whose cleaned names collide, and it writes files without telling you what it wrote. For a handful of props that is fine. For a real asset pipeline those gaps are where the time goes.
#What a production export also needs
Once a team exports the same kit every week, a few things start to matter:
- Per-collection export, so a building made of six objects becomes one file.
- Naming templates, such as
{collection}/{name}_{lod}, so folders and names follow the project's convention without hand editing. - LOD handling: every level in its own file, all levels of an asset in one file, or only the first level, depending on the engine.
- A dry run that lists what would be written, with triangle counts, before anything touches the disk.
- A report after every run, so a build script or a teammate can see what changed.
- Presets stored in the .blend file, so the export settings travel with the project.
- An untouched scene: the export must not leave applied modifiers, moved origins or renamed objects behind.
#Shipwell: the same idea, finished
That list is the specification of Shipwell, a Blender extension we built for our own game assets. It exports every object or every collection of a scene to its own GLB, glTF, FBX or OBJ file, names files from a template and creates the folders, recognises LOD suffixes such as _LOD0 and .lod2 with a choice of one file per level, per asset or first level only, and can put each export's origin at world zero, at the collection's instance offset or at the bottom centre of its bounds. It can apply transforms and modifiers and triangulate. A dry run lists the planned files with triangle counts, and every real run writes a JSON and CSV report next to the files. The files are written by Blender's own exporters from temporary copies, so the scene stays as it was.
It is made for static meshes such as props, modular kits and environment pieces: hierarchies are flattened, and armatures, animation, lights and cameras are not exported. Its 31 automated tests export a test scene in all four formats, re-import every file and compare triangle counts, transforms, origins and names in Blender 5.2.2. Shipwell is listed as Coming soon; the product page shows the panel and a real export report.
#Frequently asked questions
Why does my model appear rotated 90 degrees in the engine?
Blender uses Z as up, while glTF and most engines use Y. The exporters convert the axes, but an object that still carries an unapplied rotation in Blender keeps it in the engine. Apply rotation and scale before export.
Why is my FBX 100 times too big or too small in Unity?
FBX stores a unit scale, and Unity and Blender read it differently. Exporting with "Apply Scalings: FBX All", as the script above does, usually gives a root object with a scale of 1.
Should I triangulate before export?
Engines triangulate on import anyway. Triangulating in Blender gives you control over how quads and n-gons are split, which matters for deforming or very low-poly models, and it makes the triangle count you see equal to the one the engine renders.
Can the script export collections instead of objects?
Not as written. You would select the objects of each collection together and move the collection's instance offset to zero instead of each object. That is where a dedicated tool starts to pay off.
Comments
Comments
Be the first to leave a comment.
Leave a comment