diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 30ea7d43d..290aaaa0d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -43,6 +43,16 @@ We use Godot's clang-format hooks that will format your code upon making a commi
We use the standard [Godot PR workflow](https://docs.godotengine.org/en/stable/contributing/workflow/pr_workflow.html). Please submit PRs according to the same process Godot uses.
+This includes:
+* Creating a new branch (not main) before submitting the PR.
+* Never using git merge, or the `sync` button. Only fetch, push, pull.
+* To update your PR to the latest main, rebase it then force push into your branch.
+ * `git pull --rebase upstream main`
+ * `git push -f`
+
+Read the guide above for more details.
+
+
## Code Style
### GDScript
diff --git a/Terrain3D.vcxproj.filters b/Terrain3D.vcxproj.filters
index 2dd8eade3..5be72811a 100644
--- a/Terrain3D.vcxproj.filters
+++ b/Terrain3D.vcxproj.filters
@@ -301,7 +301,7 @@
4. Shaders
- 2. Docs
+ 1. Project Files
diff --git a/doc/_new_release_process.txt b/doc/_new_release_process.txt
index 387b941e8..6224b7f05 100644
--- a/doc/_new_release_process.txt
+++ b/doc/_new_release_process.txt
@@ -1,9 +1,9 @@
Setting up a new release in Terrain3D
------------------------------------------
-If Storage has changed format:
-* Set src/terrain_3d_storage.h : CURRENT_VERSION
-* Update docs/storage_format.md
+If Data has changed format:
+* Set src/terrain_3d_data.h : CURRENT_VERSION
+* Update docs/data_format.md
Upgrade to new release version:
* Set src/terrain_3d.h : _version
diff --git a/doc/api/class_terrain3d.rst b/doc/api/class_terrain3d.rst
index e1d2d33b1..6c34e64dc 100644
--- a/doc/api/class_terrain3d.rst
+++ b/doc/api/class_terrain3d.rst
@@ -80,7 +80,7 @@ Properties
+------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
| :ref:`Terrain3DTextureList` | :ref:`texture_list` | |
+------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`String` | :ref:`version` | ``"0.9.3-dev"`` |
+ | :ref:`String` | :ref:`version` | ``"1.0.0-dev"`` |
+------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
| :ref:`float` | :ref:`vertex_spacing` | ``1.0`` |
+------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
@@ -588,7 +588,7 @@ See :ref:`get_intersection`.
- |void| **change_region_size**\ (\ value\: :ref:`RegionSize`\ )
- :ref:`RegionSize` **get_region_size**\ (\ )
-The number of vertices in each region, and the number of pixels for each map in Terrain3DRegion. 1 pixel corresponds to 1 vertex. :ref:`vertex_spacing` scales regions, but does not change the number of vertices or pixels.
+The number of vertices in each region, and the number of pixels for each map in :ref:`Terrain3DRegion`. 1 pixel always corresponds to 1 vertex. :ref:`vertex_spacing` laterally scales regions, but does not change the number of vertices or pixels in each.
.. rst-class:: classref-item-separator
@@ -622,7 +622,9 @@ The render layers the terrain is drawn on. This sets ``VisualInstance3D.layers``
- |void| **set_save_16_bit**\ (\ value\: :ref:`bool`\ )
- :ref:`bool` **get_save_16_bit**\ (\ )
-Heightmaps are always loaded and edited in 32-bit. This option saves heightmaps as 16-bit half precision to reduce file size. This process is lossy, but does not change what is currently in memory.
+If enabled, heightmaps are saved as 16-bit half-precision to reduce file size. Files are always loaded in 32-bit for editing. Upon save, a copy of the heightmap is converted to 16-bit for writing. It does not change what is currently in memory.
+
+This process is lossy. 16-bit precision gets increasingly worse with every power of 2. At a height of 256m, the precision interval is .25m. At 512m it is .5m. At 1024m it is 1m. Saving a height of 1024.4m will be rounded down to 1024m.
.. rst-class:: classref-item-separator
@@ -683,7 +685,7 @@ Deprecated. See :ref:`assets`.
.. rst-class:: classref-property
-:ref:`String` **version** = ``"0.9.3-dev"`` :ref:`🔗`
+:ref:`String` **version** = ``"1.0.0-dev"`` :ref:`🔗`
.. rst-class:: classref-property-setget
@@ -706,7 +708,7 @@ The current version of Terrain3D.
- |void| **set_vertex_spacing**\ (\ value\: :ref:`float`\ )
- :ref:`float` **get_vertex_spacing**\ (\ )
-The distance between vertices. Godot units are typically considered to be meters. This scales the terrain on X and Z axes.
+The distance between vertices. Godot units are typically considered to be meters. This laterally scales the terrain on X and Z axes.
This variable changes the global position of landscape features. A mountain peak might be at (512, 512), but with a vertex spacing of 2.0 it is now located at (1024, 1024).
diff --git a/doc/api/class_terrain3dassets.rst b/doc/api/class_terrain3dassets.rst
index b5462298c..201c971b0 100644
--- a/doc/api/class_terrain3dassets.rst
+++ b/doc/api/class_terrain3dassets.rst
@@ -334,6 +334,8 @@ Returns the array of all uv scale values used in the texture assets, indexed by
Saves this texture list resource to disk, if saved as an external ``.tres`` or ``.res`` resource file.
+path - specifies a directory and file name to use from now on.
+
.. rst-class:: classref-item-separator
----
diff --git a/doc/api/class_terrain3ddata.rst b/doc/api/class_terrain3ddata.rst
index 2b530cae1..57c6e0ddf 100644
--- a/doc/api/class_terrain3ddata.rst
+++ b/doc/api/class_terrain3ddata.rst
@@ -246,7 +246,7 @@ Emitted when the region map or any map array has been regenerated.
**maps_edited**\ (\ edited_area\: :ref:`AABB`\ ) :ref:`🔗`
-This signal is emitted whenever the editor is used to:
+This signal is emitted whenever the editor (:ref:`Terrain3DEditor`) is used to:
- add or remove a region
@@ -491,7 +491,7 @@ R16 or exr are recommended for roundtrip external editing.
R16 can be edited by Krita, however you must know the dimensions and min/max before reimporting. This information is printed to the console.
-Res/tres allow storage in any of Godot's native Image formats.
+Res/tres stores in Godot's native data format.
.. rst-class:: classref-item-separator
diff --git a/doc/api/class_terrain3dinstancer.rst b/doc/api/class_terrain3dinstancer.rst
index ecae8ca84..099e82cde 100644
--- a/doc/api/class_terrain3dinstancer.rst
+++ b/doc/api/class_terrain3dinstancer.rst
@@ -47,33 +47,35 @@ Methods
.. table::
:widths: auto
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`add_instances`\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) |
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`add_multimesh`\ (\ mesh_id\: :ref:`int`, multimesh\: :ref:`MultiMesh`, transform\: :ref:`Transform3D` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)\ ) |
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`add_transforms`\ (\ mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`Array`\[:ref:`Color`\] = []\ ) |
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`append_location`\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`Array`\[:ref:`Color`\], clear\: :ref:`bool` = false, update\: :ref:`bool` = true\ ) |
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`append_region`\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`Array`\[:ref:`Color`\], clear\: :ref:`bool` = false, update\: :ref:`bool` = true\ ) |
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`clear_by_location`\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`\ ) |
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`clear_by_mesh`\ (\ mesh_id\: :ref:`int`\ ) |
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`force_update_mmis`\ (\ ) |
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Dictionary` | :ref:`get_mmis`\ (\ ) |const| |
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`remove_instances`\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) |
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`set_cast_shadows`\ (\ mesh_id\: :ref:`int`, mode\: :ref:`ShadowCastingSetting`\ ) |
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`swap_ids`\ (\ src_id\: :ref:`int`, dest_id\: :ref:`int`\ ) |
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`update_transforms`\ (\ aabb\: :ref:`AABB`\ ) |
- +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`add_instances`\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`add_multimesh`\ (\ mesh_id\: :ref:`int`, multimesh\: :ref:`MultiMesh`, transform\: :ref:`Transform3D` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), update\: :ref:`bool` = true\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`add_transforms`\ (\ mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray` = PackedColorArray(), update\: :ref:`bool` = true\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`append_location`\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray`, update\: :ref:`bool` = true\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`append_region`\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray`, update\: :ref:`bool` = true\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`clear_by_location`\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`clear_by_mesh`\ (\ mesh_id\: :ref:`int`\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`clear_by_region`\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: :ref:`int`\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`dump_data`\ (\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`dump_mmis`\ (\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`force_update_mmis`\ (\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`remove_instances`\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`swap_ids`\ (\ src_id\: :ref:`int`, dest_id\: :ref:`int`\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`update_transforms`\ (\ aabb\: :ref:`AABB`\ ) |
+ +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
@@ -100,9 +102,11 @@ Used by Terrain3DEditor to place instances given many brush parameters. In addit
.. rst-class:: classref-method
-|void| **add_multimesh**\ (\ mesh_id\: :ref:`int`, multimesh\: :ref:`MultiMesh`, transform\: :ref:`Transform3D` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)\ ) :ref:`🔗`
+|void| **add_multimesh**\ (\ mesh_id\: :ref:`int`, multimesh\: :ref:`MultiMesh`, transform\: :ref:`Transform3D` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), update\: :ref:`bool` = true\ ) :ref:`🔗`
-Allows procedural placement of meshes. The :ref:`Terrain3DMeshAsset` mesh_id should already be setup. This extracts the instance transforms and colors from a multimesh and passes it to :ref:`add_transforms`.
+Allows procedural placement of meshes, or importing from another MultiMeshInstancer placement tool. The specified mesh_id should already be setup as a :ref:`Terrain3DMeshAsset` in the asset dock. This function extracts the instance transforms and colors from a multimesh and passes it to :ref:`add_transforms`.
+
+Update will regenerate the MultiMeshInstances. Disable for bulk adding, then call at the end.
.. rst-class:: classref-item-separator
@@ -112,12 +116,14 @@ Allows procedural placement of meshes. The :ref:`Terrain3DMeshAsset`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`Array`\[:ref:`Color`\] = []\ ) :ref:`🔗`
+|void| **add_transforms**\ (\ mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray` = PackedColorArray(), update\: :ref:`bool` = true\ ) :ref:`🔗`
-Allows procedural placement of meshes. The :ref:`Terrain3DMeshAsset` mesh_id should already be setup. Then you provide the array of Transform3Ds and optional Colors, which will be parsed into our region based data storage and fed directly into the appropriate MultiMeshInstances.
+Allows procedural placement of meshes. The mesh_id should already be setup as a :ref:`Terrain3DMeshAsset` in the asset dock. You provide the array of Transform3Ds and optional Colors, which will be parsed into our data storage.
This function adds the :ref:`Terrain3DMeshAsset.height_offset` to the transform along its local Y axis.
+Update will regenerate the MultiMeshInstances. Disable for bulk adding, then call at the end.
+
.. rst-class:: classref-item-separator
----
@@ -126,9 +132,11 @@ This function adds the :ref:`Terrain3DMeshAsset.height_offset`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`Array`\[:ref:`Color`\], clear\: :ref:`bool` = false, update\: :ref:`bool` = true\ ) :ref:`🔗`
+|void| **append_location**\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray`, update\: :ref:`bool` = true\ ) :ref:`🔗`
-Appends new transforms to existing multimeshes in a region specified by location. Multimesh transform arrays cannot be modified and must be rebuilt. This will make a new array with both old and new transforms. `Clear` will skip the old array.
+Appends new transforms to the existing data within a region location. The mesh_id should already be setup as a :ref:`Terrain3DMeshAsset` in the asset dock.
+
+Update will regenerate the MultiMeshInstances. Disable for bulk adding, then call at the end.
.. rst-class:: classref-item-separator
@@ -138,9 +146,11 @@ Appends new transforms to existing multimeshes in a region specified by location
.. rst-class:: classref-method
-|void| **append_region**\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`Array`\[:ref:`Color`\], clear\: :ref:`bool` = false, update\: :ref:`bool` = true\ ) :ref:`🔗`
+|void| **append_region**\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray`, update\: :ref:`bool` = true\ ) :ref:`🔗`
+
+Appends new transforms to the existing data within a region location. The mesh_id should already be setup as a :ref:`Terrain3DMeshAsset` in the asset dock.
-Appends new transforms to existing multimeshes in a specified region. Multimesh transform arrays cannot be modified and must be rebuilt. This will make a new array with both old and new transforms. `Clear` will skip the old array.
+Update will regenerate the MultiMeshInstances. Disable for bulk adding, then call at the end.
.. rst-class:: classref-item-separator
@@ -152,7 +162,7 @@ Appends new transforms to existing multimeshes in a specified region. Multimesh
|void| **clear_by_location**\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`\ ) :ref:`🔗`
-Removes MultiMeshInstance nodes attached to the tree, and MultiMeshes in Terrain3DRegions that match both the region location and the mesh id.
+Removes all instancer data and MultiMeshInstance nodes attached to the tree for the specified region location and mesh id.
.. rst-class:: classref-item-separator
@@ -164,55 +174,67 @@ Removes MultiMeshInstance nodes attached to the tree, and MultiMeshes in Terrain
|void| **clear_by_mesh**\ (\ mesh_id\: :ref:`int`\ ) :ref:`🔗`
-Removes MultiMeshInstance nodes attached to the tree, and MultiMeshes in Terrain3DRegions that match the mesh id.
+Removes all instancer data and MultiMeshInstance nodes attached to the tree for all regions for the specified mesh id.
.. rst-class:: classref-item-separator
----
-.. _class_Terrain3DInstancer_method_force_update_mmis:
+.. _class_Terrain3DInstancer_method_clear_by_region:
.. rst-class:: classref-method
-|void| **force_update_mmis**\ (\ ) :ref:`🔗`
+|void| **clear_by_region**\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: :ref:`int`\ ) :ref:`🔗`
-Removes and rebuilds all MultiMeshInstances.
+Removes all instancer data and MultiMeshInstance nodes attached to the tree for the specified region and mesh id.
.. rst-class:: classref-item-separator
----
-.. _class_Terrain3DInstancer_method_get_mmis:
+.. _class_Terrain3DInstancer_method_dump_data:
.. rst-class:: classref-method
-:ref:`Dictionary` **get_mmis**\ (\ ) |const| :ref:`🔗`
+|void| **dump_data**\ (\ ) :ref:`🔗`
-Returns the dictionary containing the MultiMeshInstance3D nodes, which are hidden children of Terrain3D. The dictionary is keyed by Vector3i(region_location.x, region_location.y, mesh_id).
+Dumps the instancer data arrays and dictionaries for all regions.
.. rst-class:: classref-item-separator
----
-.. _class_Terrain3DInstancer_method_remove_instances:
+.. _class_Terrain3DInstancer_method_dump_mmis:
.. rst-class:: classref-method
-|void| **remove_instances**\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) :ref:`🔗`
+|void| **dump_mmis**\ (\ ) :ref:`🔗`
-Uses parameters asset_id, size, strength, fixed_scale, random_scale, to randomly remove instances within the indicated brush position and size.
+Dumps the MultiMeshInstances attached to the tree and information about the nodes for all regions.
.. rst-class:: classref-item-separator
----
-.. _class_Terrain3DInstancer_method_set_cast_shadows:
+.. _class_Terrain3DInstancer_method_force_update_mmis:
.. rst-class:: classref-method
-|void| **set_cast_shadows**\ (\ mesh_id\: :ref:`int`, mode\: :ref:`ShadowCastingSetting`\ ) :ref:`🔗`
+|void| **force_update_mmis**\ (\ ) :ref:`🔗`
-Tells the renderer how to cast shadows from this mesh asset onto the terrain and other objects. This sets ``GeometryInstance3D.ShadowCastingSetting`` on all MultiMeshInstances for the specified mesh. This function is called by :ref:`Terrain3DMeshAsset.cast_shadows`, but you can also call it manually.
+Removes and rebuilds all MultiMeshInstances.
+
+.. rst-class:: classref-item-separator
+
+----
+
+.. _class_Terrain3DInstancer_method_remove_instances:
+
+.. rst-class:: classref-method
+
+|void| **remove_instances**\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) :ref:`🔗`
+
+Uses parameters asset_id, size, strength, fixed_scale, random_scale, to randomly remove instances within the indicated brush position and size.
.. rst-class:: classref-item-separator
diff --git a/doc/api/class_terrain3dmaterial.rst b/doc/api/class_terrain3dmaterial.rst
index d2b14c60b..43480837e 100644
--- a/doc/api/class_terrain3dmaterial.rst
+++ b/doc/api/class_terrain3dmaterial.rst
@@ -62,6 +62,8 @@ Properties
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`bool` | :ref:`show_heightmap` | ``false`` |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
+ | :ref:`bool` | :ref:`show_instancer_grid` | ``false`` |
+ +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`bool` | :ref:`show_navigation` | ``false`` |
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`bool` | :ref:`show_region_grid` | ``false`` |
@@ -412,6 +414,23 @@ Albedo is a white to black gradient depending on height. The gradient is scaled
----
+.. _class_Terrain3DMaterial_property_show_instancer_grid:
+
+.. rst-class:: classref-property
+
+:ref:`bool` **show_instancer_grid** = ``false`` :ref:`🔗`
+
+.. rst-class:: classref-property-setget
+
+- |void| **set_show_instancer_grid**\ (\ value\: :ref:`bool`\ )
+- :ref:`bool` **get_show_instancer_grid**\ (\ )
+
+Draws the 32x32m cell grid on the terrain, which shows how the instancer data is partitioned.
+
+.. rst-class:: classref-item-separator
+
+----
+
.. _class_Terrain3DMaterial_property_show_navigation:
.. rst-class:: classref-property
@@ -614,6 +633,8 @@ Returns the RID of the built in shader used with the Rendering Server. This is d
Saves this material resource to disk, if saved as an external ``.tres`` or ``.res`` resource file.
+path - specifies a directory and file name to use from now on.
+
.. rst-class:: classref-item-separator
----
diff --git a/doc/api/class_terrain3dmeshasset.rst b/doc/api/class_terrain3dmeshasset.rst
index 15ac13d9f..1e481285d 100644
--- a/doc/api/class_terrain3dmeshasset.rst
+++ b/doc/api/class_terrain3dmeshasset.rst
@@ -54,6 +54,8 @@ Properties
+---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+
| :ref:`PackedScene` | :ref:`scene_file` | |
+---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+
+ | :ref:`float` | :ref:`visibility_range` | ``1024.0`` |
+ +---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+
.. rst-class:: classref-reftable-group
@@ -82,37 +84,37 @@ Methods
Signals
-------
-.. _class_Terrain3DMeshAsset_signal_cast_shadows_changed:
+.. _class_Terrain3DMeshAsset_signal_file_changed:
.. rst-class:: classref-signal
-**cast_shadows_changed**\ (\ ) :ref:`🔗`
+**file_changed**\ (\ ) :ref:`🔗`
-Emitted when :ref:`cast_shadows` is changed on this mesh asset.
+Emitted when :ref:`scene_file` is changed, or if the generated mesh is toggled.
.. rst-class:: classref-item-separator
----
-.. _class_Terrain3DMeshAsset_signal_file_changed:
+.. _class_Terrain3DMeshAsset_signal_id_changed:
.. rst-class:: classref-signal
-**file_changed**\ (\ ) :ref:`🔗`
+**id_changed**\ (\ ) :ref:`🔗`
-Emitted when :ref:`scene_file` is changed, or if the generated mesh is toggled.
+Emitted when :ref:`id` is changed.
.. rst-class:: classref-item-separator
----
-.. _class_Terrain3DMeshAsset_signal_id_changed:
+.. _class_Terrain3DMeshAsset_signal_instancer_setting_changed:
.. rst-class:: classref-signal
-**id_changed**\ (\ ) :ref:`🔗`
+**instancer_setting_changed**\ (\ ) :ref:`🔗`
-Emitted when :ref:`id` is changed.
+Emitted when instancer specific settings are changed on this mesh asset, such as :ref:`cast_shadows` or :ref:`visibility_range`.
.. rst-class:: classref-item-separator
@@ -193,7 +195,7 @@ Property Descriptions
- |void| **set_cast_shadows**\ (\ value\: :ref:`ShadowCastingSetting`\ )
- :ref:`ShadowCastingSetting` **get_cast_shadows**\ (\ )
-Tells the renderer how to cast shadows from this mesh asset onto the terrain and other objects. This sets ``GeometryInstance3D.ShadowCastingSetting`` on all MultiMeshInstances used by this mesh.
+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.
.. rst-class:: classref-item-separator
@@ -350,6 +352,23 @@ A user specified name for this asset.
A packed scene to load the mesh from. See the top description.
+.. rst-class:: classref-item-separator
+
+----
+
+.. _class_Terrain3DMeshAsset_property_visibility_range:
+
+.. rst-class:: classref-property
+
+:ref:`float` **visibility_range** = ``1024.0`` :ref:`🔗`
+
+.. rst-class:: classref-property-setget
+
+- |void| **set_visibility_range**\ (\ value\: :ref:`float`\ )
+- :ref:`float` **get_visibility_range**\ (\ )
+
+Sets ``GeometryInstance3D.visibility_range_end`` on all MultiMeshInstances used by this mesh. Allows the renderer to cull MMIs beyond this distance. Set to 0 to disable culling.
+
.. rst-class:: classref-section-separator
----
diff --git a/doc/api/class_terrain3dregion.rst b/doc/api/class_terrain3dregion.rst
index f1247f365..b38c55b41 100644
--- a/doc/api/class_terrain3dregion.rst
+++ b/doc/api/class_terrain3dregion.rst
@@ -17,7 +17,7 @@ Terrain3DRegion
Description
-----------
-This resource stores all map data for Terrain3D. See `Controlmap Format <../docs/controlmap_format.html>`__ and `Storage Format Changelog <../docs/storage_format.html>`__.
+This resource stores all map data for Terrain3D. See `Controlmap Format <../docs/controlmap_format.html>`__ and `Data Format Changelog <../docs/data_format.html>`__.
.. rst-class:: classref-reftable-group
@@ -27,29 +27,33 @@ Properties
.. table::
:widths: auto
- +-------------------------------------+------------------------------------------------------------------+-------------------+
- | :ref:`Image` | :ref:`color_map` | |
- +-------------------------------------+------------------------------------------------------------------+-------------------+
- | :ref:`Image` | :ref:`control_map` | |
- +-------------------------------------+------------------------------------------------------------------+-------------------+
- | :ref:`bool` | :ref:`deleted` | |
- +-------------------------------------+------------------------------------------------------------------+-------------------+
- | :ref:`bool` | :ref:`edited` | |
- +-------------------------------------+------------------------------------------------------------------+-------------------+
- | :ref:`Image` | :ref:`height_map