Model export considerations
Before exporting a 3D model from a 3D modeling application, such as Blender, there are some considerations that should be taken into account to ensure that the model follows the conventions and best practices for Godot.
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.
La convención para los activos 3D es orientarlos en la dirección opuesta a la de la cámara, de modo que los personajes y otros activos estén orientados hacia la cámara de forma predeterminada. Esta convención es extremadamente común en aplicaciones de modelado 3D y está codificada en glTF como parte de la especificación glTF 2.0. Esto significa que para los activos 3D orientados (como los personajes), el eje +Z es la dirección del frente, por lo que -Z es la parte trasera, +X es el lado izquierdo y -X es el lado derecho para un activo 3D. En Blender, esto significa que +Y es la parte trasera y -Y es la parte delantera para un activo.
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.
Exportando texturas por separado
While textures can be exported with a model in certain file formats, such as glTF 2.0, you can also export them separately. Godot uses PBR (physically based rendering) for its materials, so if a texturing program can export PBR textures, they can work in Godot. This includes the Substance suite, ArmorPaint (open source), and Material Maker (open source).
Ver también
For more information on Godot's materials, see Material estándar 3D y material ORM 3D.
Consideraciones de exportación
Dado que las GPU solo pueden renderizar triángulos, las mallas que contienen quads o N-gons deben * triangularse * antes de poder renderizarse. Godot puede triangular mallas al importar, pero los resultados pueden ser impredecibles o incorrectos, especialmente con N-gons. Independientemente de la aplicación de destino, triangular * antes * de exportar la escena conducirá a resultados más consistentes y debe hacerse siempre que sea posible.
To avoid issues with incorrect triangulation after importing in Godot, it is recommended to make the 3D modeling software triangulate objects on its own. In Blender, this can be done by adding a Triangulate modifier to your objects and making sure Apply Modifiers is checked in the export dialog. Alternatively, depending on the exporter, you may be able to find and enable a Triangulate Faces option in the export dialog.
To avoid issues with 3D selection in the editor, it is recommended to apply the object transform in the 3D modeling software before exporting the scene.
Nota
Es importante que la malla no se deforme por los huesos al exportarla. Asegúrate que el esqueleto se restablezca a su posición T o posición de reposo predeterminada antes de exportarlo con tu editor 3D favorito.
Lighting considerations
While it's possible to import lights from a 3D scene using the glTF, .blend
or Collada formats, it's generally advised to design the scene's lighting in the
Godot editor after importing the scene.
This allows you to get a more accurate feel for the final result, as different engines will render lights in a different manner. This also avoids any issues with lights appearing excessively strong or faint as a result of the import process.