Skip to content

Commit c7c8d75

Browse files
committed
Move advanced import settings to their own page
1 parent 471ad88 commit c7c8d75

File tree

4 files changed

+251
-219
lines changed

4 files changed

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

0 commit comments

Comments
 (0)