Update docs
This commit is contained in:
parent
709ce21570
commit
6665781676
|
|
@ -5,14 +5,14 @@ body:
|
|||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Has your issue already been addressed in [Installation](https://terrain3d.readthedocs.io/en/latest/docs/installation.html), [Preparing textures](https://terrain3d.readthedocs.io/en/latest/docs/texture_prep.html), [Troubleshooting](https://terrain3d.readthedocs.io/en/latest/docs/troubleshooting.html), or [Tips](https://terrain3d.readthedocs.io/en/latest/docs/tips.html)?
|
||||
Has your issue already been addressed in [Installation](https://terrain3d.readthedocs.io/en/latest/docs/installation.html), [Preparing textures](https://terrain3d.readthedocs.io/en/latest/docs/texture_prep.html), [Troubleshooting](https://terrain3d.readthedocs.io/en/latest/docs/troubleshooting.html), or [Tips](https://terrain3d.readthedocs.io/en/latest/docs/tips_technical.html)?
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Terrain3D version
|
||||
description: >
|
||||
Release version or the commit string of a development build. No -dev versions, provide the commit shown in `git log`.
|
||||
placeholder: v0.9.0
|
||||
placeholder: v1.0.0
|
||||
validations:
|
||||
required: true
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ body:
|
|||
label: System information
|
||||
description: |
|
||||
- Specify the version of Godot and your OS, GPU and rendering backend (Vulkan Forward+, Mobile, Compatibility/WebGL).
|
||||
- Starting with Godot 4.1, you can copy this information to your clipboard by using *Help > Copy System Info* at the top of the editor window.
|
||||
- You can copy this information to your clipboard by using *Help > Copy System Info* at the top of the editor window.
|
||||
placeholder: Godot v4.1.3.stable - Windows 10/64 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 Laptop GPU (NVIDIA; 31.0.15.4633)
|
||||
validations:
|
||||
required: true
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ body:
|
|||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Have you reviewed the [status of current and pending features](https://terrain3d.readthedocs.io/en/latest/docs/tips.html#are-certain-features-supported)?
|
||||
Have you reviewed the [status of current and pending features](https://terrain3d.readthedocs.io/en/latest/docs/tips_technical.html#are-certain-features-supported)?
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ Properties
|
|||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`Terrain3DInstancer<class_Terrain3DInstancer>` | :ref:`instancer<class_Terrain3D_property_instancer>` | |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`InstancerMode<enum_Terrain3DInstancer_InstancerMode>` | :ref:`instancer_mode<class_Terrain3D_property_instancer_mode>` | ``1`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``float`` | :ref:`label_distance<class_Terrain3D_property_label_distance>` | ``0.0`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`label_size<class_Terrain3D_property_label_size>` | ``48`` |
|
||||
|
|
@ -110,8 +112,6 @@ Properties
|
|||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_instancer_grid<class_Terrain3D_property_show_instancer_grid>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_instances<class_Terrain3D_property_show_instances>` | ``true`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_jaggedness<class_Terrain3D_property_show_jaggedness>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_navigation<class_Terrain3D_property_show_navigation>` | ``false`` |
|
||||
|
|
@ -120,6 +120,10 @@ Properties
|
|||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_roughmap<class_Terrain3D_property_show_roughmap>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_albedo<class_Terrain3D_property_show_texture_albedo>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_ao<class_Terrain3D_property_show_texture_ao>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_height<class_Terrain3D_property_show_texture_height>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_normal<class_Terrain3D_property_show_texture_normal>` | ``false`` |
|
||||
|
|
@ -156,7 +160,7 @@ Methods
|
|||
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Vector3`` | :ref:`get_intersection<class_Terrain3D_method_get_intersection>`\ (\ src_pos\: ``Vector3``, direction\: ``Vector3``, gpu_mode\: ``bool`` = false\ ) |
|
||||
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``EditorPlugin`` | :ref:`get_plugin<class_Terrain3D_method_get_plugin>`\ (\ ) |const| |
|
||||
| ``Object`` | :ref:`get_plugin<class_Terrain3D_method_get_plugin>`\ (\ ) |const| |
|
||||
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Dictionary`` | :ref:`get_raycast_result<class_Terrain3D_method_get_raycast_result>`\ (\ src_pos\: ``Vector3``, direction\: ``Vector3``, collision_mask\: ``int`` = 4294967295, exclude_terrain\: ``bool`` = false\ ) |const| |
|
||||
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
|
@ -164,7 +168,7 @@ Methods
|
|||
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_editor<class_Terrain3D_method_set_editor>`\ (\ editor\: :ref:`Terrain3DEditor<class_Terrain3DEditor>`\ ) |
|
||||
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_plugin<class_Terrain3D_method_set_plugin>`\ (\ plugin\: ``EditorPlugin``\ ) |
|
||||
| |void| | :ref:`set_plugin<class_Terrain3D_method_set_plugin>`\ (\ plugin\: ``Object``\ ) |
|
||||
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`snap<class_Terrain3D_method_snap>`\ (\ ) |
|
||||
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
|
@ -390,8 +394,12 @@ The active :ref:`Terrain3DCollision<class_Terrain3DCollision>` object.
|
|||
- |void| **set_collision_layer**\ (\ value\: ``int``\ )
|
||||
- ``int`` **get_collision_layer**\ (\ )
|
||||
|
||||
The physics layers the terrain lives on. Sets ``CollisionObject3D.collision_layer``.
|
||||
|
||||
Alias for :ref:`Terrain3DCollision.layer<class_Terrain3DCollision_property_layer>`.
|
||||
|
||||
Also see :ref:`collision_mask<class_Terrain3D_property_collision_mask>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
|
@ -407,8 +415,12 @@ Alias for :ref:`Terrain3DCollision.layer<class_Terrain3DCollision_property_layer
|
|||
- |void| **set_collision_mask**\ (\ value\: ``int``\ )
|
||||
- ``int`` **get_collision_mask**\ (\ )
|
||||
|
||||
The physics layers the physics body scans for colliding objects. Sets ``CollisionObject3D.collision_mask``.
|
||||
|
||||
Alias for :ref:`Terrain3DCollision.mask<class_Terrain3DCollision_property_mask>`.
|
||||
|
||||
Also see :ref:`collision_layer<class_Terrain3D_property_collision_layer>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
|
@ -424,6 +436,8 @@ Alias for :ref:`Terrain3DCollision.mask<class_Terrain3DCollision_property_mask>`
|
|||
- |void| **set_collision_mode**\ (\ value\: :ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>`\ )
|
||||
- :ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>` **get_collision_mode**\ (\ )
|
||||
|
||||
The selected mode determines if collision is generated and how. See :ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>` for details.
|
||||
|
||||
Alias for :ref:`Terrain3DCollision.mode<class_Terrain3DCollision_property_mode>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -441,6 +455,8 @@ Alias for :ref:`Terrain3DCollision.mode<class_Terrain3DCollision_property_mode>`
|
|||
- |void| **set_collision_priority**\ (\ value\: ``float``\ )
|
||||
- ``float`` **get_collision_priority**\ (\ )
|
||||
|
||||
The priority with which the physics server uses to solve collisions. The higher the priority, the lower the penetration of a colliding object. Sets ``CollisionObject3D.collision_priority``.
|
||||
|
||||
Alias for :ref:`Terrain3DCollision.priority<class_Terrain3DCollision_property_priority>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -458,6 +474,8 @@ Alias for :ref:`Terrain3DCollision.priority<class_Terrain3DCollision_property_pr
|
|||
- |void| **set_collision_radius**\ (\ value\: ``int``\ )
|
||||
- ``int`` **get_collision_radius**\ (\ )
|
||||
|
||||
If :ref:`collision_mode<class_Terrain3D_property_collision_mode>` is Dynamic, this is the distance range within which collision shapes will be generated.
|
||||
|
||||
Alias for :ref:`Terrain3DCollision.radius<class_Terrain3DCollision_property_radius>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -475,6 +493,8 @@ Alias for :ref:`Terrain3DCollision.radius<class_Terrain3DCollision_property_radi
|
|||
- |void| **set_collision_shape_size**\ (\ value\: ``int``\ )
|
||||
- ``int`` **get_collision_shape_size**\ (\ )
|
||||
|
||||
If :ref:`collision_mode<class_Terrain3D_property_collision_mode>` is Dynamic, this is the size of each collision shape.
|
||||
|
||||
Alias for :ref:`Terrain3DCollision.shape_size<class_Terrain3DCollision_property_shape_size>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -615,6 +635,27 @@ The active :ref:`Terrain3DInstancer<class_Terrain3DInstancer>` object.
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_instancer_mode:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`InstancerMode<enum_Terrain3DInstancer_InstancerMode>` **instancer_mode** = ``1`` :ref:`🔗<class_Terrain3D_property_instancer_mode>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_instancer_mode**\ (\ value\: :ref:`InstancerMode<enum_Terrain3DInstancer_InstancerMode>`\ )
|
||||
- :ref:`InstancerMode<enum_Terrain3DInstancer_InstancerMode>` **get_instancer_mode**\ (\ )
|
||||
|
||||
Normal - Generates MultiMeshInstance3Ds and renders all instances as normal.
|
||||
|
||||
Disabled - prevents the instancer from creating any MultiMeshInstance3Ds.
|
||||
|
||||
Alias for :ref:`Terrain3DInstancer.mode<class_Terrain3DInstancer_property_mode>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_label_distance:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
|
@ -734,7 +775,9 @@ See :ref:`get_intersection()<class_Terrain3D_method_get_intersection>`.
|
|||
- |void| **set_physics_material**\ (\ value\: ``PhysicsMaterial``\ )
|
||||
- ``PhysicsMaterial`` **get_physics_material**\ (\ )
|
||||
|
||||
Alias for :ref:`Terrain3DCollision.physics_material<class_Terrain3DCollision_property_physics_material>`.
|
||||
Applies a ``PhysicsMaterial`` override to the entire terrain StaticBody.
|
||||
|
||||
Alias for :ref:`Terrain3DCollision.physics_material<class_Terrain3DCollision_property_physics_material>` See that entry for details.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
|
@ -806,6 +849,8 @@ This process is lossy. 16-bit precision gets increasingly worse with every power
|
|||
- |void| **set_show_autoshader**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_autoshader**\ (\ )
|
||||
|
||||
Displays the area designated for use by the autoshader, which shows materials based upon slope.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_autoshader<class_Terrain3DMaterial_property_show_autoshader>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -823,6 +868,10 @@ Alias for :ref:`Terrain3DMaterial.show_autoshader<class_Terrain3DMaterial_proper
|
|||
- |void| **set_show_checkered**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_checkered**\ (\ )
|
||||
|
||||
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 :ref:`Terrain3DMaterial.show_checkered<class_Terrain3DMaterial_property_show_checkered>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -840,6 +889,8 @@ Alias for :ref:`Terrain3DMaterial.show_checkered<class_Terrain3DMaterial_propert
|
|||
- |void| **set_show_colormap**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_colormap**\ (\ )
|
||||
|
||||
Shows the color map in the albedo channel.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_colormap<class_Terrain3DMaterial_property_show_colormap>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -857,7 +908,9 @@ Alias for :ref:`Terrain3DMaterial.show_colormap<class_Terrain3DMaterial_property
|
|||
- |void| **set_show_contours**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_contours**\ (\ )
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_contours<class_Terrain3DMaterial_property_show_contours>`. Press `4` with the mouse in the viewport to toggle. Customize in the material.
|
||||
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 :ref:`Terrain3DMaterial.show_contours<class_Terrain3DMaterial_property_show_contours>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
|
@ -874,6 +927,8 @@ Alias for :ref:`Terrain3DMaterial.show_contours<class_Terrain3DMaterial_property
|
|||
- |void| **set_show_control_angle**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_control_angle**\ (\ )
|
||||
|
||||
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 :ref:`Terrain3DMaterial.show_control_angle<class_Terrain3DMaterial_property_show_control_angle>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -891,6 +946,8 @@ Alias for :ref:`Terrain3DMaterial.show_control_angle<class_Terrain3DMaterial_pro
|
|||
- |void| **set_show_control_blend**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_control_blend**\ (\ )
|
||||
|
||||
Displays the values used to blend the textures. Blue shows the autoshader blending, red shows manually painted blending.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_control_blend<class_Terrain3DMaterial_property_show_control_blend>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -908,6 +965,8 @@ Alias for :ref:`Terrain3DMaterial.show_control_blend<class_Terrain3DMaterial_pro
|
|||
- |void| **set_show_control_scale**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_control_scale**\ (\ )
|
||||
|
||||
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 :ref:`Terrain3DMaterial.show_control_scale<class_Terrain3DMaterial_property_show_control_scale>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -925,6 +984,8 @@ Alias for :ref:`Terrain3DMaterial.show_control_scale<class_Terrain3DMaterial_pro
|
|||
- |void| **set_show_control_texture**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_control_texture**\ (\ )
|
||||
|
||||
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 :ref:`Terrain3DMaterial.show_control_texture<class_Terrain3DMaterial_property_show_control_texture>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -942,6 +1003,8 @@ Alias for :ref:`Terrain3DMaterial.show_control_texture<class_Terrain3DMaterial_p
|
|||
- |void| **set_show_grey**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_grey**\ (\ )
|
||||
|
||||
Albedo is set to 0.2 grey.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_grey<class_Terrain3DMaterial_property_show_grey>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -976,6 +1039,8 @@ Alias for :ref:`Terrain3DMaterial.show_region_grid<class_Terrain3DMaterial_prope
|
|||
- |void| **set_show_heightmap**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_heightmap**\ (\ )
|
||||
|
||||
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 :ref:`Terrain3DMaterial.show_heightmap<class_Terrain3DMaterial_property_show_heightmap>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -993,24 +1058,9 @@ Alias for :ref:`Terrain3DMaterial.show_heightmap<class_Terrain3DMaterial_propert
|
|||
- |void| **set_show_instancer_grid**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_instancer_grid**\ (\ )
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_instancer_grid<class_Terrain3DMaterial_property_show_instancer_grid>`. Press `2` with the mouse in the viewport to toggle.
|
||||
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.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_show_instances:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``bool`` **show_instances** = ``true`` :ref:`🔗<class_Terrain3D_property_show_instances>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_show_instances**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_instances**\ (\ )
|
||||
|
||||
Shows or hides all instancer meshes.
|
||||
Alias for :ref:`Terrain3DMaterial.show_instancer_grid<class_Terrain3DMaterial_property_show_instancer_grid>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
|
@ -1027,6 +1077,8 @@ Shows or hides all instancer meshes.
|
|||
- |void| **set_show_jaggedness**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_jaggedness**\ (\ )
|
||||
|
||||
Highlights non-smooth areas of the terrain. Jagged peaks, troughs, or edges that are a bit rough with sharp angles between vertices.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_jaggedness<class_Terrain3DMaterial_property_show_jaggedness>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -1044,6 +1096,8 @@ Alias for :ref:`Terrain3DMaterial.show_jaggedness<class_Terrain3DMaterial_proper
|
|||
- |void| **set_show_navigation**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_navigation**\ (\ )
|
||||
|
||||
Displays the area designated for generating the navigation mesh.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_navigation<class_Terrain3DMaterial_property_show_navigation>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -1061,7 +1115,9 @@ Alias for :ref:`Terrain3DMaterial.show_navigation<class_Terrain3DMaterial_proper
|
|||
- |void| **set_show_region_grid**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_region_grid**\ (\ )
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_region_grid<class_Terrain3DMaterial_property_show_region_grid>`. Press `1` with the mouse in the viewport to toggle.
|
||||
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 :ref:`Terrain3DMaterial.show_region_grid<class_Terrain3DMaterial_property_show_region_grid>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
|
@ -1078,12 +1134,52 @@ Alias for :ref:`Terrain3DMaterial.show_region_grid<class_Terrain3DMaterial_prope
|
|||
- |void| **set_show_roughmap**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_roughmap**\ (\ )
|
||||
|
||||
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 :ref:`Terrain3DMaterial.show_roughmap<class_Terrain3DMaterial_property_show_roughmap>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_show_texture_albedo:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``bool`` **show_texture_albedo** = ``false`` :ref:`🔗<class_Terrain3D_property_show_texture_albedo>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_show_texture_albedo**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_texture_albedo**\ (\ )
|
||||
|
||||
Albedo textures are shown only. Other channels are excluded.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_texture_albedo<class_Terrain3DMaterial_property_show_texture_albedo>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_show_texture_ao:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``bool`` **show_texture_ao** = ``false`` :ref:`🔗<class_Terrain3D_property_show_texture_ao>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_show_texture_ao**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_texture_ao**\ (\ )
|
||||
|
||||
Albedo is set to the painted Ambient Occlusion textures.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_texture_ao<class_Terrain3DMaterial_property_show_texture_ao>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_show_texture_height:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
|
@ -1095,6 +1191,8 @@ Alias for :ref:`Terrain3DMaterial.show_roughmap<class_Terrain3DMaterial_property
|
|||
- |void| **set_show_texture_height**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_texture_height**\ (\ )
|
||||
|
||||
Albedo is set to the painted Height textures.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_texture_height<class_Terrain3DMaterial_property_show_texture_height>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -1112,6 +1210,8 @@ Alias for :ref:`Terrain3DMaterial.show_texture_height<class_Terrain3DMaterial_pr
|
|||
- |void| **set_show_texture_normal**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_texture_normal**\ (\ )
|
||||
|
||||
Albedo is set to the painted Normal textures.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_texture_normal<class_Terrain3DMaterial_property_show_texture_normal>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -1129,6 +1229,8 @@ Alias for :ref:`Terrain3DMaterial.show_texture_normal<class_Terrain3DMaterial_pr
|
|||
- |void| **set_show_texture_rough**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_texture_rough**\ (\ )
|
||||
|
||||
Albedo is set to the painted Roughness textures. This is different from the roughness modification map above.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_texture_rough<class_Terrain3DMaterial_property_show_texture_rough>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
|
@ -1146,7 +1248,9 @@ Alias for :ref:`Terrain3DMaterial.show_texture_rough<class_Terrain3DMaterial_pro
|
|||
- |void| **set_show_vertex_grid**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_vertex_grid**\ (\ )
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_vertex_grid<class_Terrain3DMaterial_property_show_vertex_grid>`. Press `3` with the mouse in the viewport to toggle.
|
||||
Overlays the vertex grid on the terrain, showing where each vertex is. Press `3` with the mouse in the viewport to toggle.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_vertex_grid<class_Terrain3DMaterial_property_show_vertex_grid>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
|
@ -1282,13 +1386,13 @@ Returns the current Terrain3DEditor instance, if it has been set.
|
|||
|
||||
``Vector3`` **get_intersection**\ (\ src_pos\: ``Vector3``, direction\: ``Vector3``, gpu_mode\: ``bool`` = false\ ) :ref:`🔗<class_Terrain3D_method_get_intersection>`
|
||||
|
||||
Casts a ray from ``src_pos`` pointing towards ``direction``, attempting to intersect the terrain. This operation is does not use physics and is not a typical raycast, so enabling collision is unnecessary.
|
||||
Casts a ray from ``src_pos`` pointing towards ``direction``, 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 defined by ``gpu_mode``:
|
||||
This function can operate in one of two modes selected by ``gpu_mode``:
|
||||
|
||||
- If gpu_mode is disabled (default), it raymarches from the camera until the terrain is intersected, up to 4000m away. This works with one function call, but only 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 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.
|
||||
|
||||
|
||||
|
||||
|
|
@ -1334,9 +1438,9 @@ Also see :ref:`get_raycast_result()<class_Terrain3D_method_get_raycast_result>`
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
``EditorPlugin`` **get_plugin**\ (\ ) |const| :ref:`🔗<class_Terrain3D_method_get_plugin>`
|
||||
``Object`` **get_plugin**\ (\ ) |const| :ref:`🔗<class_Terrain3D_method_get_plugin>`
|
||||
|
||||
Returns the EditorPlugin connected to Terrain3D.
|
||||
Returns the EditorPlugin Object connected to Terrain3D.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
|
@ -1396,9 +1500,9 @@ Sets the current Terrain3DEditor instance.
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_plugin**\ (\ plugin\: ``EditorPlugin``\ ) :ref:`🔗<class_Terrain3D_method_set_plugin>`
|
||||
|void| **set_plugin**\ (\ plugin\: ``Object``\ ) :ref:`🔗<class_Terrain3D_method_set_plugin>`
|
||||
|
||||
Sets the EditorPlugin connected to Terrain3D.
|
||||
Sets the EditorPlugin Object connected to Terrain3D.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
|
|
|||
|
|
@ -41,47 +41,49 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`clear_textures<class_Terrain3DAssets_method_clear_textures>`\ (\ update\: ``bool`` = false\ ) |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`create_mesh_thumbnails<class_Terrain3DAssets_method_create_mesh_thumbnails>`\ (\ id\: ``int`` = -1, size\: ``Vector2i`` = Vector2i(128, 128)\ ) |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``RID`` | :ref:`get_albedo_array_rid<class_Terrain3DAssets_method_get_albedo_array_rid>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Terrain3DMeshAsset<class_Terrain3DMeshAsset>` | :ref:`get_mesh_asset<class_Terrain3DAssets_method_get_mesh_asset>`\ (\ id\: ``int``\ ) |const| |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_mesh_count<class_Terrain3DAssets_method_get_mesh_count>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``RID`` | :ref:`get_normal_array_rid<class_Terrain3DAssets_method_get_normal_array_rid>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Terrain3DTextureAsset<class_Terrain3DTextureAsset>` | :ref:`get_texture<class_Terrain3DAssets_method_get_texture>`\ (\ id\: ``int``\ ) |const| |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedFloat32Array`` | :ref:`get_texture_ao_strengths<class_Terrain3DAssets_method_get_texture_ao_strengths>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedColorArray`` | :ref:`get_texture_colors<class_Terrain3DAssets_method_get_texture_colors>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_texture_count<class_Terrain3DAssets_method_get_texture_count>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedVector2Array`` | :ref:`get_texture_detiles<class_Terrain3DAssets_method_get_texture_detiles>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedFloat32Array`` | :ref:`get_texture_normal_depths<class_Terrain3DAssets_method_get_texture_normal_depths>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedFloat32Array`` | :ref:`get_texture_roughness_mods<class_Terrain3DAssets_method_get_texture_roughness_mods>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedFloat32Array`` | :ref:`get_texture_uv_scales<class_Terrain3DAssets_method_get_texture_uv_scales>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_texture_vertical_projections<class_Terrain3DAssets_method_get_texture_vertical_projections>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`save<class_Terrain3DAssets_method_save>`\ (\ path\: ``String`` = ""\ ) |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_mesh_asset<class_Terrain3DAssets_method_set_mesh_asset>`\ (\ id\: ``int``, mesh\: :ref:`Terrain3DMeshAsset<class_Terrain3DMeshAsset>`\ ) |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_texture<class_Terrain3DAssets_method_set_texture>`\ (\ id\: ``int``, texture\: :ref:`Terrain3DTextureAsset<class_Terrain3DTextureAsset>`\ ) |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`update_mesh_list<class_Terrain3DAssets_method_update_mesh_list>`\ (\ ) |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`update_texture_list<class_Terrain3DAssets_method_update_texture_list>`\ (\ ) |
|
||||
+-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`clear_textures<class_Terrain3DAssets_method_clear_textures>`\ (\ update\: ``bool`` = false\ ) |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`create_mesh_thumbnails<class_Terrain3DAssets_method_create_mesh_thumbnails>`\ (\ id\: ``int`` = -1, size\: ``Vector2i`` = Vector2i(512, 512), force\: ``bool`` = false\ ) |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``RID`` | :ref:`get_albedo_array_rid<class_Terrain3DAssets_method_get_albedo_array_rid>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Terrain3DMeshAsset<class_Terrain3DMeshAsset>` | :ref:`get_mesh_asset<class_Terrain3DAssets_method_get_mesh_asset>`\ (\ id\: ``int``\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_mesh_count<class_Terrain3DAssets_method_get_mesh_count>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``RID`` | :ref:`get_normal_array_rid<class_Terrain3DAssets_method_get_normal_array_rid>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedFloat32Array`` | :ref:`get_texture_ao_light_affects<class_Terrain3DAssets_method_get_texture_ao_light_affects>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedFloat32Array`` | :ref:`get_texture_ao_strengths<class_Terrain3DAssets_method_get_texture_ao_strengths>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Terrain3DTextureAsset<class_Terrain3DTextureAsset>` | :ref:`get_texture_asset<class_Terrain3DAssets_method_get_texture_asset>`\ (\ id\: ``int``\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedColorArray`` | :ref:`get_texture_colors<class_Terrain3DAssets_method_get_texture_colors>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_texture_count<class_Terrain3DAssets_method_get_texture_count>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedVector2Array`` | :ref:`get_texture_detiles<class_Terrain3DAssets_method_get_texture_detiles>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedFloat32Array`` | :ref:`get_texture_normal_depths<class_Terrain3DAssets_method_get_texture_normal_depths>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedFloat32Array`` | :ref:`get_texture_roughness_mods<class_Terrain3DAssets_method_get_texture_roughness_mods>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedFloat32Array`` | :ref:`get_texture_uv_scales<class_Terrain3DAssets_method_get_texture_uv_scales>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_texture_vertical_projections<class_Terrain3DAssets_method_get_texture_vertical_projections>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Error | :ref:`save<class_Terrain3DAssets_method_save>`\ (\ path\: ``String`` = ""\ ) |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_mesh_asset<class_Terrain3DAssets_method_set_mesh_asset>`\ (\ id\: ``int``, mesh\: :ref:`Terrain3DMeshAsset<class_Terrain3DMeshAsset>`\ ) |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_texture_asset<class_Terrain3DAssets_method_set_texture_asset>`\ (\ id\: ``int``, texture\: :ref:`Terrain3DTextureAsset<class_Terrain3DTextureAsset>`\ ) |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`update_mesh_list<class_Terrain3DAssets_method_update_mesh_list>`\ (\ ) |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`update_texture_list<class_Terrain3DAssets_method_update_texture_list>`\ (\ ) |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
|
@ -236,9 +238,9 @@ A similar ``clear_meshes`` is less useful so hasn't been included. However you c
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **create_mesh_thumbnails**\ (\ id\: ``int`` = -1, size\: ``Vector2i`` = Vector2i(128, 128)\ ) :ref:`🔗<class_Terrain3DAssets_method_create_mesh_thumbnails>`
|
||||
|void| **create_mesh_thumbnails**\ (\ id\: ``int`` = -1, size\: ``Vector2i`` = Vector2i(512, 512), force\: ``bool`` = false\ ) :ref:`🔗<class_Terrain3DAssets_method_create_mesh_thumbnails>`
|
||||
|
||||
Generates mesh asset preview thumbnails for the asset dock, stored within each mesh asset. Specify id -1 to generate all.
|
||||
Generates mesh asset preview thumbnails for the asset dock, stored within each mesh asset. Specify id -1 to generate all. By default, mesh thumbnails are not recreated if they already exist. Specify ``force`` to regenerate existing thumbnails.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
|
@ -292,13 +294,13 @@ Returns the resource ID of the TextureArray generated from combining all normal
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DAssets_method_get_texture:
|
||||
.. _class_Terrain3DAssets_method_get_texture_ao_light_affects:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Terrain3DTextureAsset<class_Terrain3DTextureAsset>` **get_texture**\ (\ id\: ``int``\ ) |const| :ref:`🔗<class_Terrain3DAssets_method_get_texture>`
|
||||
``PackedFloat32Array`` **get_texture_ao_light_affects**\ (\ ) |const| :ref:`🔗<class_Terrain3DAssets_method_get_texture_ao_light_affects>`
|
||||
|
||||
Returns the Terrain3DTextureAsset with the requested ID.
|
||||
Returns the array of ao light affects values each texture asset, indexed by asset id.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
|
@ -316,6 +318,18 @@ Returns the array of AO strengths for each texture asset, indexed by asset id.
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DAssets_method_get_texture_asset:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Terrain3DTextureAsset<class_Terrain3DTextureAsset>` **get_texture_asset**\ (\ id\: ``int``\ ) |const| :ref:`🔗<class_Terrain3DAssets_method_get_texture_asset>`
|
||||
|
||||
Returns the Terrain3DTextureAsset with the specified ID.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DAssets_method_get_texture_colors:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
|
@ -420,17 +434,17 @@ path - specifies a directory and file name to use from now on.
|
|||
|
||||
|void| **set_mesh_asset**\ (\ id\: ``int``, mesh\: :ref:`Terrain3DMeshAsset<class_Terrain3DMeshAsset>`\ ) :ref:`🔗<class_Terrain3DAssets_method_set_mesh_asset>`
|
||||
|
||||
Assigns the Terrain3DMeshAsset to the specified ID slot. It can be null to clear the slot. See :ref:`set_texture()<class_Terrain3DAssets_method_set_texture>`.
|
||||
Assigns the Terrain3DMeshAsset to the specified ID slot. It can be null to clear the slot. See :ref:`set_texture_asset()<class_Terrain3DAssets_method_set_texture_asset>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DAssets_method_set_texture:
|
||||
.. _class_Terrain3DAssets_method_set_texture_asset:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **set_texture**\ (\ id\: ``int``, texture\: :ref:`Terrain3DTextureAsset<class_Terrain3DTextureAsset>`\ ) :ref:`🔗<class_Terrain3DAssets_method_set_texture>`
|
||||
|void| **set_texture_asset**\ (\ id\: ``int``, texture\: :ref:`Terrain3DTextureAsset<class_Terrain3DTextureAsset>`\ ) :ref:`🔗<class_Terrain3DAssets_method_set_texture_asset>`
|
||||
|
||||
Adds a Terrain3DTextureAsset at the specified ID slot. The texture can be null to clear the slot, or remove it if its the last in the list. If the specified slot is full, it will be swapped with the source texture ID, or will find the next available ID.
|
||||
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ The selected mode determines if collision is generated and how. See :ref:`Collis
|
|||
- |void| **set_physics_material**\ (\ value\: ``PhysicsMaterial``\ )
|
||||
- ``PhysicsMaterial`` **get_physics_material**\ (\ )
|
||||
|
||||
Applies a ``PhysicsMaterial`` override to the StaticBody.
|
||||
Applies a ``PhysicsMaterial`` override to the entire terrain StaticBody.
|
||||
|
||||
There's no ability built into Godot to change physics material parameters based on texture or any other factor. However, it might be possible to extend `PhysicsMaterial` in order to inject code into the queries. It would need references to an object position and a terrain, and then it could run :ref:`Terrain3DData.get_texture_id()<class_Terrain3DData_method_get_texture_id>` based on the position and return different physics settings per texture. That would change the settings for the entire terrain for that moment.
|
||||
|
||||
|
|
|
|||
|
|
@ -49,41 +49,108 @@ After modifying region data, run :ref:`update_mmis()<class_Terrain3DInstancer_me
|
|||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Properties
|
||||
----------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------------------------------+-----------------------------------------------------+-------+
|
||||
| :ref:`InstancerMode<enum_Terrain3DInstancer_InstancerMode>` | :ref:`mode<class_Terrain3DInstancer_property_mode>` | ``1`` |
|
||||
+-------------------------------------------------------------+-----------------------------------------------------+-------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
Methods
|
||||
-------
|
||||
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`add_instances<class_Terrain3DInstancer_method_add_instances>`\ (\ global_position\: ``Vector3``, params\: ``Dictionary``\ ) |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`add_multimesh<class_Terrain3DInstancer_method_add_multimesh>`\ (\ mesh_id\: ``int``, multimesh\: ``MultiMesh``, transform\: ``Transform3D`` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), update\: ``bool`` = true\ ) |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`add_transforms<class_Terrain3DInstancer_method_add_transforms>`\ (\ mesh_id\: ``int``, transforms\: :ref:`Array<class_Array>`\[``Transform3D``\], colors\: ``PackedColorArray`` = PackedColorArray(), update\: ``bool`` = true\ ) |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`append_location<class_Terrain3DInstancer_method_append_location>`\ (\ region_location\: ``Vector2i``, mesh_id\: ``int``, transforms\: :ref:`Array<class_Array>`\[``Transform3D``\], colors\: ``PackedColorArray``, update\: ``bool`` = true\ ) |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`append_region<class_Terrain3DInstancer_method_append_region>`\ (\ region\: :ref:`Terrain3DRegion<class_Terrain3DRegion>`, mesh_id\: ``int``, transforms\: :ref:`Array<class_Array>`\[``Transform3D``\], colors\: ``PackedColorArray``, update\: ``bool`` = true\ ) |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`clear_by_location<class_Terrain3DInstancer_method_clear_by_location>`\ (\ region_location\: ``Vector2i``, mesh_id\: ``int``\ ) |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`clear_by_mesh<class_Terrain3DInstancer_method_clear_by_mesh>`\ (\ mesh_id\: ``int``\ ) |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`clear_by_region<class_Terrain3DInstancer_method_clear_by_region>`\ (\ region\: :ref:`Terrain3DRegion<class_Terrain3DRegion>`, mesh_id\: ``int``\ ) |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`dump_mmis<class_Terrain3DInstancer_method_dump_mmis>`\ (\ ) |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_closest_mesh_id<class_Terrain3DInstancer_method_get_closest_mesh_id>`\ (\ global_position\: ``Vector3``\ ) |const| |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`remove_instances<class_Terrain3DInstancer_method_remove_instances>`\ (\ global_position\: ``Vector3``, params\: ``Dictionary``\ ) |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`swap_ids<class_Terrain3DInstancer_method_swap_ids>`\ (\ src_id\: ``int``, dest_id\: ``int``\ ) |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`update_mmis<class_Terrain3DInstancer_method_update_mmis>`\ (\ mesh_id\: ``int`` = -1, region_location\: ``Vector2i`` = Vector2i(2147483647, 2147483647), rebuild_all\: ``bool`` = false\ ) |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`update_transforms<class_Terrain3DInstancer_method_update_transforms>`\ (\ aabb\: ``AABB``\ ) |
|
||||
+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`add_instances<class_Terrain3DInstancer_method_add_instances>`\ (\ global_position\: ``Vector3``, params\: ``Dictionary``\ ) |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`add_multimesh<class_Terrain3DInstancer_method_add_multimesh>`\ (\ mesh_id\: ``int``, multimesh\: ``MultiMesh``, transform\: ``Transform3D`` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), update\: ``bool`` = true\ ) |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`add_transforms<class_Terrain3DInstancer_method_add_transforms>`\ (\ mesh_id\: ``int``, transforms\: :ref:`Array<class_Array>`\[``Transform3D``\], colors\: ``PackedColorArray`` = PackedColorArray(), update\: ``bool`` = true\ ) |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`append_location<class_Terrain3DInstancer_method_append_location>`\ (\ region_location\: ``Vector2i``, mesh_id\: ``int``, transforms\: :ref:`Array<class_Array>`\[``Transform3D``\], colors\: ``PackedColorArray``, update\: ``bool`` = true\ ) |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`append_region<class_Terrain3DInstancer_method_append_region>`\ (\ region\: :ref:`Terrain3DRegion<class_Terrain3DRegion>`, mesh_id\: ``int``, transforms\: :ref:`Array<class_Array>`\[``Transform3D``\], colors\: ``PackedColorArray``, update\: ``bool`` = true\ ) |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`clear_by_location<class_Terrain3DInstancer_method_clear_by_location>`\ (\ region_location\: ``Vector2i``, mesh_id\: ``int``\ ) |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`clear_by_mesh<class_Terrain3DInstancer_method_clear_by_mesh>`\ (\ mesh_id\: ``int``\ ) |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`clear_by_region<class_Terrain3DInstancer_method_clear_by_region>`\ (\ region\: :ref:`Terrain3DRegion<class_Terrain3DRegion>`, mesh_id\: ``int``\ ) |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_closest_mesh_id<class_Terrain3DInstancer_method_get_closest_mesh_id>`\ (\ global_position\: ``Vector3``\ ) |const| |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``bool`` | :ref:`is_enabled<class_Terrain3DInstancer_method_is_enabled>`\ (\ ) |const| |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`remove_instances<class_Terrain3DInstancer_method_remove_instances>`\ (\ global_position\: ``Vector3``, params\: ``Dictionary``\ ) |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`swap_ids<class_Terrain3DInstancer_method_swap_ids>`\ (\ src_id\: ``int``, dest_id\: ``int``\ ) |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`update_mmis<class_Terrain3DInstancer_method_update_mmis>`\ (\ mesh_id\: ``int`` = -1, region_location\: ``Vector2i`` = Vector2i(2147483647, 2147483647), rebuild_all\: ``bool`` = false\ ) |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`update_transforms<class_Terrain3DInstancer_method_update_transforms>`\ (\ aabb\: ``AABB``\ ) |
|
||||
+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Enumerations
|
||||
------------
|
||||
|
||||
.. _enum_Terrain3DInstancer_InstancerMode:
|
||||
|
||||
.. rst-class:: classref-enumeration
|
||||
|
||||
enum **InstancerMode**: :ref:`🔗<enum_Terrain3DInstancer_InstancerMode>`
|
||||
|
||||
.. _class_Terrain3DInstancer_constant_NORMAL:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`InstancerMode<enum_Terrain3DInstancer_InstancerMode>` **NORMAL** = ``1``
|
||||
|
||||
Create MultiMeshInstance3Ds and render instances as normal.
|
||||
|
||||
.. _class_Terrain3DInstancer_constant_DISABLED:
|
||||
|
||||
.. rst-class:: classref-enumeration-constant
|
||||
|
||||
:ref:`InstancerMode<enum_Terrain3DInstancer_InstancerMode>` **DISABLED** = ``0``
|
||||
|
||||
Disables creation of MultiMeshInstance3Ds and instances.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
||||
.. rst-class:: classref-descriptions-group
|
||||
|
||||
Property Descriptions
|
||||
---------------------
|
||||
|
||||
.. _class_Terrain3DInstancer_property_mode:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`InstancerMode<enum_Terrain3DInstancer_InstancerMode>` **mode** = ``1`` :ref:`🔗<class_Terrain3DInstancer_property_mode>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_mode**\ (\ value\: :ref:`InstancerMode<enum_Terrain3DInstancer_InstancerMode>`\ )
|
||||
- :ref:`InstancerMode<enum_Terrain3DInstancer_InstancerMode>` **get_mode**\ (\ )
|
||||
|
||||
Normal - Generates MMIs and renders all instances as normal.
|
||||
|
||||
Disabled - prevents the instancer from creating any MultiMeshInstance3Ds.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
|
@ -200,18 +267,6 @@ Removes all instancer data and MultiMeshInstance nodes attached to the tree for
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DInstancer_method_dump_mmis:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **dump_mmis**\ (\ ) :ref:`🔗<class_Terrain3DInstancer_method_dump_mmis>`
|
||||
|
||||
Dumps the MultiMeshInstance3Ds attached to the tree and information about the nodes for all regions.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DInstancer_method_get_closest_mesh_id:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
|
@ -224,6 +279,18 @@ Returns the mesh instance ID closest to the specified global position on the gro
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DInstancer_method_is_enabled:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
``bool`` **is_enabled**\ (\ ) |const| :ref:`🔗<class_Terrain3DInstancer_method_is_enabled>`
|
||||
|
||||
Returns true if :ref:`mode<class_Terrain3DInstancer_property_mode>` is not disabled.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DInstancer_method_remove_instances:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
|
|
|||
|
|
@ -74,6 +74,10 @@ Properties
|
|||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_roughmap<class_Terrain3DMaterial_property_show_roughmap>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_albedo<class_Terrain3DMaterial_property_show_texture_albedo>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_ao<class_Terrain3DMaterial_property_show_texture_ao>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_height<class_Terrain3DMaterial_property_show_texture_height>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_normal<class_Terrain3DMaterial_property_show_texture_normal>` | ``false`` |
|
||||
|
|
@ -254,7 +258,7 @@ If shader_override_enabled is true and this Shader is valid, the material will u
|
|||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **enable_shader_override**\ (\ value\: ``bool``\ )
|
||||
- |void| **set_shader_override_enabled**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **is_shader_override_enabled**\ (\ )
|
||||
|
||||
Enables use of the :ref:`shader_override<class_Terrain3DMaterial_property_shader_override>` shader code. Generates default code if shader_override is blank.
|
||||
|
|
@ -274,7 +278,7 @@ Enables use of the :ref:`shader_override<class_Terrain3DMaterial_property_shader
|
|||
- |void| **set_show_autoshader**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_autoshader**\ (\ )
|
||||
|
||||
Display the area designated for use by the autoshader, which shows materials based upon slope.
|
||||
Displays the area designated for use by the autoshader, which shows materials based upon slope.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
|
@ -310,7 +314,7 @@ Note that when a blank texture slot is created, a 1k checkerboard texture is gen
|
|||
- |void| **set_show_colormap**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_colormap**\ (\ )
|
||||
|
||||
Places the color map in the albedo channel.
|
||||
Shows the color map in the albedo channel.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
|
@ -520,6 +524,40 @@ Albedo is set to the roughness modification map as grey scale. Middle grey, 0.5
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMaterial_property_show_texture_albedo:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``bool`` **show_texture_albedo** = ``false`` :ref:`🔗<class_Terrain3DMaterial_property_show_texture_albedo>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_show_texture_albedo**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_texture_albedo**\ (\ )
|
||||
|
||||
Albedo textures are shown only. Other channels are excluded.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMaterial_property_show_texture_ao:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``bool`` **show_texture_ao** = ``false`` :ref:`🔗<class_Terrain3DMaterial_property_show_texture_ao>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_show_texture_ao**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_texture_ao**\ (\ )
|
||||
|
||||
Albedo is set to the painted Ambient Occlusion textures.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMaterial_property_show_texture_height:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ Properties
|
|||
:widths: auto
|
||||
|
||||
+-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+
|
||||
| GeometryInstance3D.ShadowCastingSetting | :ref:`cast_shadows<class_Terrain3DMeshAsset_property_cast_shadows>` | ``1`` |
|
||||
| RenderingServer.ShadowCastingSetting | :ref:`cast_shadows<class_Terrain3DMeshAsset_property_cast_shadows>` | ``1`` |
|
||||
+-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+
|
||||
| ``float`` | :ref:`density<class_Terrain3DMeshAsset_property_density>` | ``10.0`` |
|
||||
| ``float`` | :ref:`density<class_Terrain3DMeshAsset_property_density>` | ``0.0`` |
|
||||
+-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+
|
||||
| ``bool`` | :ref:`enabled<class_Terrain3DMeshAsset_property_enabled>` | ``true`` |
|
||||
+-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+
|
||||
|
|
@ -92,6 +92,8 @@ Properties
|
|||
+-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+
|
||||
| ``int`` | :ref:`shadow_impostor<class_Terrain3DMeshAsset_property_shadow_impostor>` | ``0`` |
|
||||
+-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+
|
||||
| ``int`` | :ref:`visibility_layers<class_Terrain3DMeshAsset_property_visibility_layers>` | ``1`` |
|
||||
+-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
|
|
@ -130,18 +132,6 @@ Methods
|
|||
Signals
|
||||
-------
|
||||
|
||||
.. _class_Terrain3DMeshAsset_signal_file_changed:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**file_changed**\ (\ ) :ref:`🔗<class_Terrain3DMeshAsset_signal_file_changed>`
|
||||
|
||||
Emitted when :ref:`scene_file<class_Terrain3DMeshAsset_property_scene_file>` is changed, or if the generated mesh is toggled.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMeshAsset_signal_id_changed:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
|
@ -238,12 +228,12 @@ Property Descriptions
|
|||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
GeometryInstance3D.ShadowCastingSetting **cast_shadows** = ``1`` :ref:`🔗<class_Terrain3DMeshAsset_property_cast_shadows>`
|
||||
RenderingServer.ShadowCastingSetting **cast_shadows** = ``1`` :ref:`🔗<class_Terrain3DMeshAsset_property_cast_shadows>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_cast_shadows**\ (\ value\: GeometryInstance3D.ShadowCastingSetting\ )
|
||||
- GeometryInstance3D.ShadowCastingSetting **get_cast_shadows**\ (\ )
|
||||
- |void| **set_cast_shadows**\ (\ value\: RenderingServer.ShadowCastingSetting\ )
|
||||
- RenderingServer.ShadowCastingSetting **get_cast_shadows**\ (\ )
|
||||
|
||||
Tells the renderer how to cast shadows from this mesh asset onto the terrain and other objects. This sets ``GeometryInstance3D.cast_shadow`` on all MultiMeshInstances used by this mesh.
|
||||
|
||||
|
|
@ -255,7 +245,7 @@ Tells the renderer how to cast shadows from this mesh asset onto the terrain and
|
|||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``float`` **density** = ``10.0`` :ref:`🔗<class_Terrain3DMeshAsset_property_density>`
|
||||
``float`` **density** = ``0.0`` :ref:`🔗<class_Terrain3DMeshAsset_property_density>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
|
|
@ -704,6 +694,23 @@ Increase to improve performance by lowering shadow quality.
|
|||
|
||||
Shadow impostors are disabled if this is set to 0 or if :ref:`cast_shadows<class_Terrain3DMeshAsset_property_cast_shadows>` is set to shadows only.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMeshAsset_property_visibility_layers:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``int`` **visibility_layers** = ``1`` :ref:`🔗<class_Terrain3DMeshAsset_property_visibility_layers>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_visibility_layers**\ (\ value\: ``int``\ )
|
||||
- ``int`` **get_visibility_layers**\ (\ )
|
||||
|
||||
Sets :ref:`VisualInstance3D.layers<class_VisualInstance3D_member_layers>`, which defines the rendering layers the MultiMeshInstance3Ds for this mesh asset are drawn on.
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
----
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ Properties
|
|||
+---------------+--------------------------------------------------------------------------------------+-----------------------+
|
||||
| ``Texture2D`` | :ref:`albedo_texture<class_Terrain3DTextureAsset_property_albedo_texture>` | |
|
||||
+---------------+--------------------------------------------------------------------------------------+-----------------------+
|
||||
| ``float`` | :ref:`ao_light_affect<class_Terrain3DTextureAsset_property_ao_light_affect>` | ``0.0`` |
|
||||
+---------------+--------------------------------------------------------------------------------------+-----------------------+
|
||||
| ``float`` | :ref:`ao_strength<class_Terrain3DTextureAsset_property_ao_strength>` | ``0.5`` |
|
||||
+---------------+--------------------------------------------------------------------------------------+-----------------------+
|
||||
| ``float`` | :ref:`detiling_rotation<class_Terrain3DTextureAsset_property_detiling_rotation>` | ``0.0`` |
|
||||
|
|
@ -42,7 +44,7 @@ Properties
|
|||
+---------------+--------------------------------------------------------------------------------------+-----------------------+
|
||||
| ``String`` | :ref:`name<class_Terrain3DTextureAsset_property_name>` | ``"New Texture"`` |
|
||||
+---------------+--------------------------------------------------------------------------------------+-----------------------+
|
||||
| ``float`` | :ref:`normal_depth<class_Terrain3DTextureAsset_property_normal_depth>` | ``0.5`` |
|
||||
| ``float`` | :ref:`normal_depth<class_Terrain3DTextureAsset_property_normal_depth>` | ``1.0`` |
|
||||
+---------------+--------------------------------------------------------------------------------------+-----------------------+
|
||||
| ``Texture2D`` | :ref:`normal_texture<class_Terrain3DTextureAsset_property_normal_texture>` | |
|
||||
+---------------+--------------------------------------------------------------------------------------+-----------------------+
|
||||
|
|
@ -61,15 +63,17 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------+------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`clear<class_Terrain3DTextureAsset_method_clear>`\ (\ ) |
|
||||
+-----------+------------------------------------------------------------------------------------------------------+
|
||||
| ``Color`` | :ref:`get_highlight_color<class_Terrain3DTextureAsset_method_get_highlight_color>`\ (\ ) |const| |
|
||||
+-----------+------------------------------------------------------------------------------------------------------+
|
||||
| ``bool`` | :ref:`is_highlighted<class_Terrain3DTextureAsset_method_is_highlighted>`\ (\ ) |const| |
|
||||
+-----------+------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_highlighted<class_Terrain3DTextureAsset_method_set_highlighted>`\ (\ enabled\: ``bool``\ ) |
|
||||
+-----------+------------------------------------------------------------------------------------------------------+
|
||||
+---------------+------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`clear<class_Terrain3DTextureAsset_method_clear>`\ (\ ) |
|
||||
+---------------+------------------------------------------------------------------------------------------------------+
|
||||
| ``Color`` | :ref:`get_highlight_color<class_Terrain3DTextureAsset_method_get_highlight_color>`\ (\ ) |const| |
|
||||
+---------------+------------------------------------------------------------------------------------------------------+
|
||||
| ``Texture2D`` | :ref:`get_thumbnail<class_Terrain3DTextureAsset_method_get_thumbnail>`\ (\ ) |const| |
|
||||
+---------------+------------------------------------------------------------------------------------------------------+
|
||||
| ``bool`` | :ref:`is_highlighted<class_Terrain3DTextureAsset_method_is_highlighted>`\ (\ ) |const| |
|
||||
+---------------+------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_highlighted<class_Terrain3DTextureAsset_method_set_highlighted>`\ (\ enabled\: ``bool``\ ) |
|
||||
+---------------+------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
|
@ -155,6 +159,23 @@ The texture file with albedo on RGB and height on A.
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DTextureAsset_property_ao_light_affect:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``float`` **ao_light_affect** = ``0.0`` :ref:`🔗<class_Terrain3DTextureAsset_property_ao_light_affect>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_ao_light_affect**\ (\ value\: ``float``\ )
|
||||
- ``float`` **get_ao_light_affect**\ (\ )
|
||||
|
||||
This value is applied directly to the AO_LIGHT_AFFECT in the shader, which dictates how much ambient occlusion affects light from Light3Ds. 0 means AO only affects ambient light. 1 means it also affects lights.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DTextureAsset_property_ao_strength:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
|
@ -166,7 +187,7 @@ The texture file with albedo on RGB and height on A.
|
|||
- |void| **set_ao_strength**\ (\ value\: ``float``\ )
|
||||
- ``float`` **get_ao_strength**\ (\ )
|
||||
|
||||
The shader generates AO based on the height texture, based on this strength value.
|
||||
The strength of ambient occlusion, which darkens areas of this texture dictated by the ambient occlusion map. If you have not provided an AO texture, an AO value is approximated by the normal map automatically.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
|
|
@ -244,7 +265,7 @@ A user specified name for this texture set.
|
|||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``float`` **normal_depth** = ``0.5`` :ref:`🔗<class_Terrain3DTextureAsset_property_normal_depth>`
|
||||
``float`` **normal_depth** = ``1.0`` :ref:`🔗<class_Terrain3DTextureAsset_property_normal_depth>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
|
|
@ -354,6 +375,18 @@ Returns the color of the current highlight, if any.
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DTextureAsset_method_get_thumbnail:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
``Texture2D`` **get_thumbnail**\ (\ ) |const| :ref:`🔗<class_Terrain3DTextureAsset_method_get_thumbnail>`
|
||||
|
||||
Returns the generated thumbnail.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DTextureAsset_method_is_highlighted:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
|
|
|||
|
|
@ -47,61 +47,61 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``float`` | :ref:`as_float<class_Terrain3DUtil_method_as_float>`\ (\ value\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`as_uint<class_Terrain3DUtil_method_as_uint>`\ (\ value\: ``float``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Image`` | :ref:`black_to_alpha<class_Terrain3DUtil_method_black_to_alpha>`\ (\ image\: ``Image``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_auto<class_Terrain3DUtil_method_enc_auto>`\ (\ pixel\: ``bool``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_base<class_Terrain3DUtil_method_enc_base>`\ (\ base\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_blend<class_Terrain3DUtil_method_enc_blend>`\ (\ blend\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_hole<class_Terrain3DUtil_method_enc_hole>`\ (\ pixel\: ``bool``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_nav<class_Terrain3DUtil_method_enc_nav>`\ (\ pixel\: ``bool``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_overlay<class_Terrain3DUtil_method_enc_overlay>`\ (\ overlay\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_uv_rotation<class_Terrain3DUtil_method_enc_uv_rotation>`\ (\ rotation\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_uv_scale<class_Terrain3DUtil_method_enc_uv_scale>`\ (\ scale\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Vector2i`` | :ref:`filename_to_location<class_Terrain3DUtil_method_filename_to_location>`\ (\ filename\: ``String``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_base<class_Terrain3DUtil_method_get_base>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_blend<class_Terrain3DUtil_method_get_blend>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Image`` | :ref:`get_filled_image<class_Terrain3DUtil_method_get_filled_image>`\ (\ size\: ``Vector2i``, color\: ``Color``, create_mipmaps\: ``bool``, format\: Image.Format\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Vector2`` | :ref:`get_min_max<class_Terrain3DUtil_method_get_min_max>`\ (\ image\: ``Image``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_overlay<class_Terrain3DUtil_method_get_overlay>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Image`` | :ref:`get_thumbnail<class_Terrain3DUtil_method_get_thumbnail>`\ (\ image\: ``Image``, size\: ``Vector2i`` = Vector2i(256, 256)\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_uv_rotation<class_Terrain3DUtil_method_get_uv_rotation>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_uv_scale<class_Terrain3DUtil_method_get_uv_scale>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``bool`` | :ref:`is_auto<class_Terrain3DUtil_method_is_auto>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``bool`` | :ref:`is_hole<class_Terrain3DUtil_method_is_hole>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``bool`` | :ref:`is_nav<class_Terrain3DUtil_method_is_nav>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Image`` | :ref:`load_image<class_Terrain3DUtil_method_load_image>`\ (\ file_name\: ``String``, cache_mode\: ``int`` = 0, r16_height_range\: ``Vector2`` = Vector2(0, 255), r16_size\: ``Vector2i`` = Vector2i(0, 0)\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``String`` | :ref:`location_to_filename<class_Terrain3DUtil_method_location_to_filename>`\ (\ region_location\: ``Vector2i``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Image`` | :ref:`luminance_to_height<class_Terrain3DUtil_method_luminance_to_height>`\ (\ src_rgb\: ``Image``\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Image`` | :ref:`pack_image<class_Terrain3DUtil_method_pack_image>`\ (\ src_rgb\: ``Image``, src_a\: ``Image``, invert_green\: ``bool`` = false, invert_alpha\: ``bool`` = false, normalize_alpha\: ``bool`` = false, alpha_channel\: ``int`` = 0\ ) |static| |
|
||||
+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``float`` | :ref:`as_float<class_Terrain3DUtil_method_as_float>`\ (\ value\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`as_uint<class_Terrain3DUtil_method_as_uint>`\ (\ value\: ``float``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Image`` | :ref:`black_to_alpha<class_Terrain3DUtil_method_black_to_alpha>`\ (\ image\: ``Image``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_auto<class_Terrain3DUtil_method_enc_auto>`\ (\ pixel\: ``bool``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_base<class_Terrain3DUtil_method_enc_base>`\ (\ base\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_blend<class_Terrain3DUtil_method_enc_blend>`\ (\ blend\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_hole<class_Terrain3DUtil_method_enc_hole>`\ (\ pixel\: ``bool``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_nav<class_Terrain3DUtil_method_enc_nav>`\ (\ pixel\: ``bool``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_overlay<class_Terrain3DUtil_method_enc_overlay>`\ (\ overlay\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_uv_rotation<class_Terrain3DUtil_method_enc_uv_rotation>`\ (\ rotation\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`enc_uv_scale<class_Terrain3DUtil_method_enc_uv_scale>`\ (\ scale\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Vector2i`` | :ref:`filename_to_location<class_Terrain3DUtil_method_filename_to_location>`\ (\ filename\: ``String``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_base<class_Terrain3DUtil_method_get_base>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_blend<class_Terrain3DUtil_method_get_blend>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Image`` | :ref:`get_filled_image<class_Terrain3DUtil_method_get_filled_image>`\ (\ size\: ``Vector2i``, color\: ``Color``, create_mipmaps\: ``bool``, format\: Image.Format\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Vector2`` | :ref:`get_min_max<class_Terrain3DUtil_method_get_min_max>`\ (\ image\: ``Image``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_overlay<class_Terrain3DUtil_method_get_overlay>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Image`` | :ref:`get_thumbnail<class_Terrain3DUtil_method_get_thumbnail>`\ (\ image\: ``Image``, size\: ``Vector2i`` = Vector2i(256, 256)\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_uv_rotation<class_Terrain3DUtil_method_get_uv_rotation>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``int`` | :ref:`get_uv_scale<class_Terrain3DUtil_method_get_uv_scale>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``bool`` | :ref:`is_auto<class_Terrain3DUtil_method_is_auto>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``bool`` | :ref:`is_hole<class_Terrain3DUtil_method_is_hole>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``bool`` | :ref:`is_nav<class_Terrain3DUtil_method_is_nav>`\ (\ pixel\: ``int``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Image`` | :ref:`load_image<class_Terrain3DUtil_method_load_image>`\ (\ file_name\: ``String``, cache_mode\: ``int`` = 0, r16_height_range\: ``Vector2`` = Vector2(0, 255), r16_size\: ``Vector2i`` = Vector2i(0, 0)\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``String`` | :ref:`location_to_filename<class_Terrain3DUtil_method_location_to_filename>`\ (\ region_location\: ``Vector2i``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Image`` | :ref:`luminance_to_height<class_Terrain3DUtil_method_luminance_to_height>`\ (\ src_rgb\: ``Image``\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``Image`` | :ref:`pack_image<class_Terrain3DUtil_method_pack_image>`\ (\ src_rgb\: ``Image``, src_a\: ``Image``, src_ao\: ``Image``, invert_green\: ``bool`` = false, invert_alpha\: ``bool`` = false, normalize_alpha\: ``bool`` = false, alpha_channel\: ``int`` = 0, ao_channel\: ``int`` = 0\ ) |static| |
|
||||
+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
|
|
@ -458,7 +458,7 @@ Generates a greyscale RGB8 height texture from the luminance values of the sourc
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
``Image`` **pack_image**\ (\ src_rgb\: ``Image``, src_a\: ``Image``, invert_green\: ``bool`` = false, invert_alpha\: ``bool`` = false, normalize_alpha\: ``bool`` = false, alpha_channel\: ``int`` = 0\ ) |static| :ref:`🔗<class_Terrain3DUtil_method_pack_image>`
|
||||
``Image`` **pack_image**\ (\ src_rgb\: ``Image``, src_a\: ``Image``, src_ao\: ``Image``, invert_green\: ``bool`` = false, invert_alpha\: ``bool`` = false, normalize_alpha\: ``bool`` = false, alpha_channel\: ``int`` = 0, ao_channel\: ``int`` = 0\ ) |static| :ref:`🔗<class_Terrain3DUtil_method_pack_image>`
|
||||
|
||||
Returns an RGBA Image packed for terrain usage.
|
||||
|
||||
|
|
@ -474,6 +474,8 @@ Returns an RGBA Image packed for terrain usage.
|
|||
|
||||
- ``alpha_channel`` - The channel index (0-3: R,G,B,A) to use from src_a for the alpha channel.
|
||||
|
||||
- ``ao_channel`` - The channel index (0-3: R,G,B,A) to use from src_ao for the ambient occlusion channel.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|
||||
|
|
|
|||
|
|
@ -59,10 +59,10 @@
|
|||
<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.
|
||||
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 defined by [code skip-lint]gpu_mode[/code]:
|
||||
- If gpu_mode is disabled (default), it raymarches from the camera until the terrain is intersected, up to 4000m away. This works with one function call, but only where regions exist. It is slower than gpu_mode and gets increasingly slower the farther away the terrain is, though you may not notice.
|
||||
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.
|
||||
|
||||
|
|
@ -86,9 +86,9 @@
|
|||
</description>
|
||||
</method>
|
||||
<method name="get_plugin" qualifiers="const">
|
||||
<return type="EditorPlugin" />
|
||||
<return type="Object" />
|
||||
<description>
|
||||
Returns the EditorPlugin connected to Terrain3D.
|
||||
Returns the EditorPlugin Object connected to Terrain3D.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_raycast_result" qualifiers="const">
|
||||
|
|
@ -124,9 +124,9 @@
|
|||
</method>
|
||||
<method name="set_plugin">
|
||||
<return type="void" />
|
||||
<param index="0" name="plugin" type="EditorPlugin" />
|
||||
<param index="0" name="plugin" type="Object" />
|
||||
<description>
|
||||
Sets the EditorPlugin connected to Terrain3D.
|
||||
Sets the EditorPlugin Object connected to Terrain3D.
|
||||
</description>
|
||||
</method>
|
||||
<method name="snap">
|
||||
|
|
@ -150,21 +150,29 @@
|
|||
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">
|
||||
|
|
@ -191,6 +199,11 @@
|
|||
<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>
|
||||
|
|
@ -213,7 +226,8 @@
|
|||
See [method get_intersection].
|
||||
</member>
|
||||
<member name="physics_material" type="PhysicsMaterial" setter="set_physics_material" getter="get_physics_material">
|
||||
Alias for [member Terrain3DCollision.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.
|
||||
|
|
@ -227,67 +241,92 @@
|
|||
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="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">
|
||||
Alias for [member Terrain3DMaterial.show_contours]. Press `4` with the mouse in the viewport to toggle. Customize in the material.
|
||||
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_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">
|
||||
Alias for [member Terrain3DMaterial.show_instancer_grid]. Press `2` with the mouse in the viewport to toggle.
|
||||
</member>
|
||||
<member name="show_instances" type="bool" setter="set_show_instances" getter="get_show_instances" default="true">
|
||||
Shows or hides all instancer meshes.
|
||||
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">
|
||||
Alias for [member Terrain3DMaterial.show_region_grid]. Press `1` with the mouse in the viewport to toggle.
|
||||
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">
|
||||
Alias for [member Terrain3DMaterial.show_vertex_grid]. Press `3` with the mouse in the viewport to toggle.
|
||||
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="version" type="String" setter="" getter="get_version" default=""1.1.0-dev"">
|
||||
The current version of Terrain3D.
|
||||
|
|
|
|||
|
|
@ -20,9 +20,10 @@
|
|||
<method name="create_mesh_thumbnails">
|
||||
<return type="void" />
|
||||
<param index="0" name="id" type="int" default="-1" />
|
||||
<param index="1" name="size" type="Vector2i" default="Vector2i(128, 128)" />
|
||||
<param index="1" name="size" type="Vector2i" default="Vector2i(512, 512)" />
|
||||
<param index="2" name="force" type="bool" default="false" />
|
||||
<description>
|
||||
Generates mesh asset preview thumbnails for the asset dock, stored within each mesh asset. Specify id -1 to generate all.
|
||||
Generates mesh asset preview thumbnails for the asset dock, stored within each mesh asset. Specify id -1 to generate all. By default, mesh thumbnails are not recreated if they already exist. Specify [code skip-lint]force[/code] to regenerate existing thumbnails.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_albedo_array_rid" qualifiers="const">
|
||||
|
|
@ -50,11 +51,10 @@
|
|||
Returns the resource ID of the TextureArray generated from combining all normal and roughness textures.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_texture" qualifiers="const">
|
||||
<return type="Terrain3DTextureAsset" />
|
||||
<param index="0" name="id" type="int" />
|
||||
<method name="get_texture_ao_light_affects" qualifiers="const">
|
||||
<return type="PackedFloat32Array" />
|
||||
<description>
|
||||
Returns the Terrain3DTextureAsset with the requested ID.
|
||||
Returns the array of ao light affects values each texture asset, indexed by asset id.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_texture_ao_strengths" qualifiers="const">
|
||||
|
|
@ -63,6 +63,13 @@
|
|||
Returns the array of AO strengths for each texture asset, indexed by asset id.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_texture_asset" qualifiers="const">
|
||||
<return type="Terrain3DTextureAsset" />
|
||||
<param index="0" name="id" type="int" />
|
||||
<description>
|
||||
Returns the Terrain3DTextureAsset with the specified ID.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_texture_colors" qualifiers="const">
|
||||
<return type="PackedColorArray" />
|
||||
<description>
|
||||
|
|
@ -118,10 +125,10 @@
|
|||
<param index="0" name="id" type="int" />
|
||||
<param index="1" name="mesh" type="Terrain3DMeshAsset" />
|
||||
<description>
|
||||
Assigns the Terrain3DMeshAsset to the specified ID slot. It can be null to clear the slot. See [method set_texture].
|
||||
Assigns the Terrain3DMeshAsset to the specified ID slot. It can be null to clear the slot. See [method set_texture_asset].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_texture">
|
||||
<method name="set_texture_asset">
|
||||
<return type="void" />
|
||||
<param index="0" name="id" type="int" />
|
||||
<param index="1" name="texture" type="Terrain3DTextureAsset" />
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
The selected mode determines if collision is generated and how. See [enum CollisionMode] for details.
|
||||
</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 StaticBody.
|
||||
Applies a [code skip-lint]PhysicsMaterial[/code] override to the entire terrain StaticBody.
|
||||
There's no ability built into Godot to change physics material parameters based on texture or any other factor. However, it might be possible to extend `PhysicsMaterial` in order to inject code into the queries. It would need references to an object position and a terrain, and then it could run [method Terrain3DData.get_texture_id] based on the position and return different physics settings per texture. That would change the settings for the entire terrain for that moment.
|
||||
</member>
|
||||
<member name="priority" type="float" setter="set_priority" getter="get_priority" default="1.0">
|
||||
|
|
|
|||
|
|
@ -100,12 +100,6 @@
|
|||
Removes all instancer data and MultiMeshInstance nodes attached to the tree for the specified region and mesh id.
|
||||
</description>
|
||||
</method>
|
||||
<method name="dump_mmis">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Dumps the MultiMeshInstance3Ds attached to the tree and information about the nodes for all regions.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_closest_mesh_id" qualifiers="const">
|
||||
<return type="int" />
|
||||
<param index="0" name="global_position" type="Vector3" />
|
||||
|
|
@ -113,6 +107,12 @@
|
|||
Returns the mesh instance ID closest to the specified global position on the ground.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_enabled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns true if [member mode] is not disabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_instances">
|
||||
<return type="void" />
|
||||
<param index="0" name="global_position" type="Vector3" />
|
||||
|
|
@ -149,4 +149,18 @@
|
|||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Terrain3DInstancer.InstancerMode" default="1">
|
||||
Normal - Generates MMIs and renders all instances as normal.
|
||||
Disabled - prevents the instancer from creating any MultiMeshInstance3Ds.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="NORMAL" value="1" enum="InstancerMode">
|
||||
Create MultiMeshInstance3Ds and render instances as normal.
|
||||
</constant>
|
||||
<constant name="DISABLED" value="0" enum="InstancerMode">
|
||||
Disables creation of MultiMeshInstance3Ds and instances.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
|
|
|||
|
|
@ -66,18 +66,18 @@
|
|||
<member name="shader_override" type="Shader" setter="set_shader_override" getter="get_shader_override">
|
||||
If shader_override_enabled is true and this Shader is valid, the material will use this custom shader code. If this is blank when you enable the override, the system will generate a shader with the current settings. So if you have a debug view enabled, the generated shader will have all of that code. A visual shader will also work here. However we only generate a text based shader so currently a visual shader needs to be constructed with the base code before it can work.
|
||||
</member>
|
||||
<member name="shader_override_enabled" type="bool" setter="enable_shader_override" getter="is_shader_override_enabled" default="false">
|
||||
<member name="shader_override_enabled" type="bool" setter="set_shader_override_enabled" getter="is_shader_override_enabled" default="false">
|
||||
Enables use of the [member shader_override] shader code. Generates default code if shader_override is blank.
|
||||
</member>
|
||||
<member name="show_autoshader" type="bool" setter="set_show_autoshader" getter="get_show_autoshader" default="false">
|
||||
Display the area designated for use by the autoshader, which shows materials based upon slope.
|
||||
Displays the area designated for use by the autoshader, which shows materials based upon slope.
|
||||
</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.
|
||||
</member>
|
||||
<member name="show_colormap" type="bool" setter="set_show_colormap" getter="get_show_colormap" default="false">
|
||||
Places the color map in the albedo channel.
|
||||
Shows the color map in the albedo channel.
|
||||
</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.
|
||||
|
|
@ -115,6 +115,12 @@
|
|||
<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.
|
||||
</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.
|
||||
</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.
|
||||
</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.
|
||||
</member>
|
||||
|
|
|
|||
|
|
@ -74,10 +74,10 @@
|
|||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="cast_shadows" type="int" setter="set_cast_shadows" getter="get_cast_shadows" enum="GeometryInstance3D.ShadowCastingSetting" default="1">
|
||||
<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 this mesh asset onto the terrain and other objects. This sets [code skip-lint]GeometryInstance3D.cast_shadow[/code] on all MultiMeshInstances used by this mesh.
|
||||
</member>
|
||||
<member name="density" type="float" setter="set_density" getter="get_density" default="10.0">
|
||||
<member name="density" type="float" setter="set_density" getter="get_density" default="0.0">
|
||||
Density is used to set the approximate default spacing between instances based on the size of the mesh. When painting meshes on the terrain, mesh density is multiplied by brush strength.
|
||||
This value is not tied to any real world unit. It is calculated as [code skip-lint]10.f / mesh->get_aabb().get_volume()[/code], then clamped to a sane range. If the calculated amount is inappropriate, increase or decrease it here.
|
||||
</member>
|
||||
|
|
@ -163,13 +163,11 @@
|
|||
Increase to improve performance by lowering shadow quality.
|
||||
Shadow impostors are disabled if this is set to 0 or if [member cast_shadows] is set to shadows only.
|
||||
</member>
|
||||
<member name="visibility_layers" type="int" setter="set_visibility_layers" getter="get_visibility_layers" default="1">
|
||||
Sets [member VisualInstance3D.layers], which defines the rendering layers the MultiMeshInstance3Ds for this mesh asset are drawn on.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="file_changed">
|
||||
<description>
|
||||
Emitted when [member scene_file] is changed, or if the generated mesh is toggled.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="id_changed">
|
||||
<description>
|
||||
Emitted when [member id] is changed.
|
||||
|
|
|
|||
|
|
@ -20,6 +20,12 @@
|
|||
Returns the color of the current highlight, if any.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_thumbnail" qualifiers="const">
|
||||
<return type="Texture2D" />
|
||||
<description>
|
||||
Returns the generated thumbnail.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_highlighted" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
|
|
@ -41,8 +47,11 @@
|
|||
<member name="albedo_texture" type="Texture2D" setter="set_albedo_texture" getter="get_albedo_texture">
|
||||
The texture file with albedo on RGB and height on A.
|
||||
</member>
|
||||
<member name="ao_light_affect" type="float" setter="set_ao_light_affect" getter="get_ao_light_affect" default="0.0">
|
||||
This value is applied directly to the AO_LIGHT_AFFECT in the shader, which dictates how much ambient occlusion affects light from Light3Ds. 0 means AO only affects ambient light. 1 means it also affects lights.
|
||||
</member>
|
||||
<member name="ao_strength" type="float" setter="set_ao_strength" getter="get_ao_strength" default="0.5">
|
||||
The shader generates AO based on the height texture, based on this strength value.
|
||||
The strength of ambient occlusion, which darkens areas of this texture dictated by the ambient occlusion map. If you have not provided an AO texture, an AO value is approximated by the normal map automatically.
|
||||
</member>
|
||||
<member name="detiling_rotation" type="float" setter="set_detiling_rotation" getter="get_detiling_rotation" default="0.0">
|
||||
The shader rotates UV lookups in a detiling pattern based on this value.
|
||||
|
|
@ -56,7 +65,7 @@
|
|||
<member name="name" type="String" setter="set_name" getter="get_name" default=""New Texture"">
|
||||
A user specified name for this texture set.
|
||||
</member>
|
||||
<member name="normal_depth" type="float" setter="set_normal_depth" getter="get_normal_depth" default="0.5">
|
||||
<member name="normal_depth" type="float" setter="set_normal_depth" getter="get_normal_depth" default="1.0">
|
||||
Increases or decreases the strength of the normal texture.
|
||||
</member>
|
||||
<member name="normal_texture" type="Texture2D" setter="set_normal_texture" getter="get_normal_texture">
|
||||
|
|
|
|||
|
|
@ -231,10 +231,12 @@
|
|||
<return type="Image" />
|
||||
<param index="0" name="src_rgb" type="Image" />
|
||||
<param index="1" name="src_a" type="Image" />
|
||||
<param index="2" name="invert_green" type="bool" default="false" />
|
||||
<param index="3" name="invert_alpha" type="bool" default="false" />
|
||||
<param index="4" name="normalize_alpha" type="bool" default="false" />
|
||||
<param index="5" name="alpha_channel" type="int" default="0" />
|
||||
<param index="2" name="src_ao" type="Image" />
|
||||
<param index="3" name="invert_green" type="bool" default="false" />
|
||||
<param index="4" name="invert_alpha" type="bool" default="false" />
|
||||
<param index="5" name="normalize_alpha" type="bool" default="false" />
|
||||
<param index="6" name="alpha_channel" type="int" default="0" />
|
||||
<param index="7" name="ao_channel" type="int" default="0" />
|
||||
<description>
|
||||
Returns an RGBA Image packed for terrain usage.
|
||||
- [code skip-lint]src_rgb[/code] - The source Image for the RGB channels.
|
||||
|
|
@ -243,6 +245,7 @@
|
|||
- [code skip-lint]invert_alpha[/code] - Inverts the alpha channel to convert between Roughness and Smoothness maps.
|
||||
- [code skip-lint]normalize_alpha[/code] - Normalizes the alpha channel to use full range for height map.
|
||||
- [code skip-lint]alpha_channel[/code] - The channel index (0-3: R,G,B,A) to use from src_a for the alpha channel.
|
||||
- [code skip-lint]ao_channel[/code] - The channel index (0-3: R,G,B,A) to use from src_ao for the ambient occlusion channel.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ We mitigate this by generating multiple MultiMeshes. Each region is divided into
|
|||
|
||||
Multimeshes are generated and rendered on the GPU. The physics engine is on the CPU, and doesn't know anything about the placed instances. For now use this only for instances where collision is unnecessary like grass.
|
||||
|
||||
In the future, we will likely generate collision using the collision shapes stored in your scene file.
|
||||
In the future, instance collision will be generated using the collision shapes stored in your scene file. See [PR 699](https://github.com/TokisanGames/Terrain3D/pull/699).
|
||||
|
||||
|
||||
### No Scene Transforms
|
||||
|
|
|
|||
|
|
@ -80,16 +80,18 @@ Further reading:
|
|||
|
||||
## Android
|
||||
|
||||
As of Terrain3D 0.9.1 and Godot 4.2, Android is reported to work.
|
||||
As of Terrain3D 0.9.1 and Godot 4.2, Android is reported to work. It is still a bit experimental.
|
||||
|
||||
* Use textures that Godot imports (converts) such as PNG or TGA, not DDS.
|
||||
* Enable `Project Settings/Rendering/Textures/VRAM Compression/Import ETC2 ASTC`.
|
||||
|
||||
The release builds include binaries for arm32 and arm64.
|
||||
|
||||
There is a [texture artifact](https://github.com/TokisanGames/Terrain3D/issues/137) affecting some systems using the demo DDS textures. This may be alleviated by using PNGs as noted above, but isn't confirmed.
|
||||
Some mobile devices appear to not fully support texture arrays. Or perhaps they need more testing of different texture formats.
|
||||
|
||||
Further reading:
|
||||
* [Issue 668](https://github.com/TokisanGames/Terrain3D/issues/668)
|
||||
* [Issue 137](https://github.com/TokisanGames/Terrain3D/issues/137)
|
||||
* [Issue 197](https://github.com/TokisanGames/Terrain3D/issues/197)
|
||||
|
||||
|
||||
|
|
@ -126,13 +128,11 @@ The Forward+ Vulkan renderer is fully supported.
|
|||
|
||||
## D3D12
|
||||
|
||||
The Forward+ Direct3D 12 renderer was merged into Godot 4.3. TextureArrays are not fully supported yet (no mipmaps). Follow [Issue 529](https://github.com/TokisanGames/Terrain3D/issues/529) for progress.
|
||||
|
||||
The Forward+ Direct3D 12 support should be fully supported as of Godot 4.6.
|
||||
|
||||
## Metal
|
||||
|
||||
Support for Apple's Metal for iOS and macOS was merged into Godot 4.4-dev1. It is not yet supported by Terrain3D. No testing has been done.
|
||||
|
||||
Support for Apple's Metal for iOS and macOS was merged into Godot 4.4-dev1. No testing has been done, and Terrain3D support is unknown.
|
||||
|
||||
## Mobile
|
||||
|
||||
|
|
@ -141,4 +141,4 @@ The Forward Vulkan Mobile renderer is fully supported.
|
|||
|
||||
## Compatibility
|
||||
|
||||
The OpenGLES 3.0 Compatibility renderer is fully supported in Terrain3D 1.0 and Godot 4.4. A small set of shader pre-processor statements are used to override fma() and dFdxCoarse(). This allows the shader to work with the compatibility renderer without intrusive changes.
|
||||
The OpenGLES 3.0 Compatibility renderer is fully supported since Terrain3D 1.0 and Godot 4.4. A small set of shader pre-processor statements are used to override fma() and dFdxCoarse(). This allows the shader to work with the compatibility renderer without intrusive changes.
|
||||
|
|
|
|||
|
|
@ -15,18 +15,22 @@ Terrain3D supports up to 32 texture sets using albedo, height, normal, and rough
|
|||
## Texture Requirements
|
||||
|
||||
### Texture Files
|
||||
You need two files per texture set. Terrain3D is designed for textures that are channel packed as follows:
|
||||
|
||||
Typically "a texture" say rock comes as a pack of individual texture files: albedo/diffuse/base color, height, normal, smoothness/roughness, ambient occlusion (AO). For maximum efficiency we provide the option of packing these 5 separate files into 2.
|
||||
|
||||
Terrain3D is designed for texture sets that are channel packed as follows:
|
||||
|
||||
| Name | Format |
|
||||
| - | - |
|
||||
| albedo_texture | RGB: Albedo texture, A: Height texture
|
||||
| normal_texture| RGB: Normal map texture ([OpenGL +Y](#normal-map-format)), A: Roughness texture
|
||||
| albedo_texture | RGB: Albedo, A: Height
|
||||
| normal_texture| RGB: Normal map ([OpenGL](#normal-map-format)), RGB: AO, A: Roughness
|
||||
|
||||
The terrain can work without the alpha channels, however it won't have height blending or roughness. That may be fine for a low-poly or stylized terrain, but not for a realistic one.
|
||||
The terrain can work without the height, normal, ao, or roughness maps. But then you won't have height blending, roughness, or the other features. That may be fine for a low-poly or stylized terrain, but not for a realistic one.
|
||||
|
||||
Textures can be channel packed using the Pack Textures option in the Terrain3D menu at the top of the viewport, or in tools like [Gimp](https://www.gimp.org/). Photoshop or [Krita](https://krita.org/) are possible, but working with alpha channels can be a bit challenging.
|
||||
Textures can be channel packed using the `Pack Textures...` option in the Terrain3D menu at the top of the viewport (recommended), or in [Gimp](https://www.gimp.org/). Photoshop or [Krita](https://krita.org/) are possible, but working with alpha channels can be a bit challenging.
|
||||
|
||||
### Texture Sizes
|
||||
|
||||
All albedo textures must be the same size, and all normal textures must be the same size. Each type gets combined into separate Texture2DArrays, so their sizes of the two arrays can differ.
|
||||
|
||||
Double click any texture file and the inspector will show you the size. The demo textures are 1024x1024.
|
||||
|
|
@ -35,22 +39,20 @@ For GPU efficiency, it is recommended that all of your textures have dimensions
|
|||
|
||||
### Compression Format
|
||||
|
||||
All albedo textures must be the same format, and all normal textures must be the same format. They are combined into separate Texture2DArrays, so the two can have different formats.
|
||||
All albedo textures must be the same format, and all normal textures must be the same format. Albedo and Normals are combined into separate Texture2DArrays, so the two can have different formats.
|
||||
|
||||
Double click any texture file and the inspector will show you the format, which likely can be modified on the Godot Import tab.
|
||||
Double-clicking a texture in the FileSystem panel will display it in the Inspector with the current converted format of the file, size, and mipmaps. Settings may be adjustable on the Godot Import tab.
|
||||
|
||||
| Type | Supports | Format |
|
||||
| - | - | - |
|
||||
| **DDS** | Desktop | BC3 / DXT5, linear (intel plugin), Color + alpha, mipmaps generated. These files are used directly by Godot and are not converted, so there are no import settings. **Recommended for desktop only.** |
|
||||
| **PNG** | Desktop, Mobile | Standard RGBA. In Godot you must go to the Import tab and select: `Mode: VRAM Compressed`, `Normal Map: Disabled`, `Mipmaps Generate: On`, optionally check `High Quality`, then reimport each file.
|
||||
| **PNG** | Desktop, Mobile | RGBA, converts to DXT5 or BPTC (HQ). In Godot you must go to the Import tab and select: `Mode: VRAM Compressed`, `Normal Map: Disabled`, `Mipmaps Generate: On`, optionally check `High Quality`, then reimport each file.
|
||||
| **DDS** | Desktop | BC3 / DXT5, linear (intel plugin), Color + alpha, mipmaps generated. These files are used directly by Godot and are not converted, so there are no import settings.|
|
||||
| **Others** | | Other [Godot supported formats](https://docs.godotengine.org/en/stable/tutorials/assets_pipeline/importing_images.html#supported-image-formats) like KTX, TGA, JPG, WEBP should work as long as you match similar settings to PNG.
|
||||
| **EXR** | | While EXRs can work, they store color data as 16/32-bit float, not 8-bit integer. Don't use them unless you know what you're doing.
|
||||
| **EXR** | | While EXRs can work, they store color data as 16/32-bit float, not 8-bit integer. Don't use them for terrain textures unless you know what you're doing.
|
||||
|
||||
For mobile/web platforms, see [Supported Platforms](platforms.md).
|
||||
|
||||
Godot converts some texture files on import, so it is entirely possible that DDS, PNG, and TGA textures will all end up converted to DXT5 RGBA8. In this case, different file types can all be used in the same albedo or normal texture array because the compression format is the same. Double-clicking a texture in the FileSystem panel will display it in the Inspector with the current format of the file. They also need to match whether they have mipmaps or not.
|
||||
|
||||
DDS (BC3/DXT5) is recommended for desktop platforms as it tends to be higher quality than the default PNG to BC3/DXT5 conversion in Godot. When creating DDS files in Gimp you have a lot more conversion options, such as different mipmaps filter algorithms which can be helpful to remove artifacts in reflections (eg try Mitchell). Alternatively, you can mark PNGs as high quality which will convert them to BC6/BPTC and makes them on par with Gimp BC3/DXT5. Godot does not currently support anything higher than BC3/DXT5 in DDS files.
|
||||
To get the highest quality compression on desktop, use either:
|
||||
* Use PNG with the high quality option in Godot (BC6/BPTC). Pack with our channnel packer and mark HQ. Godot does not currently support importing anything higher than BC3/DXT5 in DDS files.
|
||||
* DDS (BC3/DXT5) made in Gimp are recommended over using the default PNG settings, which produces poor quality BC3/DXT5 files. When creating DDS files in Gimp you have a lot more conversion options, such as different mipmaps filtering algorithms which can be helpful to remove artifacts in reflections (eg try Mitchell).
|
||||
|
||||
The demo textures are PNG imported as HQ which are converted to BPTC.
|
||||
|
||||
|
|
@ -73,7 +75,7 @@ If creating your own height textures, aim for a central point of grey (0.5) with
|
|||
|
||||
### Normal Map Format
|
||||
|
||||
Normal maps come in two formats: DirectX with -Y, and OpenGL with +Y.
|
||||
Normal maps come in two formats: DirectX with -Y, and OpenGL with +Y. Both formats should be normalized.
|
||||
|
||||
DirectX can be converted to OpenGL and vice versa by inverting the green channel in a photo editing app.
|
||||
|
||||
|
|
@ -104,12 +106,21 @@ Natural textures like rock or grass can be very difficult to tell. However if yo
|
|||
|
||||
Some "roughness" textures are actually smoothness or gloss textures. You can convert between them by inverting the image.
|
||||
|
||||
You can tell which is which just by looking at distinctive textures and thinking about the material. If it's glass it should be glossy, so on a roughness texture values are near 0 and should appear mostly black. If it's dry rock or dirt, it should be mostly white, which is near 1 roughness. A smoothness texture would show the opposite.
|
||||
You can tell which is which just by looking at distinctive textures and thinking about the material. If it's glass it should be glossy, so on a roughness texture values are near 0 and should appear mostly black. If it's dry rock or dirt, it should be mostly white, which is near 1 roughness. A smoothness texture would show the opposite.
|
||||
|
||||
|
||||
### Ambient Occlusion
|
||||
|
||||
AO maps can be packed into the normal texture set by encoding AO values in the normal map vector scalars. Normal vectors are expected to have a unit length of 1.0 and by scaling the vector length, it is then possible to pack and later extract the AO value from the normal map RGB channels.
|
||||
|
||||
The shader will always decode the normal map as if it has AO data included in this way, as the result will be mostly 1.0 (No Ambient Occlusion) when no packing has occured.
|
||||
|
||||
Our built in channel packer will easily pack an AO map into the normal set. If you wish to do it manually, ensure your normal map is normalized. Then pack in AO with: `unpacked_normal_vector * (sqrt(ao) * 0.5 + 0.5)`.
|
||||
|
||||
|
||||
## Channel Pack Textures in Terrain3D
|
||||
|
||||
You can use our built in tool to pack textures for you.
|
||||
We recommend you use our built in tool to pack textures.
|
||||
|
||||
```{image} images/terrain3d_menu.png
|
||||
:target: ../_images/terrain3d_menu.png
|
||||
|
|
@ -117,7 +128,7 @@ You can use our built in tool to pack textures for you.
|
|||
|
||||
1. At the top of your viewport, click the `Terrain3D` menu, then `Pack Textures`.
|
||||
2. Select your textures for albedo and height.
|
||||
3. Optionally, select textures for normal and roughness.
|
||||
3. Optionally, select textures for normal, roughness, and if desired ambient occlusion
|
||||
4. Optionally, convert a DirectX normal map to OpenGL, or smoothness to roughness map.
|
||||
5. Optionally, enable Orthogonalise normals if you see a reflective checkerboard pattern appear when using detiling.
|
||||
6. Click `Pack Textures As...` and save the resulting PNG files to disk.
|
||||
|
|
@ -132,6 +143,8 @@ Make sure to reimport both files. Double click each file in the filesystem and e
|
|||
|
||||
## Channel Pack Textures with Gimp
|
||||
|
||||
> Note: AO packing normals manually is complex and not reccomended. The formula used is: `unpacked_normal_vector * (sqrt(ao) * 0.5 + 0.5)`
|
||||
|
||||
1. Open your RGB Albedo and greyscale Height files (or Normal and Roughness).
|
||||
|
||||
2. On the RGB file select `Colors/Components/Decompose`. Select `RGB`. Keep `Decompose to layers` checked. On the resulting image you have three greyscale layers for RGB.
|
||||
|
|
@ -166,7 +179,7 @@ Also recommended is to export directly into your Godot project folder. Then drag
|
|||
|
||||
## Where to Get Textures
|
||||
|
||||
### Texture Software
|
||||
### Texture Creation Software
|
||||
|
||||
You can make textures in dedicated texture software, such as those below. There are many other tools and ai texture generators to be found online. You can also paint textures in applications like krita/gimp/photoshop.
|
||||
|
||||
|
|
@ -176,7 +189,7 @@ You can make textures in dedicated texture software, such as those below. There
|
|||
* Substance Designer - Commercial, "industry standard" texture maker
|
||||
|
||||
|
||||
### Download Sites
|
||||
### Download Textures
|
||||
|
||||
There are numerous websites where you can download high quality, royalty free textures for free or pay. These textures come as individual maps, with the expectation that you will download only the maps you need and then channel pack them. Here are just a few:
|
||||
|
||||
|
|
@ -190,29 +203,27 @@ There are numerous websites where you can download high quality, royalty free te
|
|||
|
||||
### Why do we have to channel pack textures? Why is this so difficult?
|
||||
|
||||
Regular textures are now supported from v0.9.1. However if you want a realistic terrain with height blending and roughness, you need to channel pack textures.
|
||||
You don't have to. You can use just the albedo map, or also the normal map, without the others. However if you want a realistic terrain with height blending and roughness, you need all of the maps. You could have 5 different texture maps in memory, or pack that down to 2 maps and save precious VRAM.
|
||||
|
||||
Channel packing is a very common task done by professional game developers. Every pro asset pack you've used has channel packed textures. When you download texture packs from websites, they provide individual textures so you can pack them how you want. They are not intended to be used individually!
|
||||
|
||||
We offer a built in `Pack Textures` tool, found in the Terrain3D menu at the top of the viewport that facilitates the texture creation process within Godot.
|
||||
We offer a built in `Pack Textures` tool, found in the Terrain3D menu at the top of the viewport that facilitates the texture creation process within Godot. Packing can be done in 30 seconds.
|
||||
|
||||
Finally, we provide easy, 5-step instructions for packing textures with Gimp, which takes less than 2 minutes once you're familiar with the process.
|
||||
|
||||
We want high performance games, so we need to optimize our systems for the graphics hardware. A shader can retrieve four channels RGBA from a texture at once. Albedo and normal textures only have RGB. Thus, reading Alpha is free, and a waste if not used. So, we put height / roughness in the Alpha channel.
|
||||
If we want high performance games, we need to optimize our games for graphics hardware. A shader can retrieve four channels RGBA from a texture at once. Albedo and normal textures only have RGB. Thus, reading Alpha is free, and a waste if not used. So, we put height / roughness in the Alpha channel.
|
||||
|
||||
We could have the system channel pack for you at startup, however that would mean processing up to 128 images every time any scene with Terrain3D loads, both in the editor and running games. Exported games may not even work since Godot's image compression libraries only exist in the editor. The most reasonable path is for gamedevs to learn a simple process that they'll use for their entire career and use it to set up terrain textures one time.
|
||||
We could have the software let you specify individual maps and we pack textures for you at startup, however that would mean processing up to 160 images every time any scene with Terrain3D loads, both in the editor and running games. Exported games may not even work since Godot's image compression libraries only exist in the editor. The most reasonable path is for gamedevs to learn a simple process that they'll use for their entire career and use it to set up terrain textures one time.
|
||||
|
||||
### What about AO, Emissive, Metal, and other texture maps?
|
||||
### What about Emissive, Metal, and other texture maps?
|
||||
|
||||
Most terrain textures like grass, rock, and dirt do not need these.
|
||||
|
||||
The only one that might be useful generally is AO, however that is debatable. We do have height, which can double for AO in a custom shader. Or, if you have no height texture, you can substitute an AO texture. These two are similar depending on the specific texture, and it's not worth allocating another texture array just for AO.
|
||||
|
||||
Occasional textures do need additional texture maps. Lava rock might need emissive, or rock with gold veins might need metallic, or some unique texture might need both height and AO. These are most likely only 1-2 textures out of the possible 32, so setting up these additional options for all textures is a waste of memory. You can add a [custom shader](tips_technical.md#add-a-custom-texture-map) to add the individual texture map.
|
||||
Occasional textures do need additional texture maps. Lava rock might need emissive, or rock with gold veins might need metallic, or some unique texture might need both. These are most likely only 1-2 textures out of the possible 32, so setting up these additional options for all textures is a waste of memory. You can add a [custom shader](tips_technical.md#add-a-custom-texture-map) to add the individual texture map.
|
||||
|
||||
### Why not use Standard Godot materials?
|
||||
|
||||
All materials in Godot are just shaders. The standard shader is both overly complex, yet inadequate for our needs. Dirt does not need SSS, refraction, or backlighting for instance. See [a more thorough explanation](https://github.com/TokisanGames/Terrain3D/issues/199).
|
||||
All materials in Godot are just shaders. The standard shader is both overly complex, and inadequate for our needs. Dirt does not need SSS, refraction, or backlighting for instance. See [a more thorough explanation](https://github.com/TokisanGames/Terrain3D/issues/199).
|
||||
|
||||
### What about displacement?
|
||||
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ This list are for items that don't already have dedicated pages in the documenta
|
|||
| Object placement | The [instancer](instancer.md) supports placing foliage. Placing objects that shouldn't be in a MultiMeshInstance node is [out of scope](https://github.com/TokisanGames/Terrain3D/issues/47). See 3rd party tools below.
|
||||
| Streaming | There is no streaming built in to Godot. Region Streaming is [in progress](https://github.com/TokisanGames/Terrain3D/pull/675).
|
||||
| Roads | Look at [Godot Road Generator](https://github.com/TheDuckCow/godot-road-generator/).
|
||||
| Water | Use [WaterWays](https://github.com/Arnklit/Waterways) for rivers, or [Realistic Water Shader](https://github.com/godot-extended-libraries/godot-realistic-water/) or [Infinite Ocean](https://stayathomedev.com/tutorials/general-tutorials/infinite-ocean) for lakes or oceans.
|
||||
| Water | Use [WaterWays](https://github.com/Arnklit/Waterways) for rivers, or [Realistic Water Shader](https://github.com/godot-extended-libraries/godot-realistic-water/) or a variety of other water shaders available online for lakes or oceans.
|
||||
|**Rendering**|
|
||||
| Frustum Culling | The terrain is made up of several meshes, so half can be culled if the camera is near the ground.
|
||||
| SDFGI | Works fine.
|
||||
| VoxelGI | Works fine.
|
||||
| Lightmaps | Not possible. There is no static mesh, nor UV2 channel to bake lightmaps on to.
|
||||
| **3rd Party Tools** |
|
||||
| [Scatter](https://github.com/HungryProton/scatter) | For placing MeshInstance3D objects algorithmically, with or without collision. We provide [a script](https://github.com/TokisanGames/Terrain3D/blob/main/project/addons/terrain_3d/extras/3rd_party/project_on_terrain3d.gd) that allows Scatter to detect our terrain. Or you can change collision mode to `Full / Editor` and use the default `Project on Colliders`. Don't use for MultiMeshInstances, use our built in system.
|
||||
| [Scatter](https://github.com/HungryProton/scatter) | For placing MeshInstance3D objects algorithmically, with or without collision. We provide [a script](https://github.com/TokisanGames/Terrain3D/blob/main/project/addons/terrain_3d/extras/3rd_party/project_on_terrain3d.gd) that allows Scatter to detect our terrain. Or you can change collision mode to `Full / Editor` and use the default `Project on Colliders`. Don't use it for MultiMeshInstances, use our built-in instancer.
|
||||
| [AssetPlacer](https://cookiebadger.itch.io/assetplacer) | A level design tool for placing MeshInstance3D assets manually. Works on Terrain3D with placement mode set to Terrain3D or using the default mode and collision mode set to `Full / Editor`.
|
||||
|
||||
|
||||
|
|
@ -83,9 +83,12 @@ Older style asthetics has a few different looks:
|
|||
|
||||
|
||||
### Day/Night cycles & light under the terrain
|
||||
The terrain shader is set to `cull_back`, meaning back faces are neither rendered, nor do they block light. If you have a day/night cycle and the sun sets below the horizon, it will shine through the terrain. Enable the shader override and change the second line to `cull_disabled` and the horizon will block sunlight. This does cost performance.
|
||||
|
||||
Alternatively, turn off your light when it syncs below. This will likely cause a shader recompile in the engine as it's a different lighting configuration. Instead you can change light energy to 0, or in the same frame, simultaneously turn off the sun light and turn on a moon light.
|
||||
If you have a day/night cycle and the sun sets below the horizon, it might shine through the terrain. There are a few options you can try:
|
||||
|
||||
* Check `Material / Shader Override Enabled` and change the second line of the generated shader to `cull_disabled`. The terrain shader is set to `cull_back` by default, meaning back faces are neither rendered, nor do they block light. This will change that, though it does cost some performance.
|
||||
* You can also try changing `Rendering / cast_shadows` to double sided.
|
||||
* Turn off your light when it sinks below the horizon. Changing the number of visible DirectionalLight3Ds will likely cause a shader recompile in the engine as it's a different lighting configuration. Instead you can tween light energy to 0, or you could turn off the sun light and turn on a moon light as long as it is done simultaneously in the same frame.
|
||||
|
||||
|
||||
### Accessing private shader variables
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
Troubleshooting
|
||||
=================
|
||||
|
||||
Make sure to watch the [tutorial videos](tutorial_videos.md) which show proper installation and setup.
|
||||
Terrain3D is working for thousands of users. If you're having trouble you've likely missed a step or an important piece of documentation. Ensure you are using the [console version of Godot](#using-the-console), and have reviewed the [installation instructions](installation.md) before continuing.
|
||||
|
||||
Also see [Technical Tips](tips_technical.md) which may have other helpful information.
|
||||
You can also watch the [tutorial videos](tutorial_videos.md) which show proper installation and setup, and read [Technical Tips](tips_technical.md) which may have other helpful information.
|
||||
|
||||
**Table of Contents**
|
||||
* [Installation](#installation)
|
||||
|
|
@ -39,11 +39,12 @@ Then, click the Terrain3D node in the Scene panel to activate the tools and asse
|
|||
|
||||
Restart Godot twice before using it. Review the [installation instructions](installation.md).
|
||||
|
||||
|
||||
### Start up is very slow
|
||||
|
||||
You probably have a large terrain and are generating collision for all of it. Set your Collision Mode to `Disabled` to test. You can dynamically create only a small collision area around the camera by setting your Collision Mode to `Dynamic / Game` (default) or `Dynamic / Editor`. Read more about [collision modes here](collision.md#physics-based-collision-raycasting).
|
||||
|
||||
Or you've added a bunch of the generated textures, which are binary data saved as text in the scene. Or you've disconnected your textures from the files on disk, which has done the same thing. If your .tscn scene file (or .tres asset list if you've saved it off) is very large, and has lots of binary data as text, this is the case. Review your textures and ensure each is linked to a file saved on disk.
|
||||
Or you've added a bunch of the generated textures, which are binary data saved as text in the scene. Or you've disconnected your textures from the files on disk, which has done the same thing. If your .tscn scene file (or .tres asset list if you've saved it off) is very large, and has lots of binary data as text, this is the case. Review your textures and ensure each is linked to a file saved on disk. Terrain3D should also report problem textures to your [terminal](#using-the-console).
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -51,7 +52,7 @@ Or you've added a bunch of the generated textures, which are binary data saved a
|
|||
|
||||
### Added a texture, now the terrain is white
|
||||
|
||||
Your console also reports something like:
|
||||
Your [console](#using-the-console) also reports something like:
|
||||
|
||||
`Texture 1 albedo / normal, size / format... doesn't match size of first texture... They must be identical.`
|
||||
|
||||
|
|
@ -99,7 +100,7 @@ If you're using multiple cameras, or viewports, you need to tell Terrain3D which
|
|||
|
||||
### Textures flicker
|
||||
|
||||
Disable temporal effects: FSR, TAA. The Terrain3D mesh is constantly moving which causes Godot to unnecessarily generate motion vectors for the terrain. A way to fix this is making it's way through Godot and will be included in a later version. Until then, temporal effects are unreliable.
|
||||
Disable temporal effects: FSR, TAA, and motion blur. The Terrain3D mesh is constantly moving which causes Godot to unnecessarily generate motion vectors for the terrain. A way to fix this is making it's way through Godot and will be included in a later version. Until then, temporal effects are unreliable.
|
||||
|
||||
|
||||
### Intersecting meshes flicker
|
||||
|
|
@ -109,7 +110,7 @@ When another mesh intersects with Terrain3D far away from the camera, such as in
|
|||
|
||||
### Segments of the terrain disappear on camera movement
|
||||
|
||||
You can increase `Renderer/Cull Margin`. For sculpted regions this should not be necessary as sculpting sets the AABB for the meshes already. However for shader based backgrounds like WorldBackground, it has no AABB and needs an increased cull margin if it is higher than the sculpted areas. This consumes performance so it is ideal if not used.
|
||||
You can increase `Renderer/Cull Margin`. For sculpted regions this should not be necessary as sculpting sets the AABB for the meshes already. However for shader based backgrounds like WorldBackground, or Flat with ground level, there is no AABB detection. You need to specify an increased cull margin if the mesh goes higher or lower than the sculpted areas. This consumes some performance so it is ideal if not used.
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -121,21 +122,21 @@ If this is the first startup after installing the plugin, this is normal due to
|
|||
|
||||
If it still crashes, try the demo scene.
|
||||
|
||||
If that doesn't work, most likely the library version does not match the engine version. If you downloaded a release binary, download the exactly matching engine version. If you built from source review the [instructions](building_from_source.md) to make sure your `godot-cpp` directory exactly matches the engine version you want to use.
|
||||
If that doesn't work, most likely the Terrain3D library version does not match the engine version. If you downloaded a release binary, download the exactly matching engine version. If you built from source review the [instructions](building_from_source.md) to make sure your `godot-cpp` directory exactly matches the engine version you want to use.
|
||||
|
||||
If the demo scene does work, you have an issue in your project. It could be a setting or file given to Terrain3D, or it could be anywhere else in your project. Divide and conquer. Copy your project and start ripping things out until you find the cause.
|
||||
|
||||
### Exported game crashes on startup
|
||||
|
||||
First make sure your game works running in the editor. Then ensure it works as a debug export with the console open. If there are challenges, you can enable [Terrain3D debugging](#debug-logs) before exporting with debug so you can see activity. Only then, test in release mode.
|
||||
First make sure your game works running in the editor. Then ensure it works as a debug export with the console open. If there are challenges, you can enable [Terrain3D debugging](#debug-logs) before exporting with debug so you can see activity. Only then, test in release mode.
|
||||
|
||||
Make sure you have both the debug and release binaries on your system, or have built Terrain3D in [both debug and release mode](building_from_source.md#5-build-the-extension), and that upon export both libraries are in the export directory (eg. `libterrain.windows.debug.x86_64.dll` and `libterrain.windows.release.x86_64.dll`). If you don't have the necessary libraries, your game will close instantly upon startup.
|
||||
Make sure you have both the debug and release binaries on your system, or have built Terrain3D in [both debug and release mode](building_from_source.md#5-build-the-extension), and that upon export both libraries are in the export directory (eg. `libterrain.windows.debug.x86_64.dll` and `libterrain.windows.release.x86_64.dll`). These libraries must be in the same directory as the executable, or somewhere in the library search path. Every OS has this option. If Godot can't open the libraries you linked to, your game will close instantly upon startup.
|
||||
|
||||
---
|
||||
|
||||
## Using the Console
|
||||
|
||||
As a gamedev, you should always be running with the console open. This means you ran `Godot_v4.*_console.exe` or ran Godot in a terminal window.
|
||||
As a gamedev, you should always be running with the console or terminal window open. This means you ran `Godot_v4.*_console.exe` or ran Godot in a terminal window.
|
||||
|
||||
```{image} images/console_exec.png
|
||||
:target: ../_images/console_exec.png
|
||||
|
|
|
|||
Loading…
Reference in New Issue