From 554735982d9b80efdfea77b6da09a36212736d3a Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Tue, 23 May 2023 20:40:57 -0500 Subject: [PATCH] Add a note about 3D asset direction conventions to "Importing 3D scenes" --- .../assets_pipeline/importing_scenes.rst | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tutorials/assets_pipeline/importing_scenes.rst b/tutorials/assets_pipeline/importing_scenes.rst index 965b2114a63..463557dc5f9 100644 --- a/tutorials/assets_pipeline/importing_scenes.rst +++ b/tutorials/assets_pipeline/importing_scenes.rst @@ -29,6 +29,33 @@ 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) ---------------------------------------------------