Skip to content

Commit b208565

Browse files
committed
Move advanced import settings to their own page
1 parent 532a216 commit b208565

File tree

4 files changed

+250
-219
lines changed

4 files changed

+250
-219
lines changed
Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
.. _doc_advanced_import_settings:
2+
3+
Advanced Import Settings
4+
========================
5+
6+
While the regular import panel provides many essential options for imported 3D
7+
models, the advanced import settings provides per object options, model previews,
8+
and animation previews. To open it select the :button:`Adavnced...` button at the
9+
bottom of the import dock.
10+
11+
.. figure:: img/importing_3d_scenes_advanced_import_settings_button.webp
12+
:align: center
13+
14+
This is available for 3D models imported as scenes, as well as animation libraries.
15+
16+
.. note::
17+
This page does not go over options also available in the import dock, or anything
18+
outside of the advanced import settings. For information on those please read the
19+
:ref:`import_configuration` page.
20+
21+
Using the Advanced Import Settings dialog
22+
-----------------------------------------
23+
24+
The first tab you'll see is the **Scene** tab. The options available in the
25+
panel on the right are identical to the Import dock, but you have access to a 3D
26+
preview. The 3D preview can be rotated by holding down the left mouse button
27+
then dragging the mouse. Zoom can be adjusted using the mouse wheel.
28+
29+
.. figure:: img/importing_3d_scenes_advanced_import_settings_scene.webp
30+
:align: center
31+
:alt: Advanced Import Settings dialog (Scene tab)
32+
33+
Advanced Import Settings dialog (Scene tab).
34+
Credit: `Modern Arm Chair 01 - Poly Haven <https://polyhaven.com/a/modern_arm_chair_01>`__
35+
36+
Configuring node import options
37+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38+
39+
You can select individual nodes that compose the scene while in the **Scene**
40+
tab using the tree view at the left:
41+
42+
.. figure:: img/importing_3d_scenes_advanced_import_settings_node.webp
43+
:align: center
44+
:alt: Selecting a node in the Advanced Import Settings dialog (Scene tab)
45+
46+
Selecting a node in the Advanced Import Settings dialog (Materials tab)
47+
48+
This exposes several per-node import options:
49+
50+
- **Skip Import:** If checked, the node will not be present in the final
51+
imported scene. Enabling this disables all other options.
52+
- **Generate > Physics:** If checked, generates a PhysicsBody3D *parent* node
53+
with collision shapes that are *siblings* to the MeshInstance3D node.
54+
- **Generate > NavMesh:** If checked, generates a NavigationRegion3D *child*
55+
node for :ref:`navigation <doc_navigation_overview_3d>`. **Mesh + NavMesh**
56+
will keep the original mesh visible, while **NavMesh Only** will only import
57+
the navigation mesh (without a visual representation). **NavMesh Only** is
58+
meant to be used when you've manually authored a simplified mesh for navigation.
59+
- **Generate > Occluder:** If checked, generates an OccluderInstance3D *sibling*
60+
node for :ref:`occlusion culling <doc_occlusion_culling>` using the mesh's
61+
geometry as a basis for the occluder's shape. **Mesh + Occluder** will keep
62+
the original mesh visible, while **Occluder Only** will only import the
63+
occluder (without a visual representation). **Occluder Only** is meant to be
64+
used when you've manually authored a simplified mesh for occlusion culling.
65+
66+
These options are only visible if some of the above options are enabled:
67+
68+
- **Physics > Body Type:** Only visible if **Generate > Physics** is enabled.
69+
Controls the PhysicsBody3D that should be created. **Static** creates a
70+
StaticBody3D, **Dynamic** creates a RigidBody3D, **Area** creates an Area3D.
71+
- **Physics > Shape Type:** Only visible if **Generate > Physics** is enabled.
72+
**Trimesh** allows for precise per-triangle collision, but it can only be used
73+
with a **Static** body type. Other types are less precise and may require
74+
manual configuration, but can be used with any body type. For static level
75+
geometry, use **Trimesh**. For dynamic geometry, use primitive shapes if
76+
possible for better performance, or use one of the convex decomposition modes
77+
if the shape is large and complex.
78+
- **Decomposition > Advanced:** Only visible if **Physics > Shape Type** is
79+
**Decompose Convex**. If checked, allows adjusting advanced decomposition
80+
options. If disabled, only a preset **Precision** can be adjusted (which is
81+
usually sufficient).
82+
- **Decomposition > Precision:** Only visible if **Physics > Shape Type** is
83+
**Decompose Convex**. Controls the precision to use for convex decomposition.
84+
Higher values result in more detailed collision, at the cost of slower
85+
generation and increased CPU usage during physics simulation. To improve
86+
performance, it's recommended to keep this value as low as possible for your
87+
use cases.
88+
- **Occluder > Simplification Distance:** Only visible if **Generate >
89+
Occluder** is set to **Mesh + Occluder** or **Occluder Only**. Higher values
90+
result in an occluder mesh with fewer vertices (resulting in decreased CPU
91+
utilization), at the cost of more occlusion culling issues (such as false
92+
positives or false negatives). If you run into objects disappearing when they
93+
shouldn't when the camera is near a certain mesh, try decreasing this value.
94+
95+
Configuring mesh and material import options
96+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97+
98+
In the Advanced Import Settings dialog, there are 2 ways to select individual
99+
meshes or materials:
100+
101+
- Switch to the **Meshes** or **Materials** tab in the top-left corner of the dialog.
102+
- Stay in the **Scene** tab, but unfold the options on the tree view on the
103+
left. After choosing a mesh or material, this presents the same information as
104+
the **Meshes** and **Materials** tabs, but in a tree view instead of a list.
105+
106+
If you select a mesh, different options will appear in the panel on the right:
107+
108+
.. figure:: img/importing_3d_scenes_advanced_import_settings_meshes.webp
109+
:align: center
110+
:alt: Advanced Import Settings dialog (Meshes tab)
111+
112+
Advanced Import Settings dialog (Meshes tab)
113+
114+
The options are as follows:
115+
116+
- **Save to File:** Saves the :ref:`class_Mesh` *resource* to an external file
117+
(this isn't a scene file). You generally don't need to use this for placing
118+
the mesh in a 3D scene – instead, you should instance the 3D scene directly.
119+
However, having direct access to the Mesh resource is useful for specific
120+
nodes, such as :ref:`class_MeshInstance3D`, :ref:`class_MultiMeshInstance3D`,
121+
:ref:`class_GPUParticles3D` or :ref:`class_CPUParticles3D`.
122+
- You will also need to specify an output file path using the option that
123+
appears after enabling **Save to File**. It's recommended to use the ``.res``
124+
output file extension for smaller file sizes and faster loading speeds, as
125+
``.tres`` is inefficient for writing large amounts of data.
126+
- **Generate > Shadow Meshes:** Per-mesh override for the **Meshes > Create
127+
Shadow Meshes** scene-wide import option described in
128+
:ref:`doc_importing_3d_scenes_using_the_import_dock`. **Default** will use the
129+
scene-wide import option, while **Enable** or **Disable** can forcibly enable
130+
or disable this behavior on a specific mesh.
131+
- **Generate > Lightmap UV:** Per-mesh override for the **Meshes > Light
132+
Baking** scene-wide import option described in
133+
:ref:`doc_importing_3d_scenes_using_the_import_dock`. **Default** will use the
134+
scene-wide import option, while **Enable** or **Disable** can forcibly enable
135+
or disable this behavior on a specific mesh.
136+
- Setting this to **Enable** on a scene with the **Static** light baking mode
137+
is equivalent to configuring this mesh to use **Static Lightmaps**. Setting this
138+
to **Disable** on a scene with the **Static Lightmaps** light baking mode is
139+
equivalent to configuring this mesh to use **Static** instead.
140+
- **Generate > LODs:** Per-mesh override for the **Meshes > Generate LODs**
141+
scene-wide import option described in
142+
:ref:`doc_importing_3d_scenes_using_the_import_dock`. **Default** will use the
143+
scene-wide import option, while **Enable** or **Disable** can forcibly enable
144+
or disable this behavior on a specific mesh.
145+
- **LODs > Normal Merge Angle:** The minimum angle difference between two
146+
vertices required to preserve a geometry edge in mesh LOD generation. If
147+
running into visual issues with LOD generation, decreasing this value may help
148+
(at the cost of less efficient LOD generation).
149+
150+
If you select a material, only one option will appear in the panel on the right:
151+
152+
.. figure:: img/importing_3d_scenes_advanced_import_settings_materials.webp
153+
:align: center
154+
:alt: Advanced Import Settings dialog (Materials tab)
155+
156+
Advanced Import Settings dialog (Materials tab)
157+
158+
When **Use External** is checked and an output path is specified, this lets you
159+
use an external material instead of the material that is included in the
160+
original 3D scene file; see the section below.
161+
162+
Extracting materials to separate files
163+
--------------------------------------
164+
165+
While Godot can import materials authored in 3D modeling software, the default
166+
configuration may not be suitable for your needs. For example:
167+
168+
- You want to configure material features not supported by your 3D application.
169+
- You want to use a different texture filtering mode, as this option is
170+
configured in the material since Godot 4.0 (and not in the image).
171+
- You want to replace one of the materials with an entirely different material,
172+
such as a custom shader.
173+
174+
To be able to modify the 3D scene's materials in the Godot editor, you need to
175+
use *external* material resources.
176+
177+
In the top-left corner of the Advanced Import Settings dialog, choose
178+
**Actions… > Extract Materials**:
179+
180+
.. figure:: img/importing_3d_scenes_advanced_import_settings_extract_materials.webp
181+
:align: center
182+
:alt: Extracting all built-in materials to external resources in the Advanced Import Settings dialog
183+
184+
Extracting all built-in materials to external resources in the Advanced Import Settings dialog
185+
186+
After choosing this option, select a folder to extract material ``.tres`` files
187+
to, then confirm the extraction:
188+
189+
.. figure:: img/importing_3d_scenes_advanced_import_settings_extract_materials_confirm.webp
190+
:align: center
191+
:alt: Confirming material extraction in the Advanced Import Settings subdialog
192+
193+
Confirming material extraction in the Advanced Import Settings subdialog
194+
195+
.. note::
196+
197+
After extracting materials, the 3D scene will automatically be configured to
198+
use external material references. As a result, you don't need to manually
199+
enable **Use External** on every material to make the external ``.tres``
200+
material effective.
201+
202+
When **Use External** is enabled, remember that the Advanced Import Settings
203+
dialog will keep displaying the mesh's original materials (the ones designed in
204+
the 3D modeling software). This means your customizations to the materials won't
205+
be visible within this dialog. To preview your modified materials, you need to
206+
place the imported 3D scene in another scene using the editor.
207+
208+
Godot will not overwrite changes made to extracted materials when the source 3D
209+
scene is reimported. However, if the material name is changed in the source 3D
210+
file, the link between the original material and the extracted material will be
211+
lost. As a result, you'll need to use the Advanced Import Settings dialog to
212+
associate the renamed material to the existing extracted material.
213+
214+
The above can be done in the dialog's **Materials** tab by selecting the
215+
material, enabling **Save to File**, then specifying the save path using the
216+
**Path** option that appears after enabling **Save to File**.
217+
218+
Animation options
219+
-----------------
220+
221+
Several extra options are available for the generated :ref:`class_AnimationPlayer`
222+
nodes, as well as their individual animations when they're selected in the
223+
**Scene** tab.
224+
225+
Optimizer
226+
~~~~~~~~~
227+
228+
When animations are imported, an optimizer is run, which reduces the size of the
229+
animation considerably. In general, this should always be turned on unless you
230+
suspect that an animation might be broken due to it being enabled.
231+
232+
Save to file
233+
~~~~~~~~~~~~
234+
235+
By default, animations are saved as built-in. It is possible to save them to a
236+
file instead. This allows adding custom tracks to the animations and keeping
237+
them after a reimport.
238+
239+
Slices
240+
~~~~~~
241+
242+
It is possible to specify multiple animations from a single timeline as slices.
243+
For this to work, the model must have only one animation that is named
244+
``default``. To create slices, change the slice amount to something greater than
245+
zero. You can then name a slice, specify which frames it starts and stops on, and
246+
choose whether the animation loops or not.

0 commit comments

Comments
 (0)