Add Displacement docs
This commit is contained in:
parent
c227db03fa
commit
bdc945c7ed
|
|
@ -207,6 +207,7 @@
|
|||
<None Include="doc\docs\data_format.md" />
|
||||
<None Include="doc\docs\heightmaps.md" />
|
||||
<None Include="doc\docs\programming_languages.rst" />
|
||||
<None Include="doc\docs\displacement.md" />
|
||||
<None Include="doc\docs\texture_painting.md" />
|
||||
<None Include="doc\docs\user_interface.md" />
|
||||
<None Include="doc\index.rst" />
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@
|
|||
</None>
|
||||
<None Include="doc\docs\programming_languages.rst">
|
||||
<Filter>2. Docs</Filter>
|
||||
</None>
|
||||
</None>
|
||||
<None Include="src\shaders\displacement.glsl">
|
||||
<Filter>4. Shaders</Filter>
|
||||
</None>
|
||||
|
|
@ -280,6 +280,9 @@
|
|||
<None Include="src\shaders\pbr_views.glsl">
|
||||
<Filter>4. Shaders</Filter>
|
||||
</None>
|
||||
<None Include="doc\docs\displacement.md">
|
||||
<Filter>2. Docs</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include=".readthedocs.yaml">
|
||||
|
|
|
|||
|
|
@ -29,113 +29,125 @@ Properties
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`Terrain3DAssets<class_Terrain3DAssets>` | :ref:`assets<class_Terrain3D_property_assets>` | |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| RenderingServer.ShadowCastingSetting | :ref:`cast_shadows<class_Terrain3D_property_cast_shadows>` | ``1`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``Node3D`` | :ref:`clipmap_target<class_Terrain3D_property_clipmap_target>` | |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`Terrain3DCollision<class_Terrain3DCollision>` | :ref:`collision<class_Terrain3D_property_collision>` | |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`collision_layer<class_Terrain3D_property_collision_layer>` | ``1`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`collision_mask<class_Terrain3D_property_collision_mask>` | ``1`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>` | :ref:`collision_mode<class_Terrain3D_property_collision_mode>` | ``1`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``float`` | :ref:`collision_priority<class_Terrain3D_property_collision_priority>` | ``1.0`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`collision_radius<class_Terrain3D_property_collision_radius>` | ``64`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`collision_shape_size<class_Terrain3D_property_collision_shape_size>` | ``16`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``Node3D`` | :ref:`collision_target<class_Terrain3D_property_collision_target>` | |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``float`` | :ref:`cull_margin<class_Terrain3D_property_cull_margin>` | ``0.0`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`Terrain3DData<class_Terrain3DData>` | :ref:`data<class_Terrain3D_property_data>` | |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``String`` | :ref:`data_directory<class_Terrain3D_property_data_directory>` | ``""`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`DebugLevel<enum_Terrain3D_DebugLevel>` | :ref:`debug_level<class_Terrain3D_property_debug_level>` | ``0`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`free_editor_textures<class_Terrain3D_property_free_editor_textures>` | ``true`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| GeometryInstance3D.GIMode | :ref:`gi_mode<class_Terrain3D_property_gi_mode>` | ``1`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`Terrain3DInstancer<class_Terrain3DInstancer>` | :ref:`instancer<class_Terrain3D_property_instancer>` | |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`InstancerMode<enum_Terrain3DInstancer_InstancerMode>` | :ref:`instancer_mode<class_Terrain3D_property_instancer_mode>` | ``1`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``float`` | :ref:`label_distance<class_Terrain3D_property_label_distance>` | ``0.0`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`label_size<class_Terrain3D_property_label_size>` | ``48`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`Terrain3DMaterial<class_Terrain3DMaterial>` | :ref:`material<class_Terrain3D_property_material>` | |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`mesh_lods<class_Terrain3D_property_mesh_lods>` | ``7`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`mesh_size<class_Terrain3D_property_mesh_size>` | ``48`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`mouse_layer<class_Terrain3D_property_mouse_layer>` | ``32`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``PhysicsMaterial`` | :ref:`physics_material<class_Terrain3D_property_physics_material>` | |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`RegionSize<enum_Terrain3D_RegionSize>` | :ref:`region_size<class_Terrain3D_property_region_size>` | ``256`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`render_layers<class_Terrain3D_property_render_layers>` | ``2147483649`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`save_16_bit<class_Terrain3D_property_save_16_bit>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_autoshader<class_Terrain3D_property_show_autoshader>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_checkered<class_Terrain3D_property_show_checkered>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_colormap<class_Terrain3D_property_show_colormap>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_contours<class_Terrain3D_property_show_contours>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_control_angle<class_Terrain3D_property_show_control_angle>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_control_blend<class_Terrain3D_property_show_control_blend>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_control_scale<class_Terrain3D_property_show_control_scale>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_control_texture<class_Terrain3D_property_show_control_texture>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_grey<class_Terrain3D_property_show_grey>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_grid<class_Terrain3D_property_show_grid>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_heightmap<class_Terrain3D_property_show_heightmap>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_instancer_grid<class_Terrain3D_property_show_instancer_grid>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_jaggedness<class_Terrain3D_property_show_jaggedness>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_navigation<class_Terrain3D_property_show_navigation>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_region_grid<class_Terrain3D_property_show_region_grid>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_roughmap<class_Terrain3D_property_show_roughmap>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_albedo<class_Terrain3D_property_show_texture_albedo>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_ao<class_Terrain3D_property_show_texture_ao>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_height<class_Terrain3D_property_show_texture_height>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_normal<class_Terrain3D_property_show_texture_normal>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_rough<class_Terrain3D_property_show_texture_rough>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_vertex_grid<class_Terrain3D_property_show_vertex_grid>` | ``false`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``String`` | :ref:`version<class_Terrain3D_property_version>` | ``"1.1.0-dev"`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
| ``float`` | :ref:`vertex_spacing<class_Terrain3D_property_vertex_spacing>` | ``1.0`` |
|
||||
+-------------------------------------------------------------+----------------------------------------------------------------------------+-----------------+
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`Terrain3DAssets<class_Terrain3DAssets>` | :ref:`assets<class_Terrain3D_property_assets>` | |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``Shader`` | :ref:`buffer_shader_override<class_Terrain3D_property_buffer_shader_override>` | |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`buffer_shader_override_enabled<class_Terrain3D_property_buffer_shader_override_enabled>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| RenderingServer.ShadowCastingSetting | :ref:`cast_shadows<class_Terrain3D_property_cast_shadows>` | ``1`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``Node3D`` | :ref:`clipmap_target<class_Terrain3D_property_clipmap_target>` | |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`Terrain3DCollision<class_Terrain3DCollision>` | :ref:`collision<class_Terrain3D_property_collision>` | |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`collision_layer<class_Terrain3D_property_collision_layer>` | ``1`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`collision_mask<class_Terrain3D_property_collision_mask>` | ``1`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`CollisionMode<enum_Terrain3DCollision_CollisionMode>` | :ref:`collision_mode<class_Terrain3D_property_collision_mode>` | ``1`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``float`` | :ref:`collision_priority<class_Terrain3D_property_collision_priority>` | ``1.0`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`collision_radius<class_Terrain3D_property_collision_radius>` | ``64`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`collision_shape_size<class_Terrain3D_property_collision_shape_size>` | ``16`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``Node3D`` | :ref:`collision_target<class_Terrain3D_property_collision_target>` | |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``float`` | :ref:`cull_margin<class_Terrain3D_property_cull_margin>` | ``0.0`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`Terrain3DData<class_Terrain3DData>` | :ref:`data<class_Terrain3D_property_data>` | |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``String`` | :ref:`data_directory<class_Terrain3D_property_data_directory>` | ``""`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`DebugLevel<enum_Terrain3D_DebugLevel>` | :ref:`debug_level<class_Terrain3D_property_debug_level>` | ``0`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``float`` | :ref:`displacement_scale<class_Terrain3D_property_displacement_scale>` | ``1.0`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``float`` | :ref:`displacement_sharpness<class_Terrain3D_property_displacement_sharpness>` | ``0.25`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`free_editor_textures<class_Terrain3D_property_free_editor_textures>` | ``true`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| GeometryInstance3D.GIMode | :ref:`gi_mode<class_Terrain3D_property_gi_mode>` | ``1`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`Terrain3DInstancer<class_Terrain3DInstancer>` | :ref:`instancer<class_Terrain3D_property_instancer>` | |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`InstancerMode<enum_Terrain3DInstancer_InstancerMode>` | :ref:`instancer_mode<class_Terrain3D_property_instancer_mode>` | ``1`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``float`` | :ref:`label_distance<class_Terrain3D_property_label_distance>` | ``0.0`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`label_size<class_Terrain3D_property_label_size>` | ``48`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`Terrain3DMaterial<class_Terrain3DMaterial>` | :ref:`material<class_Terrain3D_property_material>` | |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`mesh_lods<class_Terrain3D_property_mesh_lods>` | ``7`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`mesh_size<class_Terrain3D_property_mesh_size>` | ``48`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`mouse_layer<class_Terrain3D_property_mouse_layer>` | ``32`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``PhysicsMaterial`` | :ref:`physics_material<class_Terrain3D_property_physics_material>` | |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| :ref:`RegionSize<enum_Terrain3D_RegionSize>` | :ref:`region_size<class_Terrain3D_property_region_size>` | ``256`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`render_layers<class_Terrain3D_property_render_layers>` | ``2147483649`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`save_16_bit<class_Terrain3D_property_save_16_bit>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_autoshader<class_Terrain3D_property_show_autoshader>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_checkered<class_Terrain3D_property_show_checkered>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_colormap<class_Terrain3D_property_show_colormap>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_contours<class_Terrain3D_property_show_contours>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_control_angle<class_Terrain3D_property_show_control_angle>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_control_blend<class_Terrain3D_property_show_control_blend>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_control_scale<class_Terrain3D_property_show_control_scale>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_control_texture<class_Terrain3D_property_show_control_texture>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_displacement_buffer<class_Terrain3D_property_show_displacement_buffer>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_grey<class_Terrain3D_property_show_grey>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_grid<class_Terrain3D_property_show_grid>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_heightmap<class_Terrain3D_property_show_heightmap>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_instancer_grid<class_Terrain3D_property_show_instancer_grid>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_jaggedness<class_Terrain3D_property_show_jaggedness>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_navigation<class_Terrain3D_property_show_navigation>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_region_grid<class_Terrain3D_property_show_region_grid>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_roughmap<class_Terrain3D_property_show_roughmap>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_albedo<class_Terrain3D_property_show_texture_albedo>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_ao<class_Terrain3D_property_show_texture_ao>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_height<class_Terrain3D_property_show_texture_height>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_normal<class_Terrain3D_property_show_texture_normal>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_texture_rough<class_Terrain3D_property_show_texture_rough>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``bool`` | :ref:`show_vertex_grid<class_Terrain3D_property_show_vertex_grid>` | ``false`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | :ref:`tessellation_level<class_Terrain3D_property_tessellation_level>` | ``0`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``String`` | :ref:`version<class_Terrain3D_property_version>` | ``"1.1.0-dev"`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``float`` | :ref:`vertex_spacing<class_Terrain3D_property_vertex_spacing>` | ``1.0`` |
|
||||
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
|
|
@ -333,6 +345,44 @@ The list of texture and mesh assets used by Terrain3D. You can optionally save t
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_buffer_shader_override:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``Shader`` **buffer_shader_override** :ref:`🔗<class_Terrain3D_property_buffer_shader_override>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_buffer_shader_override**\ (\ value\: ``Shader``\ )
|
||||
- ``Shader`` **get_buffer_shader_override**\ (\ )
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_buffer_shader_override_enabled:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``bool`` **buffer_shader_override_enabled** = ``false`` :ref:`🔗<class_Terrain3D_property_buffer_shader_override_enabled>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_buffer_shader_override_enabled**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **is_buffer_shader_override_enabled**\ (\ )
|
||||
|
||||
.. container:: contribute
|
||||
|
||||
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_cast_shadows:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
|
@ -585,6 +635,44 @@ The verbosity of debug messages printed to the console. Errors and warnings are
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_displacement_scale:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``float`` **displacement_scale** = ``1.0`` :ref:`🔗<class_Terrain3D_property_displacement_scale>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_displacement_scale**\ (\ value\: ``float``\ )
|
||||
- ``float`` **get_displacement_scale**\ (\ )
|
||||
|
||||
A global multiplier for all displaced textures. This is the maximum distance that 2 adjacent verticies can be vertically seperated by. Setting this 1.0 would mean a maximum of + 0.5m, and -0.5m deviation from the collision mesh.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.displacement_scale<class_Terrain3DMaterial_property_displacement_scale>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_displacement_sharpness:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``float`` **displacement_sharpness** = ``0.25`` :ref:`🔗<class_Terrain3D_property_displacement_sharpness>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_displacement_sharpness**\ (\ value\: ``float``\ )
|
||||
- ``float`` **get_displacement_sharpness**\ (\ )
|
||||
|
||||
Adjusts the transition between textures. When set at `1.0`, the blending of displacment between textures will match the aldebo/normal blend sharpness exactly. Lower values will have a softer transition, avoiding harsh shapes, without compromising the abldeo and normal blend sharpness. If set at or very near to `0.0`, it is possible that more displaced textures can affect less displaced textures at low blend values even if not visible.
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.displacement_sharpness<class_Terrain3DMaterial_property_displacement_sharpness>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_free_editor_textures:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
|
@ -992,6 +1080,23 @@ Alias for :ref:`Terrain3DMaterial.show_control_texture<class_Terrain3DMaterial_p
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_show_displacement_buffer:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``bool`` **show_displacement_buffer** = ``false`` :ref:`🔗<class_Terrain3D_property_show_displacement_buffer>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_show_displacement_buffer**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_displacement_buffer**\ (\ )
|
||||
|
||||
Alias for :ref:`Terrain3DMaterial.show_displacement_buffer<class_Terrain3DMaterial_property_show_displacement_buffer>`.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_show_grey:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
|
@ -1256,6 +1361,23 @@ Alias for :ref:`Terrain3DMaterial.show_vertex_grid<class_Terrain3DMaterial_prope
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_tessellation_level:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``int`` **tessellation_level** = ``0`` :ref:`🔗<class_Terrain3D_property_tessellation_level>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_tessellation_level**\ (\ value\: ``int``\ )
|
||||
- ``int`` **get_tessellation_level**\ (\ )
|
||||
|
||||
Enables displacement using texture heights for additional mesh detail when set above 0. This creates up to 6 additional subdivisions of the terrain mesh below LOD0, and adds a displacement buffer configurable in the material. You can see this in wireframe mode. Set to 0 to disable displacement. See :ref:`Terrain3DMaterial.show_displacement_buffer<class_Terrain3DMaterial_property_show_displacement_buffer>` and look at the Displacement Buffer debug view.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3D_property_version:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ Methods
|
|||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedVector2Array`` | :ref:`get_texture_detiles<class_Terrain3DAssets_method_get_texture_detiles>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedVector2Array`` | :ref:`get_texture_displacements<class_Terrain3DAssets_method_get_texture_displacements>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedFloat32Array`` | :ref:`get_texture_normal_depths<class_Terrain3DAssets_method_get_texture_normal_depths>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``PackedFloat32Array`` | :ref:`get_texture_roughness_mods<class_Terrain3DAssets_method_get_texture_roughness_mods>`\ (\ ) |const| |
|
||||
|
|
@ -366,6 +368,18 @@ Returns the array of detiling values for each texture asset, indexed by asset id
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DAssets_method_get_texture_displacements:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
``PackedVector2Array`` **get_texture_displacements**\ (\ ) |const| :ref:`🔗<class_Terrain3DAssets_method_get_texture_displacements>`
|
||||
|
||||
Returns the array of displacement offset and scale values for each texture asset, indexed by asset id.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DAssets_method_get_texture_normal_depths:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
|
|
|||
|
|
@ -33,63 +33,73 @@ Properties
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``Dictionary`` | :ref:`_shader_parameters<class_Terrain3DMaterial_property__shader_parameters>` | ``{}`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`auto_shader_enabled<class_Terrain3DMaterial_property_auto_shader_enabled>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`dual_scaling_enabled<class_Terrain3DMaterial_property_dual_scaling_enabled>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``Shader`` | :ref:`shader_override<class_Terrain3DMaterial_property_shader_override>` | |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`shader_override_enabled<class_Terrain3DMaterial_property_shader_override_enabled>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_autoshader<class_Terrain3DMaterial_property_show_autoshader>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_checkered<class_Terrain3DMaterial_property_show_checkered>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_colormap<class_Terrain3DMaterial_property_show_colormap>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_contours<class_Terrain3DMaterial_property_show_contours>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_control_angle<class_Terrain3DMaterial_property_show_control_angle>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_control_blend<class_Terrain3DMaterial_property_show_control_blend>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_control_scale<class_Terrain3DMaterial_property_show_control_scale>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_control_texture<class_Terrain3DMaterial_property_show_control_texture>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_grey<class_Terrain3DMaterial_property_show_grey>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_heightmap<class_Terrain3DMaterial_property_show_heightmap>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_instancer_grid<class_Terrain3DMaterial_property_show_instancer_grid>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_jaggedness<class_Terrain3DMaterial_property_show_jaggedness>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_navigation<class_Terrain3DMaterial_property_show_navigation>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_region_grid<class_Terrain3DMaterial_property_show_region_grid>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_roughmap<class_Terrain3DMaterial_property_show_roughmap>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_albedo<class_Terrain3DMaterial_property_show_texture_albedo>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_ao<class_Terrain3DMaterial_property_show_texture_ao>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_height<class_Terrain3DMaterial_property_show_texture_height>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_normal<class_Terrain3DMaterial_property_show_texture_normal>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_rough<class_Terrain3DMaterial_property_show_texture_rough>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_vertex_grid<class_Terrain3DMaterial_property_show_vertex_grid>` | ``false`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`TextureFiltering<enum_Terrain3DMaterial_TextureFiltering>` | :ref:`texture_filtering<class_Terrain3DMaterial_property_texture_filtering>` | ``0`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`WorldBackground<enum_Terrain3DMaterial_WorldBackground>` | :ref:`world_background<class_Terrain3DMaterial_property_world_background>` | ``1`` |
|
||||
+------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``Dictionary`` | :ref:`_shader_parameters<class_Terrain3DMaterial_property__shader_parameters>` | ``{}`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`auto_shader_enabled<class_Terrain3DMaterial_property_auto_shader_enabled>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``Shader`` | :ref:`buffer_shader_override<class_Terrain3DMaterial_property_buffer_shader_override>` | |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`buffer_shader_override_enabled<class_Terrain3DMaterial_property_buffer_shader_override_enabled>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``float`` | :ref:`displacement_scale<class_Terrain3DMaterial_property_displacement_scale>` | ``1.0`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``float`` | :ref:`displacement_sharpness<class_Terrain3DMaterial_property_displacement_sharpness>` | ``0.5`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`dual_scaling_enabled<class_Terrain3DMaterial_property_dual_scaling_enabled>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``Shader`` | :ref:`shader_override<class_Terrain3DMaterial_property_shader_override>` | |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`shader_override_enabled<class_Terrain3DMaterial_property_shader_override_enabled>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_autoshader<class_Terrain3DMaterial_property_show_autoshader>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_checkered<class_Terrain3DMaterial_property_show_checkered>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_colormap<class_Terrain3DMaterial_property_show_colormap>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_contours<class_Terrain3DMaterial_property_show_contours>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_control_angle<class_Terrain3DMaterial_property_show_control_angle>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_control_blend<class_Terrain3DMaterial_property_show_control_blend>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_control_scale<class_Terrain3DMaterial_property_show_control_scale>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_control_texture<class_Terrain3DMaterial_property_show_control_texture>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_displacement_buffer<class_Terrain3DMaterial_property_show_displacement_buffer>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_grey<class_Terrain3DMaterial_property_show_grey>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_heightmap<class_Terrain3DMaterial_property_show_heightmap>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_instancer_grid<class_Terrain3DMaterial_property_show_instancer_grid>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_jaggedness<class_Terrain3DMaterial_property_show_jaggedness>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_navigation<class_Terrain3DMaterial_property_show_navigation>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_region_grid<class_Terrain3DMaterial_property_show_region_grid>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_roughmap<class_Terrain3DMaterial_property_show_roughmap>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_albedo<class_Terrain3DMaterial_property_show_texture_albedo>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_ao<class_Terrain3DMaterial_property_show_texture_ao>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_height<class_Terrain3DMaterial_property_show_texture_height>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_normal<class_Terrain3DMaterial_property_show_texture_normal>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_texture_rough<class_Terrain3DMaterial_property_show_texture_rough>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| ``bool`` | :ref:`show_vertex_grid<class_Terrain3DMaterial_property_show_vertex_grid>` | ``false`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`TextureFiltering<enum_Terrain3DMaterial_TextureFiltering>` | :ref:`texture_filtering<class_Terrain3DMaterial_property_texture_filtering>` | ``0`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
| :ref:`WorldBackground<enum_Terrain3DMaterial_WorldBackground>` | :ref:`world_background<class_Terrain3DMaterial_property_world_background>` | ``1`` |
|
||||
+------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+-----------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
|
|
@ -99,6 +109,10 @@ Methods
|
|||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``RID`` | :ref:`get_buffer_material_rid<class_Terrain3DMaterial_method_get_buffer_material_rid>`\ (\ ) |const| |
|
||||
+-------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``RID`` | :ref:`get_buffer_shader_rid<class_Terrain3DMaterial_method_get_buffer_shader_rid>`\ (\ ) |const| |
|
||||
+-------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``RID`` | :ref:`get_material_rid<class_Terrain3DMaterial_method_get_material_rid>`\ (\ ) |const| |
|
||||
+-------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
|
|
@ -110,7 +124,7 @@ Methods
|
|||
+-------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_shader_param<class_Terrain3DMaterial_method_set_shader_param>`\ (\ name\: ``StringName``, value\: ``Variant``\ ) |
|
||||
+-------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`update<class_Terrain3DMaterial_method_update>`\ (\ ) |
|
||||
| |void| | :ref:`update<class_Terrain3DMaterial_method_update>`\ (\ full\: ``bool`` = false\ ) |
|
||||
+-------------+----------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
|
@ -216,6 +230,74 @@ Enables selecting two texture IDs that will automatically be applied to the terr
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMaterial_property_buffer_shader_override:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``Shader`` **buffer_shader_override** :ref:`🔗<class_Terrain3DMaterial_property_buffer_shader_override>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_buffer_shader_override**\ (\ value\: ``Shader``\ )
|
||||
- ``Shader`` **get_buffer_shader_override**\ (\ )
|
||||
|
||||
If buffer_shader_override_enabled is true and this Shader is valid, the displacement buffer material will use this custom shader code. If this is blank when you enable the override, the system will generate a shader with the current settings. A visual shader will also work here. However we only generate a text based shader so currently a visual shader needs to be constructed with the base code before it can work.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMaterial_property_buffer_shader_override_enabled:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``bool`` **buffer_shader_override_enabled** = ``false`` :ref:`🔗<class_Terrain3DMaterial_property_buffer_shader_override_enabled>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_buffer_shader_override_enabled**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **is_buffer_shader_override_enabled**\ (\ )
|
||||
|
||||
Enables use of the :ref:`buffer_shader_override<class_Terrain3DMaterial_property_buffer_shader_override>` shader code. Generates default code if shader_override is blank.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMaterial_property_displacement_scale:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``float`` **displacement_scale** = ``1.0`` :ref:`🔗<class_Terrain3DMaterial_property_displacement_scale>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_displacement_scale**\ (\ value\: ``float``\ )
|
||||
- ``float`` **get_displacement_scale**\ (\ )
|
||||
|
||||
A global multiplier for all displaced textures. This is the maximum distance that 2 adjacent verticies can be vertically seperated by. Setting this 1.0 would mean a maximum of + 0.5m, and -0.5m deviation from the collision mesh.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMaterial_property_displacement_sharpness:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``float`` **displacement_sharpness** = ``0.5`` :ref:`🔗<class_Terrain3DMaterial_property_displacement_sharpness>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_displacement_sharpness**\ (\ value\: ``float``\ )
|
||||
- ``float`` **get_displacement_sharpness**\ (\ )
|
||||
|
||||
Adjusts the transition between textures. When set at `1.0`, the blending of displacment between textures will match the aldebo/normal blend sharpness exactly. Lower values will have a softer transition, avoiding harsh shapes, without compromising the abldeo and normal blend sharpness. If set at or very near to `0.0`, it is possible that more displaced textures can affect less displaced textures at low blend values even if not visible.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMaterial_property_dual_scaling_enabled:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
|
@ -405,6 +487,23 @@ Albedo shows the base and overlay texture indices defined by the control map. Re
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMaterial_property_show_displacement_buffer:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``bool`` **show_displacement_buffer** = ``false`` :ref:`🔗<class_Terrain3DMaterial_property_show_displacement_buffer>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_show_displacement_buffer**\ (\ value\: ``bool``\ )
|
||||
- ``bool`` **get_show_displacement_buffer**\ (\ )
|
||||
|
||||
Shows the resulting displacement buffer vertex differential from 0. Black matches collision exactly. Green shows extrusions, Red for depressions into the terrain.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMaterial_property_show_grey:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
|
@ -665,6 +764,30 @@ Sets how the mesh outside of defined regions behave. See :ref:`WorldBackground<e
|
|||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_Terrain3DMaterial_method_get_buffer_material_rid:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
``RID`` **get_buffer_material_rid**\ (\ ) |const| :ref:`🔗<class_Terrain3DMaterial_method_get_buffer_material_rid>`
|
||||
|
||||
Returns the RID of the displacement buffer material used with the Rendering Server. This is set per instance of this class.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMaterial_method_get_buffer_shader_rid:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
``RID`` **get_buffer_shader_rid**\ (\ ) |const| :ref:`🔗<class_Terrain3DMaterial_method_get_buffer_shader_rid>`
|
||||
|
||||
Returns the RID of the displacement buffer shader used with the Rendering Server.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DMaterial_method_get_material_rid:
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
|
@ -731,9 +854,11 @@ Set a parameter in the active shader (built-in or override shader).
|
|||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
|void| **update**\ (\ ) :ref:`🔗<class_Terrain3DMaterial_method_update>`
|
||||
|void| **update**\ (\ full\: ``bool`` = false\ ) :ref:`🔗<class_Terrain3DMaterial_method_update>`
|
||||
|
||||
Recompiles the current shader and sends all uniform values to it again.
|
||||
Sends all uniform values to the shader again.
|
||||
|
||||
full - recompiles the shader first.
|
||||
|
||||
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
||||
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
||||
|
|
|
|||
|
|
@ -40,6 +40,10 @@ Properties
|
|||
+---------------+--------------------------------------------------------------------------------------+-----------------------+
|
||||
| ``float`` | :ref:`detiling_shift<class_Terrain3DTextureAsset_property_detiling_shift>` | ``0.0`` |
|
||||
+---------------+--------------------------------------------------------------------------------------+-----------------------+
|
||||
| ``float`` | :ref:`displacement_offset<class_Terrain3DTextureAsset_property_displacement_offset>` | ``0.0`` |
|
||||
+---------------+--------------------------------------------------------------------------------------+-----------------------+
|
||||
| ``float`` | :ref:`displacement_scale<class_Terrain3DTextureAsset_property_displacement_scale>` | ``0.0`` |
|
||||
+---------------+--------------------------------------------------------------------------------------+-----------------------+
|
||||
| ``int`` | :ref:`id<class_Terrain3DTextureAsset_property_id>` | ``0`` |
|
||||
+---------------+--------------------------------------------------------------------------------------+-----------------------+
|
||||
| ``String`` | :ref:`name<class_Terrain3DTextureAsset_property_name>` | ``"New Texture"`` |
|
||||
|
|
@ -227,6 +231,42 @@ The shader laterally shifts UV lookups in a detiling pattern based on this value
|
|||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DTextureAsset_property_displacement_offset:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``float`` **displacement_offset** = ``0.0`` :ref:`🔗<class_Terrain3DTextureAsset_property_displacement_offset>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_displacement_offset**\ (\ value\: ``float``\ )
|
||||
- ``float`` **get_displacement_offset**\ (\ )
|
||||
|
||||
Offset that can be used to raise or lower the displaced surface height for this material.
|
||||
|
||||
Example: slightly lowering a cobblestone texture so the tops of the cobbles match collision.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DTextureAsset_property_displacement_scale:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
``float`` **displacement_scale** = ``0.0`` :ref:`🔗<class_Terrain3DTextureAsset_property_displacement_scale>`
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_displacement_scale**\ (\ value\: ``float``\ )
|
||||
- ``float`` **get_displacement_scale**\ (\ )
|
||||
|
||||
The scale of the displaced surface height for this material.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_Terrain3DTextureAsset_property_id:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
|
|
|||
|
|
@ -140,6 +140,10 @@
|
|||
<member name="assets" type="Terrain3DAssets" setter="set_assets" getter="get_assets">
|
||||
The list of texture and mesh assets used by Terrain3D. You can optionally save this as an external [code skip-lint].tres[/code] text file if you wish to share it with Terrain3D nodes in other scenes.
|
||||
</member>
|
||||
<member name="buffer_shader_override" type="Shader" setter="set_buffer_shader_override" getter="get_buffer_shader_override">
|
||||
</member>
|
||||
<member name="buffer_shader_override_enabled" type="bool" setter="set_buffer_shader_override_enabled" getter="is_buffer_shader_override_enabled" default="false">
|
||||
</member>
|
||||
<member name="cast_shadows" type="int" setter="set_cast_shadows" getter="get_cast_shadows" enum="RenderingServer.ShadowCastingSetting" default="1">
|
||||
Tells the renderer how to cast shadows from the terrain onto other objects. This sets [code skip-lint]GeometryInstance3D.ShadowCastingSetting[/code] in the engine.
|
||||
</member>
|
||||
|
|
@ -190,6 +194,14 @@
|
|||
<member name="debug_level" type="int" setter="set_debug_level" getter="get_debug_level" enum="Terrain3D.DebugLevel" default="0">
|
||||
The verbosity of debug messages printed to the console. Errors and warnings are always printed. This can also be set via command line using [code skip-lint]--terrain3d-debug=LEVEL[/code] where [code skip-lint]LEVEL[/code] is one of [code skip-lint]ERROR, INFO, DEBUG, EXTREME[/code]. The last includes continuously recurring messages like position updates for the mesh as the camera moves around.
|
||||
</member>
|
||||
<member name="displacement_scale" type="float" setter="set_displacement_scale" getter="get_displacement_scale" default="1.0">
|
||||
A global multiplier for all displaced textures. This is the maximum distance that 2 adjacent verticies can be vertically seperated by. Setting this 1.0 would mean a maximum of + 0.5m, and -0.5m deviation from the collision mesh.
|
||||
Alias for [member Terrain3DMaterial.displacement_scale].
|
||||
</member>
|
||||
<member name="displacement_sharpness" type="float" setter="set_displacement_sharpness" getter="get_displacement_sharpness" default="0.25">
|
||||
Adjusts the transition between textures. When set at `1.0`, the blending of displacment between textures will match the aldebo/normal blend sharpness exactly. Lower values will have a softer transition, avoiding harsh shapes, without compromising the abldeo and normal blend sharpness. If set at or very near to `0.0`, it is possible that more displaced textures can affect less displaced textures at low blend values even if not visible.
|
||||
Alias for [member Terrain3DMaterial.displacement_sharpness].
|
||||
</member>
|
||||
<member name="free_editor_textures" type="bool" setter="set_free_editor_textures" getter="get_free_editor_textures" default="true">
|
||||
Frees ground textures used for editing in _ready(). These textures are used to generate the TextureArrays, so if you don't change any [Terrain3DTextureAsset] settings in game, this can be enabled. Also reloads the texture asset list in _enter_tree() in case you load scenes via code and need the textures again. Calls [method Terrain3DAssets.clear_textures].
|
||||
</member>
|
||||
|
|
@ -273,6 +285,9 @@
|
|||
Albedo shows the base and overlay texture indices defined by the control map. Red pixels indicate the base texture, with brightness showing texture ids 0 to 31. Green pixels indicate the overlay texture. Yellow indicates both.
|
||||
Alias for [member Terrain3DMaterial.show_control_texture].
|
||||
</member>
|
||||
<member name="show_displacement_buffer" type="bool" setter="set_show_displacement_buffer" getter="get_show_displacement_buffer" default="false">
|
||||
Alias for [member Terrain3DMaterial.show_displacement_buffer].
|
||||
</member>
|
||||
<member name="show_grey" type="bool" setter="set_show_grey" getter="get_show_grey" default="false">
|
||||
Albedo is set to 0.2 grey.
|
||||
Alias for [member Terrain3DMaterial.show_grey].
|
||||
|
|
@ -328,6 +343,9 @@
|
|||
Overlays the vertex grid on the terrain, showing where each vertex is. Press `3` with the mouse in the viewport to toggle.
|
||||
Alias for [member Terrain3DMaterial.show_vertex_grid].
|
||||
</member>
|
||||
<member name="tessellation_level" type="int" setter="set_tessellation_level" getter="get_tessellation_level" default="0">
|
||||
Enables displacement using texture heights for additional mesh detail when set above 0. This creates up to 6 additional subdivisions of the terrain mesh below LOD0, and adds a displacement buffer configurable in the material. You can see this in wireframe mode. Set to 0 to disable displacement. See [member Terrain3DMaterial.show_displacement_buffer] and look at the Displacement Buffer debug view.
|
||||
</member>
|
||||
<member name="version" type="String" setter="" getter="get_version" default=""1.1.0-dev"">
|
||||
The current version of Terrain3D.
|
||||
</member>
|
||||
|
|
|
|||
|
|
@ -88,6 +88,12 @@
|
|||
Returns the array of detiling values for each texture asset, indexed by asset id.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_texture_displacements" qualifiers="const">
|
||||
<return type="PackedVector2Array" />
|
||||
<description>
|
||||
Returns the array of displacement offset and scale values for each texture asset, indexed by asset id.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_texture_normal_depths" qualifiers="const">
|
||||
<return type="PackedFloat32Array" />
|
||||
<description>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,18 @@
|
|||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_buffer_material_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the RID of the displacement buffer material used with the Rendering Server. This is set per instance of this class.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_buffer_shader_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the RID of the displacement buffer shader used with the Rendering Server.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_material_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
|
|
@ -48,8 +60,10 @@
|
|||
</method>
|
||||
<method name="update">
|
||||
<return type="void" />
|
||||
<param index="0" name="full" type="bool" default="false" />
|
||||
<description>
|
||||
Recompiles the current shader and sends all uniform values to it again.
|
||||
Sends all uniform values to the shader again.
|
||||
full - recompiles the shader first.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
|
@ -60,6 +74,18 @@
|
|||
<member name="auto_shader_enabled" type="bool" setter="set_auto_shader" getter="get_auto_shader" default="false">
|
||||
Enables selecting two texture IDs that will automatically be applied to the terrain based upon slope.
|
||||
</member>
|
||||
<member name="buffer_shader_override" type="Shader" setter="set_buffer_shader_override" getter="get_buffer_shader_override">
|
||||
If buffer_shader_override_enabled is true and this Shader is valid, the displacement buffer material will use this custom shader code. If this is blank when you enable the override, the system will generate a shader with the current settings. A visual shader will also work here. However we only generate a text based shader so currently a visual shader needs to be constructed with the base code before it can work.
|
||||
</member>
|
||||
<member name="buffer_shader_override_enabled" type="bool" setter="set_buffer_shader_override_enabled" getter="is_buffer_shader_override_enabled" default="false">
|
||||
Enables use of the [member buffer_shader_override] shader code. Generates default code if shader_override is blank.
|
||||
</member>
|
||||
<member name="displacement_scale" type="float" setter="set_displacement_scale" getter="get_displacement_scale" default="1.0">
|
||||
A global multiplier for all displaced textures. This is the maximum distance that 2 adjacent verticies can be vertically seperated by. Setting this 1.0 would mean a maximum of + 0.5m, and -0.5m deviation from the collision mesh.
|
||||
</member>
|
||||
<member name="displacement_sharpness" type="float" setter="set_displacement_sharpness" getter="get_displacement_sharpness" default="0.5">
|
||||
Adjusts the transition between textures. When set at `1.0`, the blending of displacment between textures will match the aldebo/normal blend sharpness exactly. Lower values will have a softer transition, avoiding harsh shapes, without compromising the abldeo and normal blend sharpness. If set at or very near to `0.0`, it is possible that more displaced textures can affect less displaced textures at low blend values even if not visible.
|
||||
</member>
|
||||
<member name="dual_scaling_enabled" type="bool" setter="set_dual_scaling" getter="get_dual_scaling" default="false">
|
||||
Enables selecting one texture ID that will have multiple scales applied based upon camera distance. Use it for something like a rock texture so up close it will be nicely detailed, and far away mountains can be covered in the same rock texture without looking tiled. The two blend together at a specified distance.
|
||||
</member>
|
||||
|
|
@ -94,6 +120,9 @@
|
|||
<member name="show_control_texture" type="bool" setter="set_show_control_texture" getter="get_show_control_texture" default="false">
|
||||
Albedo shows the base and overlay texture indices defined by the control map. Red pixels indicate the base texture, with brightness showing texture ids 0 to 31. Green pixels indicate the overlay texture. Yellow indicates both.
|
||||
</member>
|
||||
<member name="show_displacement_buffer" type="bool" setter="set_show_displacement_buffer" getter="get_show_displacement_buffer" default="false">
|
||||
Shows the resulting displacement buffer vertex differential from 0. Black matches collision exactly. Green shows extrusions, Red for depressions into the terrain.
|
||||
</member>
|
||||
<member name="show_grey" type="bool" setter="set_show_grey" getter="get_show_grey" default="false">
|
||||
Albedo is set to 0.2 grey.
|
||||
</member>
|
||||
|
|
|
|||
|
|
@ -59,6 +59,13 @@
|
|||
<member name="detiling_shift" type="float" setter="set_detiling_shift" getter="get_detiling_shift" default="0.0">
|
||||
The shader laterally shifts UV lookups in a detiling pattern based on this value.
|
||||
</member>
|
||||
<member name="displacement_offset" type="float" setter="set_displacement_offset" getter="get_displacement_offset" default="0.0">
|
||||
Offset that can be used to raise or lower the displaced surface height for this material.
|
||||
Example: slightly lowering a cobblestone texture so the tops of the cobbles match collision.
|
||||
</member>
|
||||
<member name="displacement_scale" type="float" setter="set_displacement_scale" getter="get_displacement_scale" default="0.0">
|
||||
The scale of the displaced surface height for this material.
|
||||
</member>
|
||||
<member name="id" type="int" setter="set_id" getter="get_id" default="0">
|
||||
The user settable ID of the texture, between 0 and 31. You can change this to reorder textures in the list, however it won't change the ID painted on the terrain.
|
||||
</member>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
Displacement
|
||||
====================
|
||||
|
||||
For a more detailed terrain mesh, you can enable texture height based displacement. This will subdivide the clipmap mesh, greatly increasing the vertex density around the camera. This feature is compatible with all platforms, including mobile and web, however it does come with a potentially significant performance cost.
|
||||
|
||||
|
||||
```{image} images/displacement_example.jpg
|
||||
:target: ../_images/displacement_example.jpg
|
||||
```
|
||||
|
||||
```{image} images/displacement_wireframe.jpg
|
||||
:target: ../_images/displacement_wireframe.jpg
|
||||
```
|
||||
|
||||
## Enabling Displacement
|
||||
|
||||
You can enable displacement in the `Terrain Mesh` group, by increasing `Tessellation Level` from 0 (disabled, default) up to 6. This will subdivide the terrain around the camera. Generally, it is recommended to keep `Tessellation Level` low, `Mesh Size` as high as performance allows, and `Vertex Spacing` at `1.0` for the best results. All three parameters will have a noticable effect on the subdivision density.
|
||||
|
||||
When `Tessellation Level` is greater than 0, the `Displacement` subgroup appears with global options. Enable displacement, then setup your textures, then come back to these global options.
|
||||
|
||||
To setup your texture assets, you need a clear view of the terrain and an understanding of where the collision surface is. Explore any of these options:
|
||||
* Disable instances by setting `Rendering/Instancer Mode` to `Disabled`.
|
||||
* Hide your nodes in the scene that obscure the terrain surface.
|
||||
* Change `Collision/Collision Mode` to editor collision, and enable view gizmos, which will show the collision mesh for direct comparison.
|
||||
* Enable the `Debug Views/Displacement Buffer`. Black areas match collision exactly. Red shows depressions into the terrain, and Green shows extrusions above the terrain.
|
||||
|
||||
```{image} images/displacement_buffer.jpg
|
||||
:target: ../_images/displacement_buffer.jpg
|
||||
```
|
||||
|
||||
|
||||
## Configuring Textures
|
||||
|
||||
In order to use displacement, you must have textures packed with height textures as described in [Texture Prep](texture_prep.md).
|
||||
|
||||
When you configure your `Terrain3DTextureAsset`, you'll find `Displacement Offset` and `Displacement Scale` options.
|
||||
|
||||
First, adjust `Displacement Scale` until the dimensions of features in the textures are correctly proportioned. Eg. branches are not overly elongated, and pebbles appear round, rather than spiky.
|
||||
|
||||
Next, adjust `Normal Depth` so that any displaced areas are lit correctly. The normal map normals are used for the higher detail geometry.
|
||||
|
||||
Finally, adjust `Displacement Offset` if necessary to minimize the amount of colision mismatch. Most of the time, the default `0.0` is adequate. As an example, a cobblestone texture might have the tops of the cobbles protrude above the terrain, but a small negative offset can align the tops of the cobbles with collision.
|
||||
|
||||
|
||||
## Displacement Global Settings
|
||||
|
||||
Once the texture assets are configured, the global settings can be adjusted in `Terrain Mesh/Displacement`.
|
||||
|
||||
Use `Displacement Scale` for a global multiplier on all textures. This is the maximum distance that 2 adjacent verticies can be vertically seperated by. Setting this 1.0 would mean a maximum of + 0.5m, and -0.5m deviation from the collision mesh.
|
||||
|
||||
`Displacement Sharpness` adjusts the transition between textures. When set at `1.0`, the blending of displacment between textures will match the aldebo and normal blend sharpness exactly. Lower values will have a softer transition, avoiding harsh shapes, without compromising the albedo and normal blend sharpness. If set at or very near to `0.0`, it is possible that more displaced textures can affect less displaced textures at low blend values even if not visible.
|
||||
|
||||
|
||||
## Displacement Buffer
|
||||
|
||||
To calculate displacement, an atlas texture buffer is created via a viewport and canvas_item shader. This buffer updates only when the terrain mesh moves to save on computational cost.
|
||||
|
||||
You can access the buffer shader by enabling `Terrain Mesh/Displacement/Buffer Shader Override Enabled`, which will generate the default for you. Though primarily for development use, it could be modified to read from a persistent buffer for real-time effects like footsteps in sand or mud, or to change how the blending of height textures is handled.
|
||||
|
||||
Custom uniforms can be added within the `group_uniforms displacement` block. These will show up in the `Material/Displacement` group.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 150 KiB |
|
|
@ -7,7 +7,7 @@ Installation & Upgrades
|
|||
* [Upgrading Terrain3D](#upgrading-terrain3d)
|
||||
|
||||
## Requirements
|
||||
* Terrain3D 1.0.1 supports Godot 4.4. Use 1.0.0 for 4.3.
|
||||
* Terrain3D 1.0.1 supports Godot 4.4+. Use 1.0.0 for 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).
|
||||
|
||||
|
|
@ -67,7 +67,9 @@ If upgrading from a very old version, you may need to go through multiple steps
|
|||
|
||||
| Starting Version | Can Upgrade w/ Data Conversion |
|
||||
|------------------|-------------------|
|
||||
| 0.9.3 | 1.0.0 |
|
||||
| 1.0.1 | 1.1.0 |
|
||||
| 1.0.0 | 1.0.1 - 1.1.0 |
|
||||
| 0.9.3 | 1.0.0 - 1.1.0 |
|
||||
| 0.9.2 | 0.9.3* |
|
||||
| 0.9.1 | 0.9.2 - 0.9.3* |
|
||||
| 0.9.0 | 0.9.2 - 0.9.3* |
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ Set `Terrain3D / Regions / Label Distance` to 1024-4096 to see region coordinate
|
|||
|
||||
## 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.
|
||||
This system is a vertex painter, not a pixel painter. In order to make a high performance terrain, we are spreading out say 1024 x 1024 pixels over 1024m x 1024m. Each square meter is influenced by only 4 pixels of data 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 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.
|
||||
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 x 1024m terrain, let alone 16km x 16km? 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 quality textures in [Texture Prep](texture_prep.md) and [Texture Painting](texture_painting.md).
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ If creating your own height textures, aim for a central point of grey (0.5) with
|
|||
|
||||
Normal maps come in two formats: DirectX with -Y, and OpenGL with +Y. Both formats should be normalized.
|
||||
|
||||
DirectX can be converted to OpenGL and vice versa by inverting the green channel in a photo editing app.
|
||||
DirectX can be converted to OpenGL and vice versa by inverting the green channel in a photo editing app, or within our texture packing tool.
|
||||
|
||||
They can often be identified visually by whether bumps appear to stick out (OpenGL) or appear pushed in (DirectX). The sphere and pyramid on the left in the image below are the clearest examples.
|
||||
|
||||
|
|
@ -104,18 +104,18 @@ Natural textures like rock or grass can be very difficult to tell. However if yo
|
|||
|
||||
### Roughness vs Smoothness
|
||||
|
||||
Some "roughness" textures are actually smoothness or gloss textures. You can convert between them by inverting the image.
|
||||
Some "roughness" textures are actually smoothness or gloss textures. You can convert between them by inverting the image in an image editor, or in our texture packing tool.
|
||||
|
||||
You can tell which is which just by looking at distinctive textures and thinking about the material. If it's glass it should be glossy, so on a roughness texture values are near 0 and should appear mostly black. If it's dry rock or dirt, it should be mostly white, which is near 1 roughness. A smoothness texture would show the opposite.
|
||||
You can tell which is which just by looking at distinctive textures and thinking about the material. If it's glass it should be glossy, so on a roughness texture values will be near 0 and the texture will appear mostly black. If it's dry rock or dirt, it should be mostly white, which is near 1 roughness. A smoothness texture would show the opposite.
|
||||
|
||||
|
||||
### Ambient Occlusion
|
||||
|
||||
AO maps can be packed into the normal texture set by encoding AO values in the normal map vector scalars. Normal vectors are expected to have a unit length of 1.0 and by scaling the vector length, it is then possible to pack and later extract the AO value from the normal map RGB channels.
|
||||
Our built in texture packing tool allows you to easily combine AO texture maps into your normal texture set. This is done by a clever technique of expecting your normal map is normalized, then scaling the vector by the AO value.
|
||||
|
||||
The shader will always decode the normal map as if it has AO data included in this way, as the result will be mostly 1.0 (No Ambient Occlusion) when no packing has occured.
|
||||
AO maps are not required for any texture. You can even mix and match on different textures, unlike with sizes or formats. If you haven't included an AO texture, AO will be approximated from the normal map.
|
||||
|
||||
Our built in channel packer will easily pack an AO map into the normal set. If you wish to do it manually, ensure your normal map is normalized. Then pack in AO with: `unpacked_normal_vector * (sqrt(ao) * 0.5 + 0.5)`.
|
||||
If you wish to apply AO to your textures manually or in another tool, ensure your normal map is normalized, then pack AO with: `unpacked_normal_vector * (sqrt(ao) * 0.5 + 0.5)`.
|
||||
|
||||
|
||||
## Channel Pack Textures in Terrain3D
|
||||
|
|
@ -227,7 +227,9 @@ All materials in Godot are just shaders. The standard shader is both overly comp
|
|||
|
||||
### What about displacement?
|
||||
|
||||
Godot doesn't support any sort of texture displacement or tessellation in the renderer. It does have depth parallax (called height), which is quite unattractive and is only usable on certain textures like brick. There are [alternatives](https://github.com/TokisanGames/Terrain3D/issues/175) that might prove useful in the future.
|
||||
Godot doesn't support texture displacement via tessellation or geometry shaders in the renderer. However, we provide the option of subdividing the terrain mesh, to allow textures to displace verteices. For further details see [Displacement](displacement.md).
|
||||
|
||||
Effects like depth parallax or occlusion mapping etc require many samples in fragment, which can be prohibitivley expensive when applied to already complex terrain shaders. There are [alternatives](https://github.com/TokisanGames/Terrain3D/issues/175) that might prove useful in the future.
|
||||
|
||||
### What about...
|
||||
|
||||
|
|
|
|||
|
|
@ -54,10 +54,12 @@ To use it:
|
|||
* Disable `Auto Shader`
|
||||
* Disable `Dual Scaling`
|
||||
* `WorldBackground` as `Noise` exposes additional shader settings, such as octaves and LOD. You can adjust these settings for performance. However this world generating noise is expensive. Consider not using it at all in a commercial game, and instead obscure your background with meshes, or use an HDR skybox with mountains built in.
|
||||
* Reduce the size of the mesh and levels of detail by reducing `Mesh/Size` (`mesh_size`) or `Mesh/Lods` (`mesh_lods`) in the `Terrain3D` node.
|
||||
* Reduce the size of the mesh and levels of detail by reducing `Terrain Mesh/Size` or `Terrain Mesh/Lods` in the `Terrain3D` node.
|
||||
* Reduce `Terrain Mesh/Tessellation Level` or set to 0 (default) to completely disable texture displacement.
|
||||
* Increase `Terrain Mesh/Vertex Spacing`, which increases the lateral scale and gives you a more low-poly terrain. Preferrably do this before you sculpt, but if done after, you can export the heightmap and manipulate it in Photoshop to rescale it.
|
||||
* Don't use `Renderer/Cull Margin`. It should only be needed if using the noise background. Otherwise the AABB should be correctly calculated via editing, so there is no need to expand the cull margin. Keeping it enabled can cost more processing time.
|
||||
* Experiment with `Renderer/free_editor_textures`, which is enabled by default. It saves VRAM by removing the initial textures used to generate the texture arrays.
|
||||
* For cases where performance is paramount, an example `lightweight` shader is provided in `extras/shaders`. This shader is designed to do the minimum possible amount of texture lookups, whilst still providing basic texturing, including height blending. Normals are also fully calculated in `vertex()`. This shader removes advanced features like projection, detiling, and paintable rotation and scale for significant performance gains on low-end hardware, mobile, and VR applications.
|
||||
* For cases where performance is paramount, an example `lightweight` shader is provided in `extras/shaders`. This shader is designed to do the minimum possible amount of texture lookups, while still providing basic texturing, including height blending. Normals are also fully calculated in `vertex()`. This shader removes advanced features like projection, detiling, and paintable rotation and scale for significant performance gains on low-end hardware, mobile, and VR applications. Or you can use the `minimum` shader and craft your own texturing and coloring without any extra features.
|
||||
|
||||
|
||||
## Shaders
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ And the contribution team in :doc:`docs/authors` and displayed on `github contri
|
|||
:caption: Advanced Usage
|
||||
|
||||
docs/collision
|
||||
docs/displacement
|
||||
docs/double_precision
|
||||
docs/navigation
|
||||
docs/occlusion_culling
|
||||
|
|
|
|||
Loading…
Reference in New Issue