Minimal Blender GLTF exporter for Godot optimized for speed
vertices 100,482
triangles 200,960
loops 402,560
shape keys 50
bones 40
animations 31 × ~30 keyframes
median min max size
──────────────────────────────────────────────────────────
minigltf 2.755s 2.471s 3.450s 267.1 MB
built-in glTF 379.377s 373.314s 907.280s 244.5 MB
speedup: ~138x
The main performance difference comes from the fact minigltf does not sample curves at each frame, but rather exports only the existing keyframes directly. This means only raw keyframe values get exported, not their interpolation mode or handles.
Geometry
- Positions, normals, up to two UV layers (TEXCOORD_0 / TEXCOORD_1)
- Triangle indices
- Multiple meshes in one scene
Materials
- PBR metallic-roughness: base color texture, metallic/roughness texture, normal map
- ORM combined texture (R=occlusion, G=roughness, B=metallic) exported with
occlusionTexture - Scalar fallbacks for base color, metallic, roughness when no texture is connected
- Emission:
emissiveFactor(color × strength) oremissiveTexture; emission brighter than 1.0 uses theKHR_materials_emissive_strengthextension so the factor stays spec-valid - Alpha modes:
BLENDandMASK(withalphaCutoff) - Double-sided: derived from Blender's backface culling setting
- Textures referenced by relative path
Armature
- Armatures exported as glTF skins with inverse bind matrices
- Up to 4 joint influences per vertex (JOINTS_0 / WEIGHTS_0)
Morph targets (shape keys)
- All non-basis keys exported as glTF morph targets with delta positions
Animations
- Skeleton animation: translation and rotation channels per bone
- Shape key animation: weight tracks targeting mesh nodes
- Camera/light object animation: location/rotation/scale, exported exactly like bone tracks (raw keyframes, no resampling)
- Animated light energy and color via the
KHR_animation_pointerextension (Godot reads these aslight_energy/light_colortracks) - Multiple actions per scene, each becomes a separate glTF animation
- Multi-slot actions: one action driving several objects through different slots exports as a single glTF animation (one clip name) when assigned directly, and as one clip per target when scheduled through separate NLA strips
Cameras
- Perspective and orthographic cameras exported to the glTF
camerasarray - Vertical FOV derived from the camera's sensor fit and the scene render aspect ratio
Lights
- Point, sun (directional), and spot lights via the
KHR_lights_punctualextension - Watt to lumen intensity conversion matching Blender's glTF exporter; spot cone angles from
spot_size/spot_blend - Area lights have no glTF equivalent and are approximated as point lights (with a warning)
Coordinate system
- Blender Z-up → glTF Y-up axis conversion applied to all positions, normals, and rotations
- Exports only keyframes Blender curve handles are ignored and not sampled
- Scale animation channels are not exported
- Textures are not embedded in the GLB; they must sit alongside the file at the relative paths stored in the material nodes
- 4 joint influences maximum; excess groups are dropped
- Area lights are approximated as point lights; light/camera animation is not written to the glTF
- No vertex colours, tangents, IOR, or particles
- Requires Blender 4.0+; the Blender addon requires 4.2+
Call mini_export from any Blender Python context
import minigltf
minigltf.mini_export("/output/scene.glb")Godot's .blend importer calls bpy.ops.export_scene.gltf(...) internally. The addon patches that operator to route the call through mini_export instead, so no changes to your Godot project or import settings are needed.
Install
- Download
godot_minigltf_override.zipfrom the latest release - In Blender: Edit → Preferences → Add-ons → Install from Disk
- Select the zip and enable the extension
Levels (MultiMap) and cutscenes
The editor plugin (addons/minigltf) decides per imported scene how linked collections are brought in:
- cutscene (the scene has an
AnimationPlayer, aSkeleton3Dor theCutsceneDataschedule): every link becomes a live<lib>.blend@subroot=<Collection>instance, as before. - level (everything else): every link whose collection is a plain mesh collection becomes one
MultiMapitem per mesh node of that collection's hierarchy (parented objects and nested collections included; transform = instance transform * the mesh node's transform inside the collection) (a Godot fork node,ClassDB.class_exists("MultiMap"); engines without it always use cutscene mode). The project settingminigltf/level_itemsselects the item granularity:merged(default) bakes every collection's meshes into one library item with generated LODs (a surface per material);flatkeeps one item per imported mesh (importer LODs as imported, per-part culling). OneMeshLibraryper library file holds one item per distinct imported mesh, used as-is so importer LODs are kept (the collection -> items table is in the library'sminigltf_collectionsmeta). The libraries are written tores://.godot/imported/<file>-<hash>.meshlib.reswhenever a library scene is imported, so they follow the library's own reimports. Item ids are derived from the mesh name, so scenes importing a library stay valid when it changes. Links whose collection has lights, cameras, skins or animations, or whose transform (or a part's) is mirrored, stay@subroot=instances. Only uniform scale is supported byMultiMap: a non-uniform instance scale is replaced by the mean of its axes.
Override with the project setting minigltf/import_mode (auto, level, cutscene).
Uninstall / disable
Disable or remove the extension from Edit → Preferences → Extensions. The original glTF exporter is restored immediately.
Run the test suite (requires Blender on $PATH or set BLENDER=):
pip install -r tests/requirements.txt
python -m pytest tests
# only one suite:
python -m pytest tests/minigltf
python -m pytest tests/materializer
# a single test
BLENDER=/opt/blender-5.1.0-linux-x64/blender python -m pytest tests/minigltf -k basic_mesh
BLENDER=/opt/blender-5.1.0-linux-x64/blender python -m pytest tests/materializer -k basecolor_onlyCut a release
Push a version tag; the Release workflow runs the test suite and, if it passes, builds godot_minigltf_override.zip and attaches it to a GitHub release:
git tag v1.2.3
git push origin v1.2.3