-
-
Notifications
You must be signed in to change notification settings - Fork 282
Expand file tree
/
Copy pathTerrain3D.xml
More file actions
409 lines (402 loc) · 31.8 KB
/
Copy pathTerrain3D.xml
File metadata and controls
409 lines (402 loc) · 31.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Terrain3D" inherits="Node3D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd">
<brief_description>
</brief_description>
<description>
Terrain3D is a high performance, editable terrain system for Godot 4. It provides a clipmap based terrain that supports terrains from 64x64m up to 65.5x65.5km with multiple LODs, 32 textures, and editor tools for importing or creating terrains.
This class handles mesh generation, and management of the whole system. See [url=https://terrain3d.readthedocs.io/en/stable/docs/system_architecture.html]System Architecture[/url] for design details.
</description>
<tutorials>
</tutorials>
<methods>
<method name="bake_mesh" qualifiers="const">
<return type="Mesh" />
<param index="0" name="lod" type="int" />
<param index="1" name="filter" type="int" enum="Terrain3DData.HeightFilter" default="0" />
<description>
Generates a static ArrayMesh for the terrain.
[code skip-lint]lod[/code] - Determines the granularity of the generated mesh. The range is 0-8. 4 is recommended.
[code skip-lint]filter[/code] - Controls how vertex Y coordinates are generated from the height map. See [enum Terrain3DData.HeightFilter].
</description>
</method>
<method name="generate_nav_mesh_source_geometry" qualifiers="const">
<return type="PackedVector3Array" />
<param index="0" name="global_aabb" type="AABB" />
<param index="1" name="require_nav" type="bool" default="true" />
<description>
Generates source geometry faces for input to nav mesh baking. Geometry is only generated where there are no holes and the terrain has been painted as navigable.
[code skip-lint]global_aabb[/code] - If non-empty, geometry will be generated only within this AABB. If empty, geometry will be generated for the entire terrain.
[code skip-lint]require_nav[/code] - If true, this function will only generate geometry for terrain marked navigable. Otherwise, geometry is generated for the entire terrain within the AABB (which can be useful for dynamic and/or runtime nav mesh baking).
</description>
</method>
<method name="get_camera" qualifiers="const">
<return type="Camera3D" />
<description>
Returns the camera the terrain is currently tracking for position, if not overridden by [member clipmap_target]. See [method set_camera].
</description>
</method>
<method name="get_clipmap_target_position" qualifiers="const">
<return type="Vector3" />
<description>
Returns the position on which the terrain mesh is centered, which may be the camera or a target node. See [member clipmap_target].
</description>
</method>
<method name="get_collision_target_position" qualifiers="const">
<return type="Vector3" />
<description>
Returns the position on which the terrain collision is centered, which may be the camera or a target node. See [member collision_target].
</description>
</method>
<method name="get_editor" qualifiers="const">
<return type="Terrain3DEditor" />
<description>
Returns the current Terrain3DEditor instance, if it has been set.
</description>
</method>
<method name="get_intersection">
<return type="Vector3" />
<param index="0" name="src_pos" type="Vector3" />
<param index="1" name="direction" type="Vector3" />
<param index="2" name="gpu_mode" type="bool" default="false" />
<description>
Casts a ray from [code skip-lint]src_pos[/code] pointing towards [code skip-lint]direction[/code], attempting to intersect the terrain. This operation is does not use physics and is not a typical raycast, so enabling collision is unnecessary. This function likely won't work if src_pos is below the terrain.
This function can operate in one of two modes selected by [code skip-lint]gpu_mode[/code]:
- If gpu_mode is disabled (default), it raymarches from src_pos until the terrain is intersected, up to 4000m away. This works with one function call, and can only intersect the terrain where regions exist. It is slower than gpu_mode and gets increasingly slower the farther away the terrain is, though you may not notice.
- If gpu_mode is enabled, it uses the GPU to detect the mouse. This works wherever the terrain is visible, even outside of regions, but may need to be called twice.
GPU mode places a camera at the specified point and "looks" at the terrain. It uses the depth texture to determine how far away the intersection point is. It requires the use of an editor render layer (default 32) while using this function. See [member mouse_layer].
The main caveats of using this mode is that the call to get_intersection() requests a viewport be drawn, but cannot wait for it to finish as there is no "await" in C++ and no force draw function in Godot. So the return value is one frame behind, and invalid on the first call. This also means the function cannot be used more than once per frame. This mode works well when used continuously, once per frame, where one frame of difference won't matter. The editor uses this mode to place the mouse cursor decal.
This mode can also be used by your plugins and games, such as a space ship firing lasers at the terrain and causing an explosion at the hit point. However if the calls aren't continuous, eg driven by the mouse, you'll need to call once to capture the viewport image, wait for it to be drawn, then call again to get the result:
[codeblock]
var target_point = terrain.get_intersection(camera_pos, camera_dir, true)
await RenderingServer.frame_post_draw
target_point = terrain.get_intersection(camera_pos, camera_dir, true)
[/codeblock]
Possible return values:
- If the terrain is hit, the intersection point is returned.
- If there is no intersection, eg. the ray points towards the sky, it returns the maximum double float value [code skip-lint]Vector3(3.402823466e+38F,...)[/code]. You can check this case with this code: [code skip-lint]if point.z > 3.4e38:[/code]
- On error, it returns [code skip-lint]Vector3(NAN, NAN, NAN)[/code] and prints a message to the console.
Also see [method get_raycast_result] and [method Terrain3DData.get_height] for alternative functions.
</description>
</method>
<method name="get_plugin" qualifiers="const">
<return type="Object" />
<description>
Returns the EditorPlugin Object connected to Terrain3D.
</description>
</method>
<method name="get_raycast_result" qualifiers="const">
<return type="Dictionary" />
<param index="0" name="src_pos" type="Vector3" />
<param index="1" name="direction" type="Vector3" />
<param index="2" name="collision_mask" type="int" default="4294967295" />
<param index="3" name="exclude_terrain" type="bool" default="false" />
<description>
This is a helper function that creates a general physics-based raycast and returns the resulting dictionary; it's not limited to terrain use. Raycasts can only detect collision. It is used by our editor using the `on_collision` option to instance on non-terrain meshes.
Direction is added to src_pos and includes magnitude. So to run a raycast from (100, 100, 100) to the ground 100m below, direction would be (0, -110, 0) with margin.
Collision_mask has the physics layers the query will detect as a bitmask. By default, all collision layers are detected.
See [url=https://docs.godotengine.org/en/stable/classes/class_physicsdirectspacestate3d.html#class-physicsdirectspacestate3d-method-intersect-ray]PhysicsDirectSpaceState3D.intersect_ray[/url] for how to interpret the resulting dictionary.
Also see [method get_intersection] and [method Terrain3DData.get_height] for alternative functions.
</description>
</method>
<method name="set_camera">
<return type="void" />
<param index="0" name="camera" type="Camera3D" />
<description>
Specifies the camera on which the terrain centers. It attempts to aquire the camera from the active viewport.
If the camera is instanced in a sub scene or by code, Terrain3D might not be able to find it, will issue an error, and the terrain will center at (0,0,0) causing LODs to not update until a trackable node is set.
Either specify the camera, or specify the clipmap and/or collision targets. It will use the targets first and fall back to the camera if they are null.
See [member clipmap_target] and [member collision_target].
</description>
</method>
<method name="set_editor">
<return type="void" />
<param index="0" name="editor" type="Terrain3DEditor" />
<description>
Sets the current Terrain3DEditor instance.
</description>
</method>
<method name="set_plugin">
<return type="void" />
<param index="0" name="plugin" type="Object" />
<description>
Sets the EditorPlugin Object connected to Terrain3D.
</description>
</method>
<method name="snap">
<return type="void" />
<description>
Queues the terrain mesh and collision to snap their positions to the target nodes on the next physics frame. Typically this only happens if the targets have moved sufficiently far. See [member clipmap_target] and [member collision_target].
</description>
</method>
</methods>
<members>
<member name="assets" type="Terrain3DAssets" setter="set_assets" getter="get_assets">
The list of texture and mesh assets used by Terrain3D. You can optionally save this as an external [code skip-lint].tres[/code] text file if you wish to share it with Terrain3D nodes in other scenes.
</member>
<member name="buffer_shader_override" type="Shader" setter="set_buffer_shader_override" getter="get_buffer_shader_override">
</member>
<member name="buffer_shader_override_enabled" type="bool" setter="set_buffer_shader_override_enabled" getter="is_buffer_shader_override_enabled" default="false">
</member>
<member name="cast_shadows" type="int" setter="set_cast_shadows" getter="get_cast_shadows" enum="RenderingServer.ShadowCastingSetting" default="1">
Tells the renderer how to cast shadows from the terrain onto other objects. This sets [code skip-lint]GeometryInstance3D.ShadowCastingSetting[/code] in the engine.
</member>
<member name="clipmap_target" type="Node3D" setter="set_clipmap_target" getter="get_clipmap_target">
The terrain mesh will center itself at the position of this node. If null, it will fall back to the camera position. See [method set_camera].
</member>
<member name="collision" type="Terrain3DCollision" setter="" getter="get_collision">
The active [Terrain3DCollision] object.
</member>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
The physics layers the terrain lives on. Sets [code skip-lint]CollisionObject3D.collision_layer[/code].
Alias for [member Terrain3DCollision.layer].
Also see [member collision_mask].
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
The physics layers the physics body scans for colliding objects. Sets [code skip-lint]CollisionObject3D.collision_mask[/code].
Alias for [member Terrain3DCollision.mask].
Also see [member collision_layer].
</member>
<member name="collision_mode" type="int" setter="set_collision_mode" getter="get_collision_mode" enum="Terrain3DCollision.CollisionMode" default="1">
The selected mode determines if collision is generated and how. See [enum Terrain3DCollision.CollisionMode] for details.
Alias for [member Terrain3DCollision.mode].
</member>
<member name="collision_priority" type="float" setter="set_collision_priority" getter="get_collision_priority" default="1.0">
The priority with which the physics server uses to solve collisions. The higher the priority, the lower the penetration of a colliding object. Sets [code skip-lint]CollisionObject3D.collision_priority[/code].
Alias for [member Terrain3DCollision.priority].
</member>
<member name="collision_radius" type="int" setter="set_collision_radius" getter="get_collision_radius" default="64">
If [member collision_mode] is Dynamic, this is the distance range within which collision shapes will be generated.
Alias for [member Terrain3DCollision.radius].
</member>
<member name="collision_shape_size" type="int" setter="set_collision_shape_size" getter="get_collision_shape_size" default="16">
If [member collision_mode] is Dynamic, this is the size of each collision shape.
Alias for [member Terrain3DCollision.shape_size].
</member>
<member name="collision_target" type="Node3D" setter="set_collision_target" getter="get_collision_target">
In dynamic mode, the terrain collision will center itself at the position of this node. If null, it will fall back to the [member clipmap_target] position and failing that will use the camera position. See [method set_camera].
</member>
<member name="cull_margin" type="float" setter="set_cull_margin" getter="get_cull_margin" default="0.0">
This margin is added to the vertical component of the terrain bounding box (AABB). The terrain already sets its AABB from [method Terrain3DData.get_height_range], which is calculated while sculpting. This setting only needs to be used if the shader has expanded the terrain beyond the AABB and the terrain meshes are being culled at certain viewing angles. This might happen from using [member Terrain3DMaterial.world_background] with NOISE and a height value larger than the terrain heights. This setting is similar to [code skip-lint]GeometryInstance3D.extra_cull_margin[/code], but it only affects the Y axis.
</member>
<member name="data" type="Terrain3DData" setter="" getter="get_data">
This class manages loading, saving, adding, and removing of Terrain3DRegions and access to their content.
</member>
<member name="data_directory" type="String" setter="set_data_directory" getter="get_data_directory" default="""">
The directory where terrain data will be saved to and loaded from.
</member>
<member name="debug_level" type="int" setter="set_debug_level" getter="get_debug_level" enum="Terrain3D.DebugLevel" default="0">
The verbosity of debug messages printed to the console. Errors and warnings are always printed. This can also be set via command line using [code skip-lint]--terrain3d-debug=LEVEL[/code] where [code skip-lint]LEVEL[/code] is one of [code skip-lint]ERROR, INFO, DEBUG, EXTREME[/code]. The last includes continuously recurring messages like position updates for the mesh as the camera moves around.
</member>
<member name="displacement_scale" type="float" setter="set_displacement_scale" getter="get_displacement_scale" default="1.0">
A global multiplier for all displaced textures. This is the maximum distance that 2 adjacent verticies can be vertically seperated by. Setting this 1.0 would mean a maximum of + 0.5m, and -0.5m deviation from the collision mesh.
Alias for [member Terrain3DMaterial.displacement_scale].
</member>
<member name="displacement_sharpness" type="float" setter="set_displacement_sharpness" getter="get_displacement_sharpness" default="0.25">
Adjusts the transition between textures. When set at `1.0`, the blending of displacment between textures will match the aldebo/normal blend sharpness exactly. Lower values will have a softer transition, avoiding harsh shapes, without compromising the abldeo and normal blend sharpness. If set at or very near to `0.0`, it is possible that more displaced textures can affect less displaced textures at low blend values even if not visible.
Alias for [member Terrain3DMaterial.displacement_sharpness].
</member>
<member name="free_editor_textures" type="bool" setter="set_free_editor_textures" getter="get_free_editor_textures" default="true">
Frees ground textures used for editing in _ready(). These textures are used to generate the TextureArrays, so if you don't change any [Terrain3DTextureAsset] settings in game, this can be enabled. Also reloads the texture asset list in _enter_tree() in case you load scenes via code and need the textures again. Calls [method Terrain3DAssets.clear_textures].
</member>
<member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode" default="1">
Tells the renderer which global illumination mode to use for Terrain3D. This sets [code skip-lint]GeometryInstance3D.gi_mode[/code] in the engine.
</member>
<member name="instancer" type="Terrain3DInstancer" setter="" getter="get_instancer">
The active [Terrain3DInstancer] object.
</member>
<member name="instancer_mode" type="int" setter="set_instancer_mode" getter="get_instancer_mode" enum="Terrain3DInstancer.InstancerMode" default="1">
Normal - Generates MultiMeshInstance3Ds and renders all instances as normal.
Disabled - prevents the instancer from creating any MultiMeshInstance3Ds.
Alias for [member Terrain3DInstancer.mode].
</member>
<member name="label_distance" type="float" setter="set_label_distance" getter="get_label_distance" default="0.0">
If label_distance is non-zero (try 1024-4096) it will generate and display region coordinates in the viewport so you can identify the exact region files you are editing. This setting is the visible distance of the labels.
</member>
<member name="label_size" type="int" setter="set_label_size" getter="get_label_size" default="48">
Sets the font size for region labels. See [member label_distance].
</member>
<member name="material" type="Terrain3DMaterial" setter="set_material" getter="get_material">
A custom material for Terrain3D. You can optionally save this as an external [code skip-lint].tres[/code] text file if you wish to share it with instances of Terrain3D in other scenes. See [Terrain3DMaterial].
</member>
<member name="mesh_lods" type="int" setter="set_mesh_lods" getter="get_mesh_lods" default="7">
The number of lods generated in the mesh. Enable wireframe mode in the viewport to see them.
</member>
<member name="mesh_size" type="int" setter="set_mesh_size" getter="get_mesh_size" default="48">
The correlated size of the terrain meshes. Lod0 has [code skip-lint]4*mesh_size + 2[/code] quads per side. E.g. when mesh_size=8, lod0 has 34 quads to a side, including 2 quads for seams.
</member>
<member name="mouse_layer" type="int" setter="set_mouse_layer" getter="get_mouse_layer" default="32">
Godot supports 32 render layers. For most objects, only layers 1-20 are available for selection in the inspector. 21-32 are settable via code, and are considered reserved for editor plugins.
This variable sets the editor render layer (21-32) to be used by [code skip-lint]get_intersection[/code], which the mouse cursor uses.
You may place other objects on this layer, however [code skip-lint]get_intersection[/code] will report intersections with them. So either dedicate this layer to Terrain3D, or if you must use all 32 layers, dedicate this one during editing or when using [code skip-lint]get_intersection[/code], and then you can use it during game play.
See [method get_intersection].
</member>
<member name="physics_material" type="PhysicsMaterial" setter="set_physics_material" getter="get_physics_material">
Applies a [code skip-lint]PhysicsMaterial[/code] override to the entire terrain StaticBody.
Alias for [member Terrain3DCollision.physics_material] See that entry for details.
</member>
<member name="region_size" type="int" setter="change_region_size" getter="get_region_size" enum="Terrain3D.RegionSize" default="256">
The number of vertices in each region, and the number of pixels for each map in [Terrain3DRegion]. 1 pixel always corresponds to 1 vertex. [member Terrain3D.vertex_spacing] laterally scales regions, but does not change the number of vertices or pixels in each.
There is no undo for this operation. However you can apply it again to reslice, as long as your data doesn't hit the maximum boundaries.
</member>
<member name="render_layers" type="int" setter="set_render_layers" getter="get_render_layers" default="2147483649">
The render layers the terrain is drawn on. This sets [code skip-lint]VisualInstance3D.layers[/code] in the engine. The defaults is layer 1 and 32 (for the mouse cursor). When you set this, make sure the layer for [member mouse_layer] is included, or set that variable again after this so that the mouse cursor works.
</member>
<member name="save_16_bit" type="bool" setter="set_save_16_bit" getter="get_save_16_bit" default="false">
If enabled, heightmaps are saved as 16-bit half-precision to reduce file size. Files are always loaded in 32-bit for editing. Upon save, a copy of the heightmap is converted to 16-bit for writing. It does not change what is currently in memory.
This process is lossy. 16-bit precision gets increasingly worse with every power of 2. At a height of 256m, the precision interval is .25m. At 512m it is .5m. At 1024m it is 1m. Saving a height of 1024.4m will be rounded down to 1024m.
</member>
<member name="color_compression_mode" type="ColorCompressMode" setter="set_color_compression_mode" getter="get_color_compression_mode" default="None">
The selected compression mode will be used to compress the color maps, to be used during runtime. The uncompressed color map will be used during editing. Upon save, a copy of the color map is compressed to the selected compression mode. During runtime, the compressed color map will be used instead of the uncompressed color map.
</member>
<member name="free_uncompressed_color_maps" type="bool" setter="set_free_uncompressed_color_maps" getter="get_free_uncompressed_color_maps" default="true">
Frees the uncompressed color maps for the regions, if the application is not running in the editor, and [member color_compression_mode] is set to something other than None. The uncompressed color maps are also freed upon exporting the game.
</member>
<member name="show_autoshader" type="bool" setter="set_show_autoshader" getter="get_show_autoshader" default="false">
Displays the area designated for use by the autoshader, which shows materials based upon slope.
Alias for [member Terrain3DMaterial.show_autoshader].
</member>
<member name="show_checkered" type="bool" setter="set_show_checkered" getter="get_show_checkered" default="false">
Shows a checkerboard display using a shader rendered pattern. This is turned on if the Texture List is empty.
Note that when a blank texture slot is created, a 1k checkerboard texture is generated and stored in the texture slot. That takes VRAM. The two patterns have a slightly different scale.
Alias for [member Terrain3DMaterial.show_checkered].
</member>
<member name="show_colormap" type="bool" setter="set_show_colormap" getter="get_show_colormap" default="false">
Shows the color map in the albedo channel.
Alias for [member Terrain3DMaterial.show_colormap].
</member>
<member name="show_contours" type="bool" setter="set_show_contours" getter="get_show_contours" default="false">
Overlays contour lines on the terrain. Customize the options in the material when enabled. Press `4` with the mouse in the viewport to toggle.
Alias for [member Terrain3DMaterial.show_contours].
</member>
<member name="show_control_angle" type="bool" setter="set_show_control_angle" getter="get_show_control_angle" default="false">
Albedo shows the painted angle. Orange means 0°, Yellow 270°, Cyan 180°, Violet 90°. Or warm colors towards -Z, cool colors +Z, greens/yellows +X, reds/blues -X. Draw all angles coming from the center of a circle for a better understanding.
Alias for [member Terrain3DMaterial.show_control_angle].
</member>
<member name="show_control_blend" type="bool" setter="set_show_control_blend" getter="get_show_control_blend" default="false">
Displays the values used to blend the textures. Blue shows the autoshader blending, red shows manually painted blending.
Alias for [member Terrain3DMaterial.show_control_blend].
</member>
<member name="show_control_scale" type="bool" setter="set_show_control_scale" getter="get_show_control_scale" default="false">
Albedo shows the painted scale. Larger scales are more red, smaller scales are more blue. 0.5 middle grey is the default 100% scale.
Alias for [member Terrain3DMaterial.show_control_scale].
</member>
<member name="show_control_texture" type="bool" setter="set_show_control_texture" getter="get_show_control_texture" default="false">
Albedo shows the base and overlay texture indices defined by the control map. Red pixels indicate the base texture, with brightness showing texture ids 0 to 31. Green pixels indicate the overlay texture. Yellow indicates both.
Alias for [member Terrain3DMaterial.show_control_texture].
</member>
<member name="show_displacement_buffer" type="bool" setter="set_show_displacement_buffer" getter="get_show_displacement_buffer" default="false">
Alias for [member Terrain3DMaterial.show_displacement_buffer].
</member>
<member name="show_grey" type="bool" setter="set_show_grey" getter="get_show_grey" default="false">
Albedo is set to 0.2 grey.
Alias for [member Terrain3DMaterial.show_grey].
</member>
<member name="show_grid" type="bool" setter="set_show_region_grid" getter="get_show_region_grid" default="false">
Alias for [member Terrain3DMaterial.show_region_grid]. Press `1` with the mouse in the viewport to toggle.
</member>
<member name="show_heightmap" type="bool" setter="set_show_heightmap" getter="get_show_heightmap" default="false">
Albedo is a white to black gradient depending on height. The gradient is scaled to a height of 300, so above that or far below 0 will be all white or black.
Alias for [member Terrain3DMaterial.show_heightmap].
</member>
<member name="show_instancer_grid" type="bool" setter="set_show_instancer_grid" getter="get_show_instancer_grid" default="false">
Overlays the 32x32m instancer grid on the terrain, which shows how the instancer data is partitioned. Press `2` with the mouse in the viewport to toggle.
Alias for [member Terrain3DMaterial.show_instancer_grid].
</member>
<member name="show_jaggedness" type="bool" setter="set_show_jaggedness" getter="get_show_jaggedness" default="false">
Highlights non-smooth areas of the terrain. Jagged peaks, troughs, or edges that are a bit rough with sharp angles between vertices.
Alias for [member Terrain3DMaterial.show_jaggedness].
</member>
<member name="show_navigation" type="bool" setter="set_show_navigation" getter="get_show_navigation" default="false">
Displays the area designated for generating the navigation mesh.
Alias for [member Terrain3DMaterial.show_navigation].
</member>
<member name="show_region_grid" type="bool" setter="set_show_region_grid" getter="get_show_region_grid" default="false">
Overlays the region grid on the terrain. This is more accurate than the region grid gizmo for determining where the region border is when editing. Press `1` with the mouse in the viewport to toggle.
Alias for [member Terrain3DMaterial.show_region_grid].
</member>
<member name="show_roughmap" type="bool" setter="set_show_roughmap" getter="get_show_roughmap" default="false">
Albedo is set to the roughness modification map as grey scale. Middle grey, 0.5 means no roughness modification. Black would be high gloss while white is very rough.
Alias for [member Terrain3DMaterial.show_roughmap].
</member>
<member name="show_texture_albedo" type="bool" setter="set_show_texture_albedo" getter="get_show_texture_albedo" default="false">
Albedo textures are shown only. Other channels are excluded.
Alias for [member Terrain3DMaterial.show_texture_albedo].
</member>
<member name="show_texture_ao" type="bool" setter="set_show_texture_ao" getter="get_show_texture_ao" default="false">
Albedo is set to the painted Ambient Occlusion textures.
Alias for [member Terrain3DMaterial.show_texture_ao].
</member>
<member name="show_texture_height" type="bool" setter="set_show_texture_height" getter="get_show_texture_height" default="false">
Albedo is set to the painted Height textures.
Alias for [member Terrain3DMaterial.show_texture_height].
</member>
<member name="show_texture_normal" type="bool" setter="set_show_texture_normal" getter="get_show_texture_normal" default="false">
Albedo is set to the painted Normal textures.
Alias for [member Terrain3DMaterial.show_texture_normal].
</member>
<member name="show_texture_rough" type="bool" setter="set_show_texture_rough" getter="get_show_texture_rough" default="false">
Albedo is set to the painted Roughness textures. This is different from the roughness modification map above.
Alias for [member Terrain3DMaterial.show_texture_rough].
</member>
<member name="show_vertex_grid" type="bool" setter="set_show_vertex_grid" getter="get_show_vertex_grid" default="false">
Overlays the vertex grid on the terrain, showing where each vertex is. Press `3` with the mouse in the viewport to toggle.
Alias for [member Terrain3DMaterial.show_vertex_grid].
</member>
<member name="tessellation_level" type="int" setter="set_tessellation_level" getter="get_tessellation_level" default="0">
Enables displacement using texture heights for additional mesh detail when set above 0. This creates up to 6 additional subdivisions of the terrain mesh below LOD0, and adds a displacement buffer configurable in the material. You can see this in wireframe mode. Set to 0 to disable displacement. See [member Terrain3DMaterial.show_displacement_buffer] and look at the Displacement Buffer debug view.
</member>
<member name="version" type="String" setter="" getter="get_version" default=""1.1.0-dev"">
The current version of Terrain3D.
</member>
<member name="vertex_spacing" type="float" setter="set_vertex_spacing" getter="get_vertex_spacing" default="1.0">
The distance between vertices. Godot units are typically considered to be meters. This laterally scales the terrain on X and Z axes.
This variable changes the global position of landscape features. A mountain peak might be at (512, 512), but with a vertex spacing of 2.0 it is now located at (1024, 1024).
All Terrain3D functions with a global_position expect an absolute global value. If you would normally use [method Terrain3DData.import_images] to import an image in the region at (-1024, -1024), with a vertex_spacing of 2, you'll need to import that image at (-2048, -2048) to place it in the same region.
To scale heights, export the height map and reimport it with a new height scale.
</member>
</members>
<signals>
<signal name="assets_changed">
<description>
Emitted when [member assets] is changed.
</description>
</signal>
<signal name="material_changed">
<description>
Emitted when [member material] is changed.
</description>
</signal>
</signals>
<constants>
<constant name="ERROR" value="0" enum="DebugLevel">
Errors and warnings always print.
</constant>
<constant name="INFO" value="1" enum="DebugLevel">
Typically every function call and other important informational messages.
</constant>
<constant name="DEBUG" value="2" enum="DebugLevel">
Detailed steps within functions.
</constant>
<constant name="EXTREME" value="3" enum="DebugLevel">
Messages for continuous operations like snapping and editing.
</constant>
<constant name="SIZE_64" value="64" enum="RegionSize">
The region size is 64 x 64 meters, vertices, and pixels on Image maps.
</constant>
<constant name="SIZE_128" value="128" enum="RegionSize">
The region size is 128 x 128 meters, vertices, and pixels on Image maps.
</constant>
<constant name="SIZE_256" value="256" enum="RegionSize">
The region size is 256 x 256 meters, vertices, and pixels on Image maps. (default)
</constant>
<constant name="SIZE_512" value="512" enum="RegionSize">
The region size is 512 x 512 meters, vertices, and pixels on Image maps.
</constant>
<constant name="SIZE_1024" value="1024" enum="RegionSize">
The region size is 1024 x 1024 meters, vertices, and pixels on Image maps.
</constant>
<constant name="SIZE_2048" value="2048" enum="RegionSize">
The region size is 2048 x 2048 meters, vertices, and pixels on Image maps.
</constant>
</constants>
</class>