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` | | - +-------------------------------------+------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`height_range` | ``Vector2(0, 0)`` | - +-------------------------------------+------------------------------------------------------------------+-------------------+ - | :ref:`Vector2i` | :ref:`location` | | - +-------------------------------------+------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`modified` | | - +-------------------------------------+------------------------------------------------------------------+-------------------+ - | :ref:`Dictionary` | :ref:`multimeshes` | ``{}`` | - +-------------------------------------+------------------------------------------------------------------+-------------------+ - | :ref:`int` | :ref:`region_size` | ``0`` | - +-------------------------------------+------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`version` | ``0.8`` | - +-------------------------------------+------------------------------------------------------------------+-------------------+ + +-------------------------------------+----------------------------------------------------------------------+-------------------+ + | :ref:`Image` | :ref:`color_map` | | + +-------------------------------------+----------------------------------------------------------------------+-------------------+ + | :ref:`Image` | :ref:`control_map` | | + +-------------------------------------+----------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`deleted` | | + +-------------------------------------+----------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`edited` | | + +-------------------------------------+----------------------------------------------------------------------+-------------------+ + | :ref:`Image` | :ref:`height_map` | | + +-------------------------------------+----------------------------------------------------------------------+-------------------+ + | :ref:`Vector2` | :ref:`height_range` | ``Vector2(0, 0)`` | + +-------------------------------------+----------------------------------------------------------------------+-------------------+ + | :ref:`Dictionary` | :ref:`instances` | ``{}`` | + +-------------------------------------+----------------------------------------------------------------------+-------------------+ + | :ref:`Vector2i` | :ref:`location` | | + +-------------------------------------+----------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`modified` | | + +-------------------------------------+----------------------------------------------------------------------+-------------------+ + | :ref:`Dictionary` | :ref:`multimeshes` | ``{}`` | + +-------------------------------------+----------------------------------------------------------------------+-------------------+ + | :ref:`int` | :ref:`region_size` | ``0`` | + +-------------------------------------+----------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`version` | ``0.8`` | + +-------------------------------------+----------------------------------------------------------------------+-------------------+ + | :ref:`float` | :ref:`vertex_spacing` | ``1.0`` | + +-------------------------------------+----------------------------------------------------------------------+-------------------+ .. rst-class:: classref-reftable-group @@ -240,7 +244,7 @@ Image format: FORMAT_RF, 32-bit per pixel as full-precision floating-point. Heights sent to the vertex shader on the GPU which modifies the mesh in real-time. -Editing is always done in 32-bit. We do provide an option to save as 16-bit, see :ref:`Terrain3D.save_16_bit`, which converts to 32-bit on load and back to 16-bit on save. This process is lossy as 16-bit precision gets increasingly worse with every power of 2. +Editing is always done in 32-bit. We do provide an option to save as 16-bit, see :ref:`Terrain3D.save_16_bit`. .. rst-class:: classref-item-separator @@ -263,6 +267,39 @@ The current minimum and maximum height range for this region, used to calculate ---- +.. _class_Terrain3DRegion_property_instances: + +.. rst-class:: classref-property + +:ref:`Dictionary` **instances** = ``{}`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_instances**\ (\ value\: :ref:`Dictionary`\ ) +- :ref:`Dictionary` **get_instances**\ (\ ) + +A Dictionary that stores the instancer transforms for this region. + +The format is instances{mesh_id:int} -> cells{grid_location:Vector2i} -> ( Array\ :ref:`Transform3D`, PackedColorArray, modified:bool ). That is: + +- A dictionary keyed by mesh_id that returns: + +- A dictionary keyed by the grid location of the 32 x 32m cell that returns: + +- A 3-item Array that contains: + +- 0: An Array of Transform3Ds + +- 1: A PackedColorArray + +- 2: A bool that tracks if this cell has been modified + +After changing this data, :ref:`Terrain3DInstancer.force_update_mmis` should be called to rebuild the MMIs. + +.. rst-class:: classref-item-separator + +---- + .. _class_Terrain3DRegion_property_location: .. rst-class:: classref-property @@ -308,7 +345,7 @@ This region has been modified and will be saved. - |void| **set_multimeshes**\ (\ value\: :ref:`Dictionary`\ ) - :ref:`Dictionary` **get_multimeshes**\ (\ ) -A Dictionary indexed by mesh_id that provides the MultiMeshes for this region. +Deprecated and only exists for upgrading. Use :ref:`instances`. .. rst-class:: classref-item-separator @@ -344,6 +381,23 @@ The current region size for this region, calculated from the dimensions of the f The data file version. This is independent of the Terrain3D version, though they often align. +.. rst-class:: classref-item-separator + +---- + +.. _class_Terrain3DRegion_property_vertex_spacing: + +.. rst-class:: classref-property + +:ref:`float` **vertex_spacing** = ``1.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_vertex_spacing**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_vertex_spacing**\ (\ ) + +Stored instancer transforms are laterally scaled by this value. This value is manage by the instancer on loading or when :ref:`Terrain3D.vertex_spacing` is set, and shouldn't be manually adjusted. + .. rst-class:: classref-section-separator ---- diff --git a/doc/api/class_terrain3dutil.rst b/doc/api/class_terrain3dutil.rst index 04617aea0..db9e12172 100644 --- a/doc/api/class_terrain3dutil.rst +++ b/doc/api/class_terrain3dutil.rst @@ -37,7 +37,7 @@ Or you can instance the class for a shorter alias: util.enc_uv_scale(uvscale) | util.enc_auto(autoshader) | \ util.enc_nav(navigation) | util.enc_hole(hole) var color: Color = Color(util.as_float(bits), 0., 0., 1.) - storage.set_control(global_pos, color) + data.set_control(global_pos, color) .. rst-class:: classref-reftable-group diff --git a/doc/build_docs.sh b/doc/build_docs.sh index 402ca3fe7..ce188aacd 100644 --- a/doc/build_docs.sh +++ b/doc/build_docs.sh @@ -18,7 +18,7 @@ $MAKERST --verbose --filter Terrain3D --output api classes/ find classes -type f ! -name 'Terrain3D*' -delete make clean -make html 2>&1 | grep -Pv 'WARNING: undefined label: (?!'\''class_terrain3d)' | egrep -v '(copying images|writing output|reading sources)...' +make html 2>&1 | grep -Pv 'WARNING: undefined label: (?!'\''class_terrain3d)' | egrep -v '(local id not found|copying images|writing output|reading sources)...' start _build/html/index.html popd diff --git a/doc/classes/Terrain3D.xml b/doc/classes/Terrain3D.xml index 8661a2fe8..a16282eea 100644 --- a/doc/classes/Terrain3D.xml +++ b/doc/classes/Terrain3D.xml @@ -166,13 +166,14 @@ See [method get_intersection]. - The number of vertices in each region, and the number of pixels for each map in Terrain3DRegion. 1 pixel corresponds to 1 vertex. [member Terrain3D.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 [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. The render layers the terrain is drawn on. This sets [code skip-lint]VisualInstance3D.layers[/code] in the engine. The defaults is layer 1 and 32 (for the mouse cursor). When you set this, make sure the layer for [member mouse_layer] is included, or set that variable again after this so that the mouse cursor works. - 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. Draws the region grid directly on the terrain. This is more accurate than the region grid gizmo for determining where the region border is when editing. @@ -183,11 +184,11 @@ Deprecated. See [member assets]. - + The current version of Terrain3D. - 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). All Terrain3D functions with a global_position expect an absolute global value. If you would normally use [method Terrain3DData.import_images] to import an image in the region at (-1024, -1024), with a vertex_spacing of 2, you'll need to import that image at (-2048, -2048) to place it in the same region. To scale heights, export the height map and reimport it with a new height scale. diff --git a/doc/classes/Terrain3DAssets.xml b/doc/classes/Terrain3DAssets.xml index 650556454..c02afe93f 100644 --- a/doc/classes/Terrain3DAssets.xml +++ b/doc/classes/Terrain3DAssets.xml @@ -77,6 +77,7 @@ Saves this texture list resource to disk, if saved as an external [code skip-lint].tres[/code] or [code skip-lint].res[/code] resource file. + path - specifies a directory and file name to use from now on. diff --git a/doc/classes/Terrain3DData.xml b/doc/classes/Terrain3DData.xml index 0f6353856..de2c6823e 100644 --- a/doc/classes/Terrain3DData.xml +++ b/doc/classes/Terrain3DData.xml @@ -68,7 +68,7 @@ Exports the specified map type as one of r16/raw, exr, jpg, png, webp, res, tres. 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. @@ -607,7 +607,7 @@ - This signal is emitted whenever the editor is used to: + This signal is emitted whenever the editor ([Terrain3DEditor]) is used to: - add or remove a region - alter a region map with a brush tool - undo or redo any of the above operations diff --git a/doc/classes/Terrain3DInstancer.xml b/doc/classes/Terrain3DInstancer.xml index ab51814c0..9263e73c6 100644 --- a/doc/classes/Terrain3DInstancer.xml +++ b/doc/classes/Terrain3DInstancer.xml @@ -31,18 +31,22 @@ + - Allows procedural placement of meshes. The [Terrain3DMeshAsset] mesh_id should already be setup. This extracts the instance transforms and colors from a multimesh and passes it to [method add_transforms]. + Allows procedural placement of meshes, or importing from another MultiMeshInstancer placement tool. The specified mesh_id should already be setup as a [Terrain3DMeshAsset] in the asset dock. This function extracts the instance transforms and colors from a multimesh and passes it to [method add_transforms]. + Update will regenerate the MultiMeshInstances. Disable for bulk adding, then call at the end. - + + - Allows procedural placement of meshes. The [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 [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 [member 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. @@ -50,11 +54,11 @@ - - - + + - 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 [Terrain3DMeshAsset] in the asset dock. + Update will regenerate the MultiMeshInstances. Disable for bulk adding, then call at the end. @@ -62,11 +66,11 @@ - - - + + - 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. + Appends new transforms to the existing data within a region location. The mesh_id should already be setup as a [Terrain3DMeshAsset] in the asset dock. + Update will regenerate the MultiMeshInstances. Disable for bulk adding, then call at the end. @@ -74,42 +78,48 @@ - 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. - 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. - + + + - Removes and rebuilds all MultiMeshInstances. + Removes all instancer data and MultiMeshInstance nodes attached to the tree for the specified region and mesh id. - - + + - 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. - + - - - 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. + + + + + + Removes and rebuilds all MultiMeshInstances. - + - - + + - Tells the renderer how to cast shadows from this mesh asset onto the terrain and other objects. This sets [code skip-lint]GeometryInstance3D.ShadowCastingSetting[/code] on all MultiMeshInstances for the specified mesh. This function is called by [member Terrain3DMeshAsset.cast_shadows], but you can also call it manually. + Uses parameters asset_id, size, strength, fixed_scale, random_scale, to randomly remove instances within the indicated brush position and size. diff --git a/doc/classes/Terrain3DMaterial.xml b/doc/classes/Terrain3DMaterial.xml index 17286baaa..932e9ad03 100644 --- a/doc/classes/Terrain3DMaterial.xml +++ b/doc/classes/Terrain3DMaterial.xml @@ -35,6 +35,7 @@ Saves this material resource to disk, if saved as an external [code skip-lint].tres[/code] or [code skip-lint].res[/code] resource file. + path - specifies a directory and file name to use from now on. @@ -96,6 +97,9 @@ 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. + + Draws the 32x32m cell grid on the terrain, which shows how the instancer data is partitioned. + Displays the area designated for generating the navigation mesh. diff --git a/doc/classes/Terrain3DMeshAsset.xml b/doc/classes/Terrain3DMeshAsset.xml index 78180d68e..d9b3a1306 100644 --- a/doc/classes/Terrain3DMeshAsset.xml +++ b/doc/classes/Terrain3DMeshAsset.xml @@ -39,7 +39,7 @@ - Tells the renderer how to cast shadows from this mesh asset onto the terrain and other objects. This sets [code skip-lint]GeometryInstance3D.ShadowCastingSetting[/code] 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 [code skip-lint]GeometryInstance3D.cast_shadow[/code] on all MultiMeshInstances used by this mesh. 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. @@ -69,13 +69,11 @@ A packed scene to load the mesh from. See the top description. + + Sets [code skip-lint]GeometryInstance3D.visibility_range_end[/code] on all MultiMeshInstances used by this mesh. Allows the renderer to cull MMIs beyond this distance. Set to 0 to disable culling. + - - - Emitted when [member cast_shadows] is changed on this mesh asset. - - Emitted when [member scene_file] is changed, or if the generated mesh is toggled. @@ -86,6 +84,11 @@ Emitted when [member id] is changed. + + + Emitted when instancer specific settings are changed on this mesh asset, such as [member cast_shadows] or [member visibility_range]. + + Emitted when settings are changed, other than those tracked by other signals. diff --git a/doc/classes/Terrain3DRegion.xml b/doc/classes/Terrain3DRegion.xml index b09669fa1..dc913f7b1 100644 --- a/doc/classes/Terrain3DRegion.xml +++ b/doc/classes/Terrain3DRegion.xml @@ -3,7 +3,7 @@ - This resource stores all map data for Terrain3D. See [url=../docs/controlmap_format.html]Controlmap Format[/url] and [url=../docs/storage_format.html]Storage Format Changelog[/url]. + This resource stores all map data for Terrain3D. See [url=../docs/controlmap_format.html]Controlmap Format[/url] and [url=../docs/data_format.html]Data Format Changelog[/url]. @@ -131,11 +131,22 @@ This map contains the real value heights for the terrain. Image format: FORMAT_RF, 32-bit per pixel as full-precision floating-point. Heights sent to the vertex shader on the GPU which modifies the mesh in real-time. - Editing is always done in 32-bit. We do provide an option to save as 16-bit, see [member Terrain3D.save_16_bit], which converts to 32-bit on load and back to 16-bit on save. This process is lossy as 16-bit precision gets increasingly worse with every power of 2. + Editing is always done in 32-bit. We do provide an option to save as 16-bit, see [member Terrain3D.save_16_bit]. The current minimum and maximum height range for this region, used to calculate the AABB of the terrain. Update it with [method update_height], and recalculate it with [method calc_height_range]. + + A Dictionary that stores the instancer transforms for this region. + The format is instances{mesh_id:int} -> cells{grid_location:Vector2i} -> ( Array[Transform3D], PackedColorArray, modified:bool ). That is: + - A dictionary keyed by mesh_id that returns: + - A dictionary keyed by the grid location of the 32 x 32m cell that returns: + - A 3-item Array that contains: + - 0: An Array of Transform3Ds + - 1: A PackedColorArray + - 2: A bool that tracks if this cell has been modified + After changing this data, [method Terrain3DInstancer.force_update_mmis] should be called to rebuild the MMIs. + The region location, or region grid coordinates in the world space where this region lives. @@ -143,7 +154,7 @@ This region has been modified and will be saved. - A Dictionary indexed by mesh_id that provides the MultiMeshes for this region. + Deprecated and only exists for upgrading. Use [member instances]. The current region size for this region, calculated from the dimensions of the first loaded map. It should match [member Terrain3D.region_size]. @@ -151,6 +162,9 @@ The data file version. This is independent of the Terrain3D version, though they often align. + + Stored instancer transforms are laterally scaled by this value. This value is manage by the instancer on loading or when [member Terrain3D.vertex_spacing] is set, and shouldn't be manually adjusted. + diff --git a/doc/classes/Terrain3DUtil.xml b/doc/classes/Terrain3DUtil.xml index 6662da86d..b392f0058 100644 --- a/doc/classes/Terrain3DUtil.xml +++ b/doc/classes/Terrain3DUtil.xml @@ -17,7 +17,7 @@ util.enc_uv_scale(uvscale) | util.enc_auto(autoshader) | \ util.enc_nav(navigation) | util.enc_hole(hole) var color: Color = Color(util.as_float(bits), 0., 0., 1.) - storage.set_control(global_pos, color) + data.set_control(global_pos, color) [/codeblock] diff --git a/doc/conf.py b/doc/conf.py index c5a1d8604..ddcaa782b 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -9,7 +9,7 @@ project = 'Terrain3D' copyright = '2024 Cory Petkovsek, Roope Palmroos, and Contributors' author = 'Cory Petkovsek, Roope Palmroos, and Contributors' -release = '0.9.3' +release = '1.0.0' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/doc/docs/building_from_source.md b/doc/docs/building_from_source.md index b65ac411c..61a96cda1 100644 --- a/doc/docs/building_from_source.md +++ b/doc/docs/building_from_source.md @@ -158,14 +158,15 @@ scons: done building targets. ## 7. Set up the extension in Godot 1. Build Terrain3D, then ensure binary libraries exist in `project/addons/terrain_3d/bin`. -2. Close Godot. (Not required the first time, but necessary when updating the files on subsequent builds.) -3. Copy `project/addons/terrain_3d` to your own project folder as `/addons/terrain_3d`. -4. Run Godot, using the console executable so you can see error messages. Restart when it prompts. -5. In `Project Settings / Plugins`, ensure that Terrain3D is enabled. -6. Select `Project / Reload Current Project` to restart once more. -7. Create or open a 3D scene and add a new Terrain3D node. -8. Select Terrain3D in the Scene panel. In the Inspector, click the down arrow to the right of the `storage` resource and save it as a binary `.res` file. The other resources can be left as is or saved as text `.tres`. These external files can be shared with other scenes. -9. Learn how to properly [set up your textures](texture_prep.md), or skip to [importing data](import_export.md). +2. Run Godot with the console executable so you can see error messages. +3. In the Project Manager, import the project found in `project` and open it. Restart when it prompts. +4. In `Project / Project Settings / Plugins`, ensure that Terrain3D is enabled. +5. Select `Project / Reload Current Project` to restart once more. +6. If the demo scene doesn't open automatically, open `demo/Demo.tscn`. You should see a terrain. Run the scene by pressing `F6`. + +Close godot before rebuilding again. + +Continue with the remaining [installation instructions](installation.md#in-your-own-scene). ## Other Build Options diff --git a/doc/docs/collision.md b/doc/docs/collision.md index 9957cc716..20ac34898 100644 --- a/doc/docs/collision.md +++ b/doc/docs/collision.md @@ -9,9 +9,9 @@ Using collision is not the only way, nor even the best or fastest way. But we'll Collision is generated at runtime using the physics server. Regular PhysicsBodies will interact with this collision as expected. To detect ground height, use a [ray cast](https://docs.godotengine.org/en/stable/tutorials/physics/ray-casting.html). However, outside of regions, there is no collision, so raycasts won't hit. -Normally the editor doesn't generate collision, but some addons or other activities do need editor collision. To generate it, enable `Terrain3D/Debug/Show Collision`, or set `Terrain3D.debug_show_collision`. You can run in game with this enabled. +Normally the editor doesn't generate collision, but some addons or other activities do need editor collision. To generate it, enable `Terrain3D/Collision/Collision Mode`, or set `Terrain3D.collision_mode`. Set this to `Full / Editor`. You can run in game with this enabled. -This debug option will generate collision one time when enabled or at startup. If the terrain is sculpted afterwards, this collision will be inaccurate to the visual mesh until it is disabled and enabled again. On a Core-i9 12900H, generating collision takes about 145ms per region, so updating it several times per second while sculpting is not practical. Currently all regions are regenerated, rather than only modified regions so it is not optimal. You can follow [PR#278](https://github.com/TokisanGames/Terrain3D/pull/278) for an improved system. +This editor option will generate collision one time when enabled or at startup. If the terrain is sculpted afterwards, this collision will be inaccurate to the visual mesh until collision is disabled and enabled again. On a Core-i9 12900H, generating collision takes about 145ms per 1024m region, so updating it several times per second while sculpting is not practical. Currently all regions are regenerated, rather than only modified regions so it is not optimal. You can follow [PR#278](https://github.com/TokisanGames/Terrain3D/pull/278) for an improved system. See the [Terrain3D API](../api/class_terrain3d.rst) for various functions that configure the collision priority, layers, and mask. @@ -35,7 +35,7 @@ Use it only when you don't already know the X, Z collision point. If you already know the X, Z position, use `get_height()`: ```gdscript - var height: float = terrain.storage.get_height(global_position) + var height: float = terrain.data.get_height(global_position) ``` `NAN` is returned if the position is a hole, or outside of regions. @@ -50,11 +50,12 @@ If you wish to look up thousands of heights, it will be faster to retrieve the h However, note that `get_height()` above will [interpolate between vertices](https://github.com/TokisanGames/Terrain3D/blob/5bab86ff311159356dd4d837ea2c340f59d139b6/src/terrain_3d_storage.cpp#L493-L502), while this code will not. ```gdscript - var region_index: int = terrain.storage.get_region_index(global_position) - var img: Image = terrain.storage.get_map_region(Terrain3DStorage.TYPE_HEIGHT, region_index) - for y in img.get_height(): - for x in img.get_width(): - var height: float = img.get_pixel(x, y).r + var region: Terrain3DRegion = terrain.data.get_regionp(global_position) + if region and not region.is_deleted: + var img: Image = region.get_height_map() + for y in img.get_height(): + for x in img.get_width(): + var height: float = img.get_pixel(x, y).r ``` ---- @@ -64,12 +65,12 @@ However, note that `get_height()` above will [interpolate between vertices](http ### Getting The Normal -After getting the height, you may also wish to get the normal with `Terrain3DStorage.get_normal(global_position)`. The normal is the vector3 pointing perpendulcar to the terrain face. +After getting the height, you may also wish to get the normal with `Terrain3DData.get_normal(global_position)`. The normal is the vector3 pointing perpendulcar to the terrain face. ### Visualizing Collision -To see the collision shape, first enable `Terrain3D/Debug/Show Collision` as described above. +To see the collision shape, first set `Terrain3D/Collision/Collision Mode` to `Full / Editor`. To see it in the editor, in the Godot `Perspective` menu, enable `View Gizmos`. Disable this option on slow systems. diff --git a/doc/docs/double_precision.md b/doc/docs/double_precision.md index 5f48c43e9..503d7c538 100644 --- a/doc/docs/double_precision.md +++ b/doc/docs/double_precision.md @@ -1,11 +1,9 @@ Double Precision ================= -Building Terrain3D with double precision (aka 64-bit) floats is possible, but there are some caveats. +When the player and camera move 10s to 100s of thousands, or millions of units away from the origin using a single precision float engine, things start to break down. Movements, positions, and rendering starts to become jittery or corrupted as the interval between valid values gets larger and larger. -When the player and camera move 10s-100s of thousands, or millions of units away from the origin using a single precision float engine, things start to break down. Movements, positions, and rendering starts to become jittery or corrupted as the gradation between values gets larger and larger. - -Building with double precision floats allows the step between values to remains very small even at large numbers. +Building Terrain3D with double precision (aka 64-bit) floats allows high precision even at large numbers, but there are some caveats. For a more detailed explanation, see [Large World Coordinates](https://docs.godotengine.org/en/stable/tutorials/physics/large_world_coordinates.html) in the Godot documentation. @@ -15,7 +13,7 @@ For a more detailed explanation, see [Large World Coordinates](https://docs.godo * This feature is experimental and has had only one user give a positive report so far. * There are many caveats listed in the link above. You should read them all before beginning this process. * You must build Godot and Terrain3D from source. -* Terrain3D currently supports a maximum world of 65.5x65.5km. Although with `vertex_spacing`, you can expand this up to 10x. You can also have Terrain3D located around the origin, then have your own meshes or a shader generated terrain outside of that world. See [Support more region sizes #70](https://github.com/TokisanGames/Terrain3D/issues/77) for supporting worlds up to 90k per side and more. +* Terrain3D currently supports a maximum world size of 65.5x65.5km. Although with `vertex_spacing`, you can expand this up to 100x. You can also have Terrain3D regions around the origin, then have your own meshes or a shader generated terrain outside of that maximum world space. * Shaders do not support double precision. Clayjohn wrote an article demonstrating how to [Emulate Double Precision](https://godotengine.org/article/emulating-double-precision-gpu-render-large-worlds/) in shaders. He wrote that the camera and model transform matrices needed to be emulated to support double precision. This is now done automatically in the engine when building it with double precision. There may be other cases where shaders will need this emulation. diff --git a/doc/docs/images/integrating_gdextension.jpg b/doc/docs/images/integrating_gdextension.jpg new file mode 100644 index 000000000..bf3d9d17a Binary files /dev/null and b/doc/docs/images/integrating_gdextension.jpg differ diff --git a/doc/docs/images/integrating_gdextension.png b/doc/docs/images/integrating_gdextension.png deleted file mode 100644 index fad8edb06..000000000 Binary files a/doc/docs/images/integrating_gdextension.png and /dev/null differ diff --git a/doc/docs/images/io_data_directory.png b/doc/docs/images/io_data_directory.png new file mode 100644 index 000000000..c6a8e7d51 Binary files /dev/null and b/doc/docs/images/io_data_directory.png differ diff --git a/doc/docs/images/io_height_range.png b/doc/docs/images/io_height_range.png deleted file mode 100644 index 02e13ce1d..000000000 Binary files a/doc/docs/images/io_height_range.png and /dev/null differ diff --git a/doc/docs/images/io_importer.png b/doc/docs/images/io_importer.png index 0387340b8..529705804 100644 Binary files a/doc/docs/images/io_importer.png and b/doc/docs/images/io_importer.png differ diff --git a/doc/docs/images/io_load_storage.png b/doc/docs/images/io_load_storage.png deleted file mode 100644 index 9a252e84d..000000000 Binary files a/doc/docs/images/io_load_storage.png and /dev/null differ diff --git a/doc/docs/images/io_save_storage.png b/doc/docs/images/io_save_storage.png deleted file mode 100644 index b34e3be82..000000000 Binary files a/doc/docs/images/io_save_storage.png and /dev/null differ diff --git a/doc/docs/images/ui_tool_settings.jpg b/doc/docs/images/ui_tool_settings.jpg index 833fbc7ca..db6782f58 100644 Binary files a/doc/docs/images/ui_tool_settings.jpg and b/doc/docs/images/ui_tool_settings.jpg differ diff --git a/doc/docs/import_export.md b/doc/docs/import_export.md index 4cc486e7b..9b2489b33 100644 --- a/doc/docs/import_export.md +++ b/doc/docs/import_export.md @@ -30,15 +30,14 @@ Currently importing and exporting is possible via code or our import tool. We wi 7) Click `Run Import` and wait 10-30 seconds. Look at the console for activity or errors. If the `Terrain3D.debug_level` is set to `debug`, you'll also see progress. -8) When you are happy with the import, scroll down in the inspector (half of it is hidden by the `Textures` panel) until you see `Terrain3D, Storage`. +8) When you are happy with the import, scroll down in the inspector until you see `Terrain3D / Data Directory`. Specify an empty directory and save. -9) Click the right arrow next to the Terrain3DStorage file and save the file wherever you wish. Make sure to save it as `.res` which is a binary Godot resource file. -```{image} images/io_save_storage.png -:target: ../_images/io_save_storage.png +```{image} images/io_data_directory.png +:target: ../_images/io_data_directory.png ``` -You can now load this `res` file into a Terrain3D in any of your scenes. You can also preload an existing storage file in the importer, then import more data into it and save it again. +You can now load this directory into Terrain3D in any of your scenes. You can also preload an existing data directory in the importer, then import more data into it and save it again. ## Supported Import Formats @@ -48,7 +47,7 @@ We can import any supported image format Godot can read. These include: * R16 Height map aka RAW. See below. ### Height map -* Only `exr` or `r16/raw` are recommended for heightmaps. Godot PNG only supports 8-bit per channel, so don't use it for heightmaps. It is fine for external editing of the color map which is RGBA. See [Terrain3DStorage](../api/class_terrain3dstorage.rst) for details on internal storage. +* Only `exr` or `r16/raw` are recommended for heightmaps. Godot PNG only supports 8-bit per channel, so don't use it for heightmaps. It is fine for external editing of the color map which is RGBA. See [Terrain3DData](../api/class_terrain3ddata.rst) for details on data storage. * R16: For 16-bit heightmaps read/writable by World Machine, Unity, Krita, etc. The extension should be `r16` or `raw`. Min/Max heights and image size are not stored in the file, so you must keep track of them elsewhere (such as in the name). * `Photoshop Raw` is not R16. Use [exr](https://www.exr-io.com/) for photoshop. * [Zylann's HTerrain](https://github.com/Zylann/godot_heightmap_plugin/) stores height data in a `res` file which we can import directly. No need to export it, but his tool also exports `exr` and `r16`. @@ -57,7 +56,7 @@ We can import any supported image format Godot can read. These include: * Control maps use a proprietary format. We only import our own format. Use `exr` to export or reimport only from this tool. ### Color map -* Any regular color format is fine, `png` is recommended. The alpha channel is interpretted as a [roughness modifier](../api/class_terrain3dstorage.rst#class-terrain3dstorage-property-color-maps) for wetness. +* Any regular color format is fine, `png` is recommended. The alpha channel is interpretted as a [roughness modifier](../api/class_terrain3ddata.rst#class-terrain3ddata-property-color-maps) for wetness. ## Exporting Data @@ -66,10 +65,10 @@ We can import any supported image format Godot can read. These include: 2) Click Importer in the scene tree. -3) Scroll the inspector down to Terrain3D, Storage. Click the right arrow, and load the storage file you wish to export from. +3) Scroll the inspector down to `Terrain3D / Data Directory`, and load the directory you wish to export from. -```{image} images/io_load_storage.png -:target: ../_images/io_load_storage.png +```{image} images/io_data_directory.png +:target: ../_images/io_data_directory.png ``` 4) Scroll the inspector to `Export File`. @@ -103,18 +102,12 @@ We can export any supported image format Godot can write. These include: * `Photoshop Raw` is not raw, don't use it. Use [exr](https://www.exr-io.com/) for photoshop. ### Control map -* Control maps use a proprietary format. We only import our own. Use `exr`. It won't give you a valid image editable in other tools. This is only for transferring the image to another Terrain3D Storage file. See [Controlmap Format](controlmap_format.md). +* Control maps use a proprietary format. We only import our own. Use `exr`. It won't give you a valid image editable in other tools or image editing apps. This is only for transferring the image to another Terrain3D data file. See [Controlmap Format](controlmap_format.md). ### Color map -* Use `png` or `webp`, as they are lossless rgba formats that external tools can edit. Use `res` for Godot only use. The alpha channel is interpretted as a [roughness modifier](../api/class_terrain3dstorage.rst#class-terrain3dstorage-property-color-maps) for wetness. +* Use `png` or `webp`, as they are lossless rgba formats that external tools can edit. Use `res` for Godot only use. The alpha channel is interpretted as a [roughness modifier](../api/class_terrain3ddata.rst#class-terrain3ddata-property-color-maps) for wetness. ## Exported Image Dimensions -Upon export, the console reports the image size. - -You can get the height of the data by clicking `Update Height Range`, then looking in the read only data of the storage file. - -```{image} images/io_height_range.png -:target: ../_images/io_height_range.png -``` \ No newline at end of file +Upon export, the console reports the image size and minimum/maximum heights. diff --git a/doc/docs/installation.md b/doc/docs/installation.md index 7a6c8d085..181d962a6 100644 --- a/doc/docs/installation.md +++ b/doc/docs/installation.md @@ -7,71 +7,67 @@ Installation & Upgrades * [Upgrading Terrain3D](#upgrading-terrain3d) ## Requirements -* Supports Godot 4.2 & 4.3 +* Terrain3D 1.0.0 supports Godot 4.3. * Supports Windows, Linux, and [macOS (read more)](platforms.md#macos). * Some platforms and renderers are experimental or unsupported. See [Supported Platforms](platforms.md). ## Installing Terrain3D ### From The Asset Library -Terrain3D is listed in the Asset Library [here](https://godotengine.org/asset-library/asset/3134), but you can download it directly within Godot. -1. Setup a project within Godot. -2. Click `AssetLib` at the top of the Godot window. -3. Search for `Terrain3D`, and click the entry from `TokisanGames`. -4. Click `Download`. -5. Godot will ask you to install files into `addons` and `demo`. Demo is optional, but highly recommended for troubleshooting. Click `Install`. -6. Restart when Godot prompts. -7. In `Project Settings / Plugins`, ensure that Terrain3D is enabled. -8. Select `Project / Reload Current Project` to restart once more. -9. Open `demo/Demo.tscn`. You should see a terrain. Run the scene by pressing `F6`. -10. When using Terrain3D in your own scene, select the Terrain3D node in the Scene panel. In the Inspector, click the folder icon to the right of `data directory`, then specify a directory to store your data. This directory can be used shared with other scenes. - -Next, learn how to [prepare your textures](texture_prep.md). - -If installation isn't working for you, watch the [tutorial videos](tutorial_videos.md) and see [Troubleshooting](troubleshooting.md) and [Getting Help](getting_help.md). - -### Manually Running The Demo +Terrain3D is [listed in the Asset Library](https://godotengine.org/asset-library/asset/3134), so you can download it directly within Godot. +1. Run Godot using the console executable so you can see error messages. +2. Setup a new project within Godot. +3. Click `AssetLib` at the top of the Godot window. +4. Search for `Terrain3D`, and click the entry from `TokisanGames` shown for your Godot version. +5. Click `Download`. +6. Godot will ask you to install files into `addons` and `demo`. Demo is optional, but highly recommended for troubleshooting. Click `Install`. +7. Restart when Godot prompts. +8. In `Project / Project Settings / Plugins`, ensure that Terrain3D is enabled. +9. Select `Project / Reload Current Project` to restart once more. +10. Open `demo/Demo.tscn`. You should see a terrain. Run the scene by pressing `F6`. + +If the demo isn't working for you, watch the [tutorial videos](tutorial_videos.md) and see [Troubleshooting](troubleshooting.md) and [Getting Help](getting_help.md). + +Continue below to [In Your Own Scene](#in-your-own-scene). + +### From Github 1. Download the [latest binary release](https://github.com/TokisanGames/Terrain3D/releases) and extract the files, or [build the plugin from source](building_from_source.md). 2. Run Godot using the console executable so you can see error messages. 3. In the Project Manager, import the demo project and open it. Restart when it prompts. -4. In `Project Settings / Plugins`, ensure that Terrain3D is enabled. +4. In `Project / Project Settings / Plugins`, ensure that Terrain3D is enabled. 5. Select `Project / Reload Current Project` to restart once more. 6. If the demo scene doesn't open automatically, open `demo/Demo.tscn`. You should see a terrain. Run the scene by pressing `F6`. -If the demo isn't working for you, watch the [tutorial videos](tutorial_videos.md) and see[Troubleshooting](troubleshooting.md) and [Getting Help](getting_help.md). +If the demo isn't working for you, watch the [tutorial videos](tutorial_videos.md) and see [Troubleshooting](troubleshooting.md) and [Getting Help](getting_help.md). -### Manually Into Your Project (v0.9.3-dev running a nightly build) -1. Download the [latest binary release](https://github.com/TokisanGames/Terrain3D/releases) and extract the files, or [build the plugin from source](building_from_source.md). -2. Copy `addons/terrain_3d` to your project folder as `addons/terrain_3d`. -3. Run Godot using the console executable so you can see error messages. Restart when it prompts. -4. In `Project Settings / Plugins`, ensure that Terrain3D is enabled. -5. Select `Project / Reload Current Project` to restart once more. -6. Create or open a 3D scene and add a new Terrain3D node. -7. Select Terrain3D in the Scene panel. In the Inspector, click the folder icon to the right of `data directory` and specify a directory to store your data. This directory can be used shared with other scenes. +Continue below. -Next, learn how to [prepare your textures](texture_prep.md). +### In Your Own Scene +* To use Terrain3D in your own project, copy `addons/terrain_3d` to your project folder as `addons/terrain_3d`. Create the directories if they are missing. +* When making a new 3D scene, add a Terrain3D node to your Scene panel. In the Inspector, find `Data Directory` and click the folder icon to specify an empty directory in which to store your data. You can share this directory with other scenes that will load the same terrain map. Different terrain maps need separate directories. +* Optionally, click the arrow to the right of `Material` and `Assets` and save these as `.tres` files should you wish to share your material settings and asset dock resources (textures and meshes) with other scenes. This is recommended. Saving these in the data directory is fine. + +Next, review the [user interface](user_interface.md) or learn how to [prepare your textures](texture_prep.md) if you're ready to start creating. -If installation isn't working for you, watch the [tutorial videos](tutorial_videos.md) and see [Troubleshooting](troubleshooting.md) and [Getting Help](getting_help.md). ## Upgrading Terrain3D To update Terrain3D: 1. Close Godot. 2. Remove `addons/terrain_3d` from your project folder. -3. Copy `addons/terrain_3d` from the new release download or from your build directory into your project addons folder. +3. Copy `addons/terrain_3d` from the new release download or build directory into your project addons folder. Don't just copy the new folder over the old, as this won't remove any files that we may have intentionally removed. -4. **Upgrading to 0.9.3:** Terrain3D now stores data in a directory. When opening your scene and selecting your Terrain3D node, a directory selection wizard will popup. Follow the directions to select your old storage file and a new storage directory, and it will upgrade your data. Save afterwards. - ### Upgrade Path -While later versions of Terrain3D can generally open previous versions, not all data will be loaded unless the supported upgrade path is followed. We occasionally deprecate or rename classes and provide upgrade paths to convert data for a limited time. +While later versions of Terrain3D can generally open previous versions, not all data will be transfered unless the supported upgrade path is followed. We occasionally deprecate or rename classes and provide upgrade paths to convert data for a limited time. -Given the table below, to upgrade 0.8 to the latest version you would need to open your files in 0.9.0, save, then open in 0.9.3, and save again. +If upgrading from a very old version, you may need to go through multiple steps to upgrade to the latest version. | Starting Version | Can Upgrade w/ Data Conversion | |------------------|-------------------| +| 1.0.0 | 0.9.3 | | 0.9.2 | 0.9.3* | | 0.9.1 | 0.9.2 - 0.9.3* | | 0.9.0 | 0.9.2 - 0.9.3* | diff --git a/doc/docs/instancer.md b/doc/docs/instancer.md index f17f323d0..b6f89ac70 100644 --- a/doc/docs/instancer.md +++ b/doc/docs/instancer.md @@ -146,7 +146,7 @@ You can find a sample script that will import data from SimpleGrassTextured in ` 1. Click import. The output window and console will report when finished. 1. Clear the script from your Terrain3D node, and save your scene. -The instance transforms are now stored in your Storage resource. +The instance transforms are now stored in your region files. This script also serves as an example to learn how to use the API for procedural placement. Though this script uses add_multimesh(), you could manually iterate through the SGT multimesh, pull out the transforms, modify them, then send them to the instancer with add_transforms(). diff --git a/doc/docs/introduction.md b/doc/docs/introduction.md index bb8df7771..003688053 100644 --- a/doc/docs/introduction.md +++ b/doc/docs/introduction.md @@ -22,11 +22,11 @@ The flat meshes and heightmap data are sent to the GPU, which adjusts the vertic The terrain is divided into regions, which represent both physical space, and containers for terrain data. -By default, regions are 256m x 256m, and are adjustable. This describes a physical grid in the world with borders at -256, 0, 256, 512, 768, 1024, etc. This also corresponds to the 256x256 pixels size of the images and textures used to store terrain data. +By default, regions are 256m x 256m, and are adjustable. This lays out a grid in the world with region borders at -256, 0, 256, 512, 768, 1024, etc. This region size also corresponds to the 256x256 pixel size of the images and textures used to store terrain data. -You pay in memory and vram only for the regions you allocate. Space between the regions can be set to empty, flat, or shader generated noise (See `Terrain3D / Material / WorldBackground`). No collisions are generated in this space. +You pay in memory and vram only for the regions you allocate. Space between the regions can be set to empty, flat, or shader generated noise (See `Terrain3D / Material / WorldBackground`). No collisions are generated outside of regions. -Region files are stored in the data directory as individual files, with their location coordinates in the filename. e.g. terrain3d_01_01.res. +Region files are stored in the data directory as individual files, with their location coordinates in the filename. e.g. terrain3d_01-02.res, which represents region (+01, -02). The region grid is visible if `View Gizmos` is enabled in the Godot `Perspective` menu. Or if `Terrain3D / Regions / Show Grid` is enabled. @@ -34,23 +34,25 @@ The region grid is visible if `View Gizmos` is enabled in the Godot `Perspective Region locations are the grid coordinates that regions fit into. Represented as a Vector2i, eg (-1, 0), this is the primary key used for identifying regions in the API. -Converting a global position to a region location is calculated by `floor(global position / region size)`, or by calling the function [Terrain3DData.get_region_location()](../api/class_terrain3ddata.rst#class-terrain3ddata-method-get-region-location). e.g. If region size is 1024, a global position of (2500, 0, 3700) would convert to (2, 3). It gets more complicated as region sizes change. +Converting a global position to a region location is calculated by `floor(global position / region size)`, or by calling the function [Terrain3DData.get_region_location()](../api/class_terrain3ddata.rst#class-terrain3ddata-method-get-region-location). e.g. If region size is 1024, a global position of (2500, 0, 3700) would convert to (2, 3). It gets more complicated as [region_size](../api/class_terrain3d.rst#class-terrain3d-property-region-size) changes. -Set `Terrain3D / Regions / Label Distance` to 1024-4096 to see region coordinates in the world. +Set `Terrain3D / Regions / Label Distance` to 1024-4096 to see region coordinates in the viewport. ## Vertex Painting This system is a vertex painter, not a pixel painter. In order to make a high performance terrain, we are spreading out say a 1024 x 1024 map over 1024m^2. Each square meter is influenced by only 4 pixels in the corners. -We use sophisticated algorithms that allow natural blending of *quality* textures between the vertices. However, it is not magic. Pixel perfect painting is not practical. Texture artists place 4k or 8k textures on a boulder to acheive adequate texel density. How much larger than a boulder is a 1024m^2 terrain, let alone 16km^2? Achieving the same texel density where pixel painting is practical would consume far more VRAM than you have. +We use sophisticated algorithms that allow natural blending of *quality* textures between the vertices. However, it is not magic. Pixel perfect painting is not practical. Texture artists place 4k or 8k textures on a human sized rock to acheive adequate texel density. How much larger than a rock is a 1024m^2 terrain, let alone 16km^2? Achieving the same texel density on a pixel painted terrain would consume far more VRAM than anyone has. -The system we have works well for producing natural environments and is modeled off of the Witcher 3 terrain system. It will most likely work for your game as well. You'll read more about selecting and preparing good textures in [Texture Prep](texture_prep.md) and [Texture Painting](texture_painting.md). +The system we have works well for producing natural environments and is modeled off of the Witcher 3 terrain system. It will most likely work for your game as well. You'll read more about selecting and preparing quality textures in [Texture Prep](texture_prep.md) and [Texture Painting](texture_painting.md). ## API Aplication Programming Interface. This is the [list of variables and functions](../api/index.rst) available to you via code. -Like Godot, this documentation is separated into two parts. The first are various free form tutorial pages describing each aspect of the terrain system, such as what you are reading now. +Like Godot, this documentation is separated in two parts in the sidebar. The first lists various free form tutorial pages describing each aspect of the terrain system, such as what you are reading now. -The second is the API. You can find it at the very bottom left of the document titles. You should be familiar with both documentation types so you can make full use of Terrain3D. +The second is the API. You can find it at the very bottom left of the document titles. You should be familiar with both documentation types in order to make full use of Terrain3D. + +Finally, this documentation is versioned. Select the version that matches your version of the plugin in the menu. \ No newline at end of file diff --git a/doc/docs/nightly_builds.md b/doc/docs/nightly_builds.md index fe1608835..bdd58035f 100644 --- a/doc/docs/nightly_builds.md +++ b/doc/docs/nightly_builds.md @@ -1,11 +1,11 @@ Nightly Builds ==================== -Traditionally, across countless dev projects, nightly builds are automatically built from the main development tree every night. +Traditionally, "nightly builds" are automatically built from the main development tree every night. Our Github repository is configured to build automatically on every commit and PR push. If you want to test more recent versions of Terrain3D than the releases, you can download these "push builds" or "nightly builds". -They are exactly the same construction as the releases except for the commit used. However, they are inherently less tested as new commits have more recently been merged in, and may have more problems than the release builds. +They are exactly the same construction as the releases except for the commit used. However, they are inherently less tested as new commits have more recently been merged in, and may have more bugs. 1. [Click here](https://github.com/TokisanGames/Terrain3D/actions/workflows/build.yml?query=branch%3Amain) for `Github Actions`, `Build All` workflow, `main` branch. @@ -15,7 +15,7 @@ They are exactly the same construction as the releases except for the commit use :target: ../_images/build_workflow.png ``` -3. Download the artifact, which is just a zip file with a "nightly" build. You must be logged in to github to download it. +3. Download the artifact, which is just a zip file with a nightly build. You must be logged in to github to download it. ```{image} images/build_artifact.png :target: ../_images/build_artifact.png @@ -27,5 +27,3 @@ If have trouble with the unsigned macOS released builds or wish to contribute, l ## PR Builds You can also test builds of PRs. Instead of specifying the `main` branch above, select the branch listed at the top of the PR. Or click the `Checks` tab, then `Build All` to see the summary page, which has the artifact. - -If looking at a PR from another contributor, you'll need to look at their repository. Click the `from` branch at the top of the PR to go to their repo. Then click `Actions` to get the latest build from the appropriate branch. \ No newline at end of file diff --git a/doc/docs/platforms.md b/doc/docs/platforms.md index 3754c0816..d6f1a43b3 100644 --- a/doc/docs/platforms.md +++ b/doc/docs/platforms.md @@ -137,13 +137,11 @@ Support for Apple's Metal for iOS and macOS was recently merged into Godot 4.4-d ## Mobile -The Forward Vulkan Mobile renderer is fully supported in Terrain3D 0.9.3. There is a precision artifact in 0.9.2. +The Forward Vulkan Mobile renderer is fully supported in Terrain3D. ## Compatibility -The OpenGLES 3.0 Compatibility renderer is mostly supported from Terrain3D 0.9.3 though there are some caveats with Godot 4.2 and 4.3. - -**Both versions** +The OpenGLES 3.0 Compatibility renderer is mostly supported from Terrain3D 0.9.3 though there are some caveats with Godot 4.3: * If using a custom override shader, we add a special COMPATIBILITY_DEFINES block to your shader that will allow certain features to work properly (eg the fma() function). We remove this block from your shader if you switch back to Mobile or Forward. It is normal to receive a shader dump in your console during this transition, but it should not repeat every start, once saved. @@ -153,18 +151,7 @@ The OpenGLES 3.0 Compatibility renderer is mostly supported from Terrain3D 0.9.3 `Godot_v4.3-stable_win64_console.exe --rendering-driver opengl3 -e project.godot --terrain3d-renderer=compatibility` -**Godot 4.3** - * `VRAM Compressed` is only partially supported. You can use 2 textures in the asset list. If a third is added, Godot will crash. It seems to be fixed in 4.4. The workaround for now is to select `VRAM Uncompressed` or `Lossless` on the Import tab and reimport for all of your textures. - - -**Godot 4.2** - -* There are some startup warnings about depth textures and glow that you can ignore. - -* `VRAM Compressed` is not supported. In the `Import` panel, you must set your texture files to either `VRAM Uncompressed` or `Lossless` and reimport. - -* The command line option `--rendering-method gl_compatibility` breaks the terrain in 4.2. Don't use it. The full command above works for 4.2 or 4.3. Further reading: diff --git a/doc/docs/programming_languages.md b/doc/docs/programming_languages.md index c22183fa1..203188f4d 100644 --- a/doc/docs/programming_languages.md +++ b/doc/docs/programming_languages.md @@ -5,8 +5,8 @@ Any language Godot supports should be able to work with Terrain3D via the GDExte Here are some tips for integrating with Terrain3D. -```{image} images/integrating_gdextension.png -:target: ../_images/integrating_gdextension.png +```{image} images/integrating_gdextension.jpg +:target: ../_images/integrating_gdextension.jpg ``` ## Detecting If Terrain3D Is Installed @@ -15,12 +15,7 @@ To determine if Terrain3D is installed and active, [ask Godot](https://docs.godo **GDScript** ```gdscript -#4.2+ print("Terrain3D installed: ", EditorInterface.is_plugin_enabled("terrain_3d")) - -#pre-4.2 - var ei: EditorInterface = EditorScript.new().get_editor_interface() - print("Terrain3D installed: ", ei.is_plugin_enabled("terrain_3d")) ``` **C#** @@ -49,7 +44,6 @@ Terrain3D is instantiated and referenced like any other object. ```gdscript var terrain: Terrain3D = Terrain3D.new() - terrain.storage = Terrain3DStorage.new() terrain.assets = Terrain3DAssets.new() print(terrain.get_version()) ``` @@ -62,7 +56,6 @@ You can instantiate through ClassDB, set variables and call it. ```c# var terrain = ClassDB.Instantiate("Terrain3D"); - terrain.AsGodotObject().Set("storage", ClassDB.Instantiate("Terrain3DStorage")); terrain.AsGodotObject().Set("assets", ClassDB.Instantiate("Terrain3DAssets")); terrain.AsGodotObject().Call("set_collision_enabled", true); ``` @@ -80,12 +73,12 @@ You can also check if a node is a Terrain3D object: ```c# private bool CheckTerrain3D(Node myNode) { if (myNode.IsClass("Terrain3D")) { - var debugCollisions = myNode.Call("get_show_debug_collision").AsInt32(); + var collisionEnabled = myNode.Call("get_collision_enabled").AsInt32(); ``` For more information on C# and other languages, read [Cross-language scripting](https://docs.godotengine.org/en/stable/tutorials/scripting/cross_language_scripting.html) in the Godot docs. -## Capturing the Terrain3D Instance +## Finding the Terrain3D Instance These options are for programming scenarios where a user action is intented to provide your code with the Terrain3D instance. diff --git a/doc/docs/shader_design.md b/doc/docs/shader_design.md index 535355b7c..4732e6c43 100644 --- a/doc/docs/shader_design.md +++ b/doc/docs/shader_design.md @@ -11,10 +11,10 @@ The following describes the various elements of the shader in a linear fashion t ## Uniforms -[Terrain3DMaterial](../api/class_terrain3dmaterial.rst) exposes uniforms found in the shader, whether we put them there or you do with your own custom shader. Uniforms that begin with `_` are considered private and are not exposed. However you can access them via code. You can create your own private uniforms. +[Terrain3DMaterial](../api/class_terrain3dmaterial.rst) exposes uniforms found in the shader, whether we put them there or you do with your own custom shader. Uniforms that begin with `_` are considered private and are not exposed. However you can access them via code. See [Tips](tips.md). You can create your own private uniforms. -These notable [Terrain3DStorage](../api/class_terrain3dstorage.rst) variables are passed in as uniforms: -* `_region_map`, `_region_offsets` define the location and IDs of regions (sculpted areas) +These notable [Terrain3DData](../api/class_terrain3ddata.rst) variables are passed in as uniforms. There are getter functions for each. +* `_region_map`, `_region_locations` define the location and IDs of regions (sculpted areas) * `_height_maps`, `_control_maps`, and `_color_maps` texture arrays define the elevation, textures, and colors of the terrain, indexed by region ID * `_texture_array_albedo`, `_texture_array_normal` are the texture arrays that combine all of the individual textures, indexed by texture ID diff --git a/doc/docs/tips.md b/doc/docs/tips.md index 4e2fe72c6..6ce7bb88c 100644 --- a/doc/docs/tips.md +++ b/doc/docs/tips.md @@ -39,7 +39,7 @@ Here we get the resource ID of a material on a mesh. We assign the RID of the ge ```gdscript var mat: RID = $MeshInstance3D.mesh.surface_get_material(0).get_rid() -RenderingServer.material_set_param(mat, "texture_albedo", get_storage().get_height_maps_rid()) +RenderingServer.material_set_param(mat, "texture_albedo", get_data().get_height_maps_rid()) ``` This is a quick demonstration that shows results. However the generated texture arrays should be accessed with sampler2DArray in a shader, not the regular sampler which is what will will happen here. diff --git a/doc/docs/troubleshooting.md b/doc/docs/troubleshooting.md index 536b0dd40..224e1cc10 100644 --- a/doc/docs/troubleshooting.md +++ b/doc/docs/troubleshooting.md @@ -26,24 +26,22 @@ Most certainly you've installed the plugin improperly. These are the common caus 2) You moved the files into the wrong directory. The Terrain3D files should be in `project/addons/terrain_3d`. `Editor.gd` should be found at `res://addons/terrain_3d/editor/editor.gd`. [See an example issue here](https://github.com/TokisanGames/Terrain3D/issues/200). -Basically, the required library isn't where it's supposed to be. The error messages will tell you exactly the file name and path it's looking for. View that location on your hard drive. On windows you might be looking for `libterrain.windows.debug.x86_64.dll`. Does that file exist where it's looking in the logs? Probably not. Download the correct package, and review the instructions to install the files in the right location. +Basically, the binary library file isn't where it's supposed to be. The error messages in your [console](#using-the-console) (not the output panel) will tell you exactly the file name and path it's looking for. View that location on your hard drive. On windows you might be looking for `libterrain.windows.debug.x86_64.dll`. Does that file exist where it's looking in the logs? Probably not. Download the correct package, and review the instructions to install the files in the right location. -### After installation, there are no tools. The texture list is blank in the demo. -Click the Terrain3D node in the scene tree. Also see the next entry. +### There are no tools. The texture list is blank. -### After clicking the Terrain3D node, there are no editor tools or texture panel. +Ensure the plugin is [installed properly](installation.md) and enabled in the project settings. + +Then, click the Terrain3D node in the Scene panel to activate the tools and asset dock. -Enable the plugin in project settings. Review the [installation instructions](installation.md). ### The editor tools panel is there, but the buttons are blank or missing. Restart Godot twice before using it. Review the [installation instructions](installation.md). -### Start up is very slow, and/or the scene or storage file is huge. - -Save the storage resource as a binary `.res` file, as described in the [installation instructions](installation.md). You've likely saved it as text `.tres`, or didn't save it separately at all, which means a ton of terrain data is saved as text in the scene. +### Start up is very slow. -Alternatively, you have a large terrain and are generating collision for all of it. Disable collision, or set it to dynamic to create only a small collision around the camera (pending implementation, see [PR #278](https://github.com/TokisanGames/Terrain3D/pull/278)). +You probably have a large terrain and are generating collision for all of it. Disable collision to test. In the future you'll be able to dynamically create only a small collision area around the camera (see [PR #278](https://github.com/TokisanGames/Terrain3D/pull/278)). --- @@ -96,10 +94,16 @@ Make sure you have both the debug and release binaries on your system, or have b If you're using multiple cameras, or viewports, you need to tell Terrain3D which camera you want to use with `Terrain3D.set_camera()`. You can update it every frame if you like. -### Camera flickering +### Textures flicker + +Disable all temporal effects: FSR, TAA, Physics Interpolation. The Terrain3D mesh is constantly moving which causes Godot to unnecessarily generate motion vectors for the terrain. Until there is a way to disable this behavior, temporal effects are unreliable. + + +### Meshes flicker When another mesh intersects with Terrain3D far away from the camera, such as in the case of water on a beach, the two meshes can flicker as the renderer can't decide which mesh should be displayed in front. This is also called Z-fighting. You can greatly reduce it by increasing `Camera3D.near` to 0.25. You can also set it for the editor camera in the main viewport by adjusting `View/Settings/View Z-Near`. + ### 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. diff --git a/doc/docs/tutorial_videos.md b/doc/docs/tutorial_videos.md index 67123e2f1..97639cbf2 100644 --- a/doc/docs/tutorial_videos.md +++ b/doc/docs/tutorial_videos.md @@ -1,7 +1,7 @@ Tutorial Videos ================== -*Note: Some instructions in the videos may be out of date. Be sure to review this documentation for the latest. And even this documentation has a **stable** and **latest** version, available in the menu.* +*Note: Some instructions in the videos may be out of date. Be sure to review this documentation for the latest. Be aware you can select the appropriate documentation version in the menu.* **Using Terrain3D Part 1: Installation, Setup, Basic Usage** diff --git a/doc/docs/user_interface.md b/doc/docs/user_interface.md index bc316554d..700d12afc 100644 --- a/doc/docs/user_interface.md +++ b/doc/docs/user_interface.md @@ -27,23 +27,14 @@ First, select the Region Tool (first one: square with a cross), and click the gr The following mouse and keyboard shortcuts are available. -**Maya Users:** The Alt key can be changed to Space, Meta (Windows), or Capslock in `Editor Settings / Terrain3D / Config / Alt Key Bind` so it does not conflict with Maya input settings `Editor Settings / 3D / Navigation / Navigation Scheme`. - -**Touchscreen Users:** will see an `Invert` checkbox on the settings bar which acts like Ctrl to inverse operations. - - ### General Keys * LMB - Click the terrain to positively apply the current tool. * Ctrl + LMB - **Inverse** the tool. Removes regions, height, color, wetness, autoshader, holes, navigation, foliage. -* Shift + LMB - Change to the **Smooth** sculpting tool. +* Shift + LMB - Temporarily change to the **Smooth** sculpting tool. * Ctrl + Z - **Undo**. You can view the entries in the Godot `History` panel. * Ctrl + Shift + Z - **Redo**. * Ctrl + S - **Save** the scene and all data. -### Sculpting Specific -* Alt + LMB - **Lift floors**. This lifts up lower portions of the terrain without affecting higher terrain. Use it along the bottom of cliff faces. See [videos demonstrating before and after](https://github.com/TokisanGames/Terrain3D/pull/409). -* Ctrl + Alt + LMB - **Flatten peaks**. The inverse of the above. This reduces peaks and ridges without affecting lower terrain around it. - ### Slope Filter The slope filter on the bottom settings bar limits operations based on terrain slope. Don't confuse this with the slope sculpting tool on the left toolbar. @@ -52,14 +43,24 @@ These operations support filtering by slope: **Paint**, **Spray**, **Color**, ** * LMB - Add within the defined slope. * Ctrl + LMB - Remove within the defined slope. -* Alt + LMB - Add outside the defined slope. -* Ctrl + Alt + LMB - Remove operate outside the defined slope. +* Alt + LMB - Add with the slope inversed. +* Ctrl + Alt + LMB - Remove with the slope inversed. + +### Sculpting Specific +* Alt + LMB - **Lift floors**. This lifts up lower portions of the terrain without affecting higher terrain. Use it along the bottom of cliff faces. See [videos demonstrating before and after](https://github.com/TokisanGames/Terrain3D/pull/409). +* Ctrl + Alt + LMB - **Flatten peaks**. The inverse of the above. This reduces peaks and ridges without affecting lower terrain around it. ### Instancer Specific * LMB - Add the selected mesh instance to the terrain. * Ctrl + LMB - Remove instances of the selected type. * Ctrl + Shift + LMB - Remove instances of **any** type. +### Special Cases + +**Maya Users:** The Alt key can be changed to Space, Meta (Windows key), or Capslock in `Editor Settings / Terrain3D / Config / Alt Key Bind` so it does not conflict with Maya input settings `Editor Settings / 3D / Navigation / Navigation Scheme`. + +**Touchscreen Users:** will see an `Invert` checkbox on the settings bar which acts like Ctrl to inverse operations. + --- @@ -73,14 +74,17 @@ Depending on which tool is selected on the toolbar, various tool settings will a Many tool settings offer a slider with a fixed range, and an input box where you can manually enter a much larger setting. -The settings are saved across sessions. But you can click the label of each to reset the value to its default. +Click the label of any setting to reset the value to its default, or checkboxes to toggle. -Most are self explanatory. See [Foliage Instancing](instancer.md) for specific details on its settings. +The settings are saved across sessions in `Editor Settings / Terrain3D / Tool Settings`. -On the right is the advanced menu. One noteworthy setting is `Jitter`, which is what causes the brush to spin while painting. Reduce it to zero if you don't want this. +Some tools like `Paint`, `Spray`, and `Color` have options to disable some features. e.g. Disabling `Texture` on `Paint` means it will only apply scale or angle. Enabling `Texture` on `Color` will filter color painting to the selected texture. + +On the right, the three dots button is the advanced menu. One noteworthy setting is `Jitter`, which is what causes the brush to spin while painting. Reduce it to zero if you don't want this. Brushes can be edited in the `addons/terrain_3d/brushes` directory, using your OS folder explorer. The folder is hidden to Godot. The files are 100x100 alpha masks saved as EXR. Larger sizes should work fine, but will be slow if too big. +Most other options are self explanatory. See [Foliage Instancing](instancer.md) for specific details on its settings. --- @@ -91,13 +95,15 @@ The asset dock houses the list of textures and meshes available for use in Terra Click `Textures` or `Meshes` to switch between the asset types. +Mesh thumbnail generation is currently unreliable. Hover over a mesh or click `Meshes` to regenerate them. + ```{image} images/ui_asset_dock_bottom.png :target: ../_images/ui_asset_dock_bottom.png ``` ### Dock Position -The dropdown box allows you to select the dock position. Shown above, it is docked to the bottom panel. Below, it is docked to the right sidebar, in the [bottom right position](https://docs.godotengine.org/en/stable/classes/class_editorplugin.html#class-editorplugin-constant-dock-slot-left-ul). +The dropdown option allows you to select the dock position. Shown above, it is docked to the bottom panel. Below, it is docked to the right sidebar, in the [bottom right position](https://docs.godotengine.org/en/stable/classes/class_editorplugin.html#class-editorplugin-constant-dock-slot-left-ul). ```{image} images/ui_asset_dock_sidebar.png :target: ../_images/ui_asset_dock_sidebar.png @@ -107,7 +113,7 @@ The icon with white and grey boxes in the top right can be used to pop out the d Next the slider will resize the thumbnails. -Finally, when the dock is in the sidebar, there are three vertical, grey dots, shown in the image above in the top right. This also allows you to change the sidebar position, however setting it here won't save. Ignore this and use our dropdown instead. +Finally, when the dock is in the sidebar, there are three vertical, grey dots, shown in the image above, in the top right. This also allows you to change the sidebar position, however setting it here won't save. Ignore this and use our dropdown instead. ### Setting Up Assets diff --git a/doc/index.rst b/doc/index.rst index 81d44388d..2e59288e7 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -13,12 +13,8 @@ Terrain3D Documentation `Terrain3D `_ is a high performance, editable terrain system for Godot 4. -See :doc:`Project Status ` for development progress. +Start with :doc:`Introduction ` and the other pages in the Getting Started section in the left sidebar to learn how to use this system. -Usage --------- - -Read the documentation in the Getting Started section in the left sidebar. Credit ------------- diff --git a/project/addons/terrain_3d/plugin.cfg b/project/addons/terrain_3d/plugin.cfg index 9ff4f3571..272efc938 100644 --- a/project/addons/terrain_3d/plugin.cfg +++ b/project/addons/terrain_3d/plugin.cfg @@ -3,5 +3,5 @@ name="Terrain3D" description="A high performance, editable terrain system for Godot 4." author="Cory Petkovsek & Roope Palmroos" -version="0.9.3-dev" +version="1.0.0-dev" script="editor.gd" diff --git a/src/terrain_3d.h b/src/terrain_3d.h index 5a958ebbe..ce7f9f905 100644 --- a/src/terrain_3d.h +++ b/src/terrain_3d.h @@ -44,7 +44,7 @@ class Terrain3D : public Node3D { }; private: - String _version = "0.9.3-dev"; + String _version = "1.0.0-dev"; String _data_directory; bool _is_inside_world = false; bool _initialized = false;