Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

ResourceImporterScene

Hérite de : ResourceImporter < RefCounted < Object

Importe une scène 3D glTF, FBX, COLLADA ou Blender.

Description

Voir aussi ResourceImporterOBJ, qui est utilisé pour les modèles OBJ qui peuvent être importés comme un Mesh indépendant ou une scène.

D'autres options (comme l'extraction de maillages individuels ou de matériaux vers des fichiers) sont disponibles dans la fenêtre Paramètres d'import avancés. Cette fenêtre peut être consultée en double-cliquant une scène 3D dans le dock FileSystem ou en sélectionnant une scène 3D dans le dock FileSystem, en allant sur le dock Import et en choisir Avancé.

Note : ResourceImporterScene n'est pas utilisé pour les PackedScenes, comme les fichiers .tscn et .scn.

Tutoriels

Propriétés

Dictionary

_subresources

{}

float

animation/fps

30

bool

animation/import

true

bool

animation/import_rest_as_RESET

false

bool

animation/remove_immutable_tracks

true

bool

animation/trimming

false

bool

array_mesh/deduplicate_surfaces

true

String

import_script/path

""

int

materials/extract

0

int

materials/extract_format

0

String

materials/extract_path

""

bool

mesh_library/use_node_names_as_mesh_names

false

bool

meshes/create_shadow_meshes

true

bool

meshes/ensure_tangents

true

bool

meshes/force_disable_compression

false

bool

meshes/generate_lods

true

int

meshes/light_baking

1

float

meshes/lightmap_texel_size

0.2

bool

nodes/apply_root_scale

true

bool

nodes/import_as_skeleton_bones

false

String

nodes/root_name

""

float

nodes/root_scale

1.0

Script

nodes/root_script

null

String

nodes/root_type

""

bool

nodes/use_name_suffixes

true

bool

nodes/use_node_type_suffixes

true

bool

skins/use_named_skins

true


Descriptions des propriétés

Dictionary _subresources = {} 🔗

Contient des propriétés pour les sous-ressources de la scène. C'est une option interne qui n'est pas visible dans le dock Import.


float animation/fps = 30 🔗

The number of frames per second to use for baking animation curves to a series of points with linear interpolation. It's recommended to configure this value to match the value you're using as a baseline in your 3D modeling software. Higher values result in more precise animation with fast movement changes, at the cost of higher file sizes and memory usage. Thanks to interpolation, there is usually not much benefit in going above 30 FPS (as the animation will still appear smooth at higher rendering framerates).


bool animation/import = true 🔗

Si true, importe les animations de la scène 3D.


bool animation/import_rest_as_RESET = false 🔗

If true, adds an Animation named RESET, containing the Skeleton3D.get_bone_rest() from Skeleton3D nodes. This can be useful to extract an animation in the reference pose.


bool animation/remove_immutable_tracks = true 🔗

Si true, supprime les pistes d'animation qui ne contiennent que des valeurs par défaut. Cela peut réduire la taille du fichier de sortie et l'utilisation de la mémoire avec certaines scènes 3D, en fonction du contenu de leurs pistes d'animation.


bool animation/trimming = false 🔗

Si true, coupe le début et la fin des animations s'il n'y a pas de changement dans les clés d'animation. Cela peut réduire la taille du fichier de sortie et l'utilisation de la mémoire avec certaines scènes 3D, en fonction du contenu de leurs pistes d'animation.


bool array_mesh/deduplicate_surfaces = true 🔗

If the 3D model file contains only one mesh, this option has no effect. If true and the 3D model file contains multiple meshes with the same surface names and formats, the surfaces will be merged together when the meshes are merged. This is useful for reducing the number of surfaces in the resulting mesh, and avoids duplicating materials. If false and the 3D model file contains multiple meshes, the surfaces will always be kept separate.


String import_script/path = "" 🔗

Path to an import script, which can run code after the import process has completed for custom processing. See Using import scripts for automation for more information.


int materials/extract = 0 🔗

Material extraction mode.

  • 0 (Keep Internal), materials are not extracted.

  • 1 (Extract Once), materials are extracted once and reused on subsequent import.

  • 2 (Extract and Overwrite), materials are extracted and overwritten on every import.


int materials/extract_format = 0 🔗

Extracted material file format.

  • 0 (Text), text file format (*.tres).

  • 1 (Binary), binary file format (*.res).

  • 2 (Material), binary file format (*.material).


String materials/extract_path = "" 🔗

Chemin auquel les matériaux extraits sont sauvegardés. Si vide, le chemin de la scène source est utilisé.


bool mesh_library/use_node_names_as_mesh_names = false 🔗

If true, the mesh names will be set to the names of the nodes in the 3D model file. If false, the mesh names will be set to the names of the meshes in the 3D model file. Enabling this is a common work-around when the author of the 3D model file did not properly set the mesh names in Blender or other 3D modeling apps. For example, a file may have a node named "Turret" with a mesh named "Cube.002", so enabling this option will set the mesh name to "Turret" instead of "Cube_002".


bool meshes/create_shadow_meshes = true 🔗

Si true, active la génération des maillages d'ombre lors de l'import. Cela optimise le rendu des ombres sans réduire la qualité en fusionnant des sommets si possible. Cela réduit à son tour la bande passante mémoire requise pour rendre les ombres. La génération de maillage d'ombre ne supporte actuellement pas un niveau de détail plus bas que le maillage source (mais le rendu des ombres fera usage des LODs lorsque cela est pertinent).


bool meshes/ensure_tangents = true 🔗

If true, generate vertex tangents using Mikktspace if the input meshes don't have tangent data. When possible, it's recommended to let the 3D modeling software generate tangents on export instead of relying on this option. Tangents are required for correct display of normal and height maps, along with any material/shader features that require tangents.

If you don't need material features that require tangents, disabling this can reduce output file size and speed up importing if the source 3D file doesn't contain tangents.


bool meshes/force_disable_compression = false 🔗

Si true, la compression du maillage ne sera pas utilisée. Envisagez d'activer ceci si vous remarquez des artéfacts de blocs dans vos normales ou UVs du maillage, ou si vous avez des maillages plus grands que quelques milliers de mètres dans chaque direction.


bool meshes/generate_lods = true 🔗

Si true, génère des variantes du maillage à plus faibles détails qui seront affichées à distance pour améliorer la performance de rendu. Tous les maillages ne bénéficient pas du niveau de détail (LOD), surtout s'ils ne sont jamais rendus de loin. Désactiver cela peut réduire la taille du fichier de sortie et accélérer l'import. Voir Niveau de détail d'un maillage (LOD) pour plus d'informations.


int meshes/light_baking = 1 🔗

Configures the meshes' GeometryInstance3D.gi_mode in the 3D scene. If set to Static Lightmaps, sets the meshes' GI mode to Static and generates UV2 on import for LightmapGI baking.


float meshes/lightmap_texel_size = 0.2 🔗

Controls the size of each texel on the baked lightmap. A smaller value results in more precise lightmaps, at the cost of larger lightmap sizes and longer bake times.

Note: Only effective if meshes/light_baking is set to Static Lightmaps.


bool nodes/apply_root_scale = true 🔗

If true, nodes/root_scale will be applied to the descendant nodes, meshes, animations, bones, etc. This means that if you add a child node later on within the imported scene, it won't be scaled. If false, nodes/root_scale will multiply the scale of the root node instead.


bool nodes/import_as_skeleton_bones = false 🔗

Treat all nodes in the imported scene as if they are bones within a single Skeleton3D. Can be used to guarantee that imported animations target skeleton bones rather than nodes. May also be used to assign the "Root" bone in a BoneMap. See Retargeting 3D Skeletons for more information.


String nodes/root_name = "" 🔗

Override for the root node name. If empty, the root node will use what the scene specifies, or the file name if the scene does not specify a root name.


float nodes/root_scale = 1.0 🔗

The uniform scale to use for the scene root. The default value of 1.0 will not perform any rescaling. See nodes/apply_root_scale for details of how this scale is applied.


Script nodes/root_script = null 🔗

If set to a valid script, attaches the script to the root node of the imported scene. If the type of the root node is not compatible with the script, the root node will be replaced with a type that is compatible with the script. This setting can also be used on other non-mesh nodes in the scene to attach scripts to them.


String nodes/root_type = "" 🔗

Override for the root node type. If empty, the root node will use what the scene specifies, or Node3D if the scene does not specify a root type. Using a node type that inherits from Node3D is recommended. Otherwise, you'll lose the ability to position the node directly in the 3D editor.


bool nodes/use_name_suffixes = true 🔗

If true, will use suffixes in the names of imported objects such as nodes and resources to determine types and properties, such as -noimp to skip import of a node or animation, -alpha to enable alpha transparency on a material, and -vcol to enable vertex colors on a material. Disabling this makes editor-imported files more similar to the original files, and more similar to files imported at runtime. See Node type customization using name suffixes for more information.


bool nodes/use_node_type_suffixes = true 🔗

If true, will use suffixes in the node names to determine the node type, such as -col for collision shapes. This is only used when nodes/use_name_suffixes is true. Disabling this makes editor-imported files more similar to the original files, and more similar to files imported at runtime. See Node type customization using name suffixes for more information.


bool skins/use_named_skins = true 🔗

If checked, use named Skins for animation. The MeshInstance3D node contains 3 properties of relevance here: a skeleton NodePath pointing to the Skeleton3D node (usually ..), a mesh, and a skin:

  • The Skeleton3D node contains a list of bones with names, their pose and rest, a name, and a parent bone.

  • The mesh is all of the raw vertex data needed to display a mesh. In terms of the mesh, it knows how vertices are weight-painted and uses some internal numbering often imported from 3D modeling software.

  • The skin contains the information necessary to bind this mesh onto this Skeleton3D. For each of the internal bone IDs chosen by the 3D modeling software, it contains two things. Firstly, a matrix known as the Bind Pose Matrix, Inverse Bind Matrix, or IBM for short. Secondly, the Skin contains each bone's name (if skins/use_named_skins is true), or the bone's index within the Skeleton3D list (if skins/use_named_skins is false).

Together, this information is enough to tell Godot how to use the bone poses in the Skeleton3D node to render the mesh from each MeshInstance3D. Note that each MeshInstance3D may share binds, as is common in models exported from Blender, or each MeshInstance3D may use a separate Skin object, as is common in models exported from other tools such as Maya.