Up to date
This page is up to date for Godot 4.0
.
If you still find outdated information, please open an issue.
Importing 3D scenes¶
Godot scene importer¶
When dealing with 3D assets, Godot has a flexible and configurable importer.
Godot works with scenes. This means that the entire scene being worked on in your favorite 3D modeling software will be transferred as close as possible.
Godot supports the following 3D scene file formats:
glTF 2.0 (recommended). Godot has full support for both text (
.gltf
) and binary (.glb
) formats..blend
(Blender). This works by calling Blender to export to glTF in a transparent manner (requires Blender to be installed).DAE (COLLADA), an older format that is fully supported.
OBJ (Wavefront) format + their MTL material files. This is also fully supported, but pretty limited given the format's limitations (no support for pivots, skeletons, animations, UV2, PBR materials, ...).
FBX, supported via FBX2glTF integration. This requires installing an external program that links against the proprietary FBX SDK, so we recommend using other formats listed above (if suitable for your workflow).
Copy the scene file together with the textures and mesh data (if separate) to the project repository, then Godot will do a full import when focusing the editor window.
3D asset direction conventions¶
Godot uses a right-handed, Y-is-up coordinate system, with the -Z axis as the camera's forward direction. This is the same as OpenGL. This implies that +Z is back, +X is right, and -X is left for a camera.
The convention for 3D assets is to face the opposite direction as the camera, so that characters and other assets are facing the camera by default. This convention is extremely common in 3D modeling applications, and is codified in glTF as part of the glTF 2.0 specification. This means that for oriented 3D assets (such as characters), the +Z axis is the direction of the front, so -Z is the rear, +X is the left side, and -X is the right side for a 3D asset. In Blender, this means that +Y is rear and -Y is front for an asset.
When rotating an oriented 3D asset in Godot, use the use_model_front
option on the look_at
functions, and use the Vector3.MODEL_*
constants to perform calculations in the oriented asset's local space.
For assets without an intrinsic front side or forward direction, such as a game map or terrain, take note of the cardinal directions instead. The convention in Godot and the vast majority of other applications is that +X is east and -X is west. Due to Godot's right-handed Y-is-up coordinate system, this implies that +Z is south and -Z is north. In Blender, this means that +Y is north and -Y is south.
Exporting glTF 2.0 files from Blender (recommended)¶
There are 3 ways to export glTF files from Blender:
As a glTF binary file (
.glb
).As a glTF text-based file with embedded binary data (
.gltf
file)As a glTF text-based file with separate binary data and textures (
.gltf
file +.bin
file + textures).
glTF binary files (.glb
) are the smallest of the three options. They include
the mesh and textures set up in Blender. When brought into Godot the textures
are part of the object's material file.
glTF embedded files (.gltf
) function the same way as binary files. They
don't provide extra functionality in Godot, and shouldn't be used since they
have a larger file size.
There are two reasons to use glTF with the textures separate. One is to have the scene description in a text based format and the binary data in a separate binary file. This can be useful for version control if you want to review changes in a text-based format. The second is you need the texture files separate from the material file. If you don't need either of those, glTF binary files are fine.
Warning
If your model contains blend shapes (also known as "shape keys" and "morph targets"), your glTF export setting Export Deformation Bones Only needs to be configured to Enabled under the Animation export configurations.
Exporting non-deforming bones anyway will lead to incorrect shading.
Note
Blender versions older than 3.2 do not export emissive textures with the glTF file. If your model uses one and you're using an older version of Blender, it must be brought in separately.
By default, Blender has backface culling disabled on materials and will export materials to match how they render in Blender. This means that materials in Godot will have their cull mode set to Disabled. This can decrease performance since backfaces will be rendered, even when they are being culled by other faces. To resolve this, enable Backface Culling in Blender's Materials tab, then export the scene to glTF again.
Importing .blend
files directly within Godot¶
Note
This functionality requires Blender 3.0 or later. For best results, we recommend using Blender 3.5 or later, as it includes many fixes to the glTF exporter.
From Godot 4.0 onwards, the editor can directly import .blend
files by
calling Blender's glTF export functionality in a
transparent manner.
This allows