POLYMASON

OBJ, FBX, GLB or STL: which format, and when

Part of The OBJ file format, explained for game engines

Every model you download or export will be in one of four formats. This article compares what each one carries, what it loses, and which engine wants which. It's the longer version of the comparison in the OBJ guide. The import steps for whichever format you end up with are in the Unity, Godot and Unreal articles.

The table

OBJFBXGLB (glTF)STL
kindtextbinarybinary, open specbinary or text
geometryyesyesyestriangles only
normalsoptionalyesyesper face
texture coordinatesyesyesyesno
materialsin a second file (MTL)embeddedembedded, PBRno
texturesby file nameembedded or by nameembeddedno
vertex colorsnon-standardyesyesno
hierarchyflat, named objectsfull scene treefull scene treenone
rig and animationnoyesyesno
unitsnone statedstatedmetersnone
up axisnone statedstatedYnone
Unitynativenativevia glTFast packageno
Godot 4nativenative from 4.3native, preferredno
Unrealnativenativenativeno
printersrarelynonoyes, and 3MF
readable by a personyesnonotext form, yes

OBJ

OBJ is the oldest of the four and the simplest. It's a text file of vertices and faces with a companion .mtl for materials. It carries no unit and no up axis, so every importer has to assume something. It also carries no rig, no animation and no scene hierarchy. Its advantage is that everything reads it. It's easy to generate and to inspect, and for a static prop it holds everything that matters.

Use it for static environment pieces and props, for anything you might want to read or repair in a text editor, and when you need a file that every tool will open. The OBJ guide explains everything in the file.

FBX

FBX is Autodesk's format, and it's the one Unity and Unreal pipelines assume. It's binary, so it's compact and you can't read it. It holds meshes, materials, textures embedded or referenced, the whole scene hierarchy, skeletons, skinning, animation clips, blend shapes and cameras. Unity and Unreal read it through Autodesk's FBX SDK, and the format has no public specification. That's why nothing outside Autodesk writes it perfectly.

Its well-known trap is scale. Blender's FBX exporter and Unity's importer disagree about centimeters and meters, and that's where the models that arrive a hundred times too big or too small come from. Godot 4.3 and later read FBX with their own importer, ufbx. Earlier versions needed a conversion to glTF.

Use it for characters and anything else rigged or animated, and when a Unity or Unreal project already has a pipeline built on it.

GLB and glTF

glTF is the open format from the Khronos Group, the people behind OpenGL and Vulkan. GLB is its single-file binary form. It holds what FBX holds: meshes, hierarchy, PBR materials with textures embedded, skeletons and animation. The specification is open for anyone to read, and it fixes units at meters and Y as up, so there's nothing for an importer to assume. It's the web's format and the one Godot prefers. Unreal imports it natively. Unity needs the glTFast package, which is a one-line install from the package manager.

Use it for almost anything once you have it, and ask for it first when a pack gives you a choice. Its one gap is that older tools and some marketplaces still don't write it well.

STL

STL is triangles and nothing else. It has no color, no material, no texture coordinates and no unit, and it has a normal per face that most readers ignore. It's the format 3D printers and slicers want, and no engine reads it. 3MF is its modern replacement, with colors and units, and slicers read both.

Use it only for printing.

Which to ask a pack for

For a game, ask for GLB if the pack has it, FBX if it doesn't, and OBJ if that's all there is. OBJ is never wrong for a static prop. For a printer, ask for STL or 3MF. If a pack has only OBJ and FBX and the model is static, the OBJ is the safer file, because there's nothing in it to go wrong.

What PolyMason writes

The tree builder writes OBJ with its material library and a palette texture, STL for printing, and 3MF with the colors in it. GLB is next, for Godot and the web, and FBX comes after that, for Unreal.

More in this guide

  • The OBJ file format, explained for game enginesWhat's in an OBJ file and its MTL, what it leaves out (units, axes, colors), how it compares with FBX, GLB and STL, and how to import one into Unity, Godot and Unreal so the model doesn't arrive tiny, sideways or gray.
  • Import an OBJ into Unity: size, color, shadingThe steps for getting an OBJ and its materials into Unity, the Scale Factor and Convert Units settings that make a model the right size, what to do when a model arrives a hundred times too big, the Materials tab, normals for flat shading, and colliders.
  • Import an OBJ into Godot 4 as a mesh or a sceneThe steps for putting an OBJ and its MTL into a Godot 4 project, the difference between importing it as a mesh and as a scene, scale, materials, reimporting after a change, generating LODs, and adding collision.
  • Import an OBJ into Unreal at the right scaleThe steps for importing an OBJ as a Static Mesh in Unreal Engine 5, the Import Uniform Scale of 100 that a file in meters needs, Convert Scene for the up axis, Normal Import Method for flat shading, what happens to the MTL's materials, collision, LODs and Nanite.

Or build a tree and see what comes out.