Repository: outobugi/Terrain3D
Branch: main
Commit: 2d732fb0e363
Files: 356
Total size: 2.2 MB
Directory structure:
gitextract_y8dts4rh/
├── .clang-format
├── .gitattributes
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.yml
│ │ ├── config.yml
│ │ └── feature_request.yml
│ ├── actions/
│ │ ├── base-deps/
│ │ │ └── action.yml
│ │ └── build-cache/
│ │ └── action.yml
│ └── workflows/
│ ├── android.yml
│ ├── build.yml
│ ├── ios.yml
│ ├── linux.yml
│ ├── macos.yml
│ ├── web.yml
│ └── windows.yml
├── .gitignore
├── .gitmodules
├── .readthedocs.yaml
├── AUTHORS.md
├── CONTRIBUTING.md
├── LICENSE.txt
├── README.md
├── SConstruct
├── Terrain3D.sln
├── Terrain3D.vcxproj
├── Terrain3D.vcxproj.filters
├── Terrain3D.vcxproj.user
├── doc/
│ ├── Makefile
│ ├── _static/
│ │ └── theme_overrides.css
│ ├── api/
│ │ ├── class_terrain3d.rst
│ │ ├── class_terrain3dassets.rst
│ │ ├── class_terrain3dcollision.rst
│ │ ├── class_terrain3ddata.rst
│ │ ├── class_terrain3deditor.rst
│ │ ├── class_terrain3dinstancer.rst
│ │ ├── class_terrain3dmaterial.rst
│ │ ├── class_terrain3dmeshasset.rst
│ │ ├── class_terrain3dregion.rst
│ │ ├── class_terrain3dtextureasset.rst
│ │ ├── class_terrain3dutil.rst
│ │ └── index.rst
│ ├── build_docs.sh
│ ├── conf.py
│ ├── doc_classes/
│ │ ├── Terrain3D.xml
│ │ ├── Terrain3DAssets.xml
│ │ ├── Terrain3DCollision.xml
│ │ ├── Terrain3DData.xml
│ │ ├── Terrain3DEditor.xml
│ │ ├── Terrain3DInstancer.xml
│ │ ├── Terrain3DMaterial.xml
│ │ ├── Terrain3DMeshAsset.xml
│ │ ├── Terrain3DRegion.xml
│ │ ├── Terrain3DTextureAsset.xml
│ │ └── Terrain3DUtil.xml
│ ├── docs/
│ │ ├── authors.rst
│ │ ├── building_from_source.md
│ │ ├── collision.md
│ │ ├── contributing.rst
│ │ ├── controlmap_format.md
│ │ ├── data_format.md
│ │ ├── displacement.md
│ │ ├── double_precision.md
│ │ ├── games.md
│ │ ├── generating_csharp_bindings.md
│ │ ├── getting_help.md
│ │ ├── heightmaps.md
│ │ ├── import_export.md
│ │ ├── installation.md
│ │ ├── instancer.md
│ │ ├── introduction.md
│ │ ├── keyboard_shortcuts.md
│ │ ├── license.rst
│ │ ├── navigation.md
│ │ ├── nightly_builds.md
│ │ ├── occlusion_culling.md
│ │ ├── platforms.md
│ │ ├── press.md
│ │ ├── programming_languages.rst
│ │ ├── shader_design.md
│ │ ├── system_architecture.md
│ │ ├── texture_painting.md
│ │ ├── texture_prep.md
│ │ ├── tips_environment.md
│ │ ├── tips_technical.md
│ │ ├── troubleshooting.md
│ │ ├── tutorial_videos.md
│ │ └── user_interface.md
│ ├── dump_contributors.py
│ ├── index.rst
│ ├── make.bat
│ └── requirements.txt
├── project/
│ ├── Terrain3D.csproj
│ ├── Terrain3D.sln
│ ├── addons/
│ │ └── terrain_3d/
│ │ ├── brushes/
│ │ │ ├── .gdignore
│ │ │ ├── acrylic1.exr
│ │ │ ├── circle0.exr
│ │ │ ├── circle1.exr
│ │ │ ├── circle2.exr
│ │ │ ├── circle3.exr
│ │ │ ├── circle4.exr
│ │ │ ├── hill1.exr
│ │ │ ├── hill2.exr
│ │ │ ├── mountain1.exr
│ │ │ ├── mountain2.exr
│ │ │ ├── mountain3.exr
│ │ │ ├── mountain4.exr
│ │ │ ├── peak1.exr
│ │ │ ├── peak2.exr
│ │ │ ├── peak3.exr
│ │ │ ├── ring1.exr
│ │ │ ├── smoke.exr
│ │ │ ├── square1.exr
│ │ │ ├── square2.exr
│ │ │ ├── square3.exr
│ │ │ ├── square4.exr
│ │ │ ├── square5.exr
│ │ │ ├── stones.exr
│ │ │ ├── terrain1.exr
│ │ │ ├── terrain2.exr
│ │ │ ├── terrain3.exr
│ │ │ ├── terrain4.exr
│ │ │ ├── terrain5.exr
│ │ │ ├── terrain6.exr
│ │ │ ├── texture1.exr
│ │ │ ├── texture2.exr
│ │ │ ├── texture3.exr
│ │ │ ├── texture4.exr
│ │ │ ├── texture5.exr
│ │ │ └── vegetation1.exr
│ │ ├── csharp/
│ │ │ ├── Terrain3D.cs
│ │ │ ├── Terrain3D.cs.uid
│ │ │ ├── Terrain3DAssets.cs
│ │ │ ├── Terrain3DAssets.cs.uid
│ │ │ ├── Terrain3DCollision.cs
│ │ │ ├── Terrain3DCollision.cs.uid
│ │ │ ├── Terrain3DData.cs
│ │ │ ├── Terrain3DData.cs.uid
│ │ │ ├── Terrain3DEditor.cs
│ │ │ ├── Terrain3DEditor.cs.uid
│ │ │ ├── Terrain3DInstancer.cs
│ │ │ ├── Terrain3DInstancer.cs.uid
│ │ │ ├── Terrain3DMaterial.cs
│ │ │ ├── Terrain3DMaterial.cs.uid
│ │ │ ├── Terrain3DMeshAsset.cs
│ │ │ ├── Terrain3DMeshAsset.cs.uid
│ │ │ ├── Terrain3DRegion.cs
│ │ │ ├── Terrain3DRegion.cs.uid
│ │ │ ├── Terrain3DTextureAsset.cs
│ │ │ ├── Terrain3DTextureAsset.cs.uid
│ │ │ ├── Terrain3DUtil.cs
│ │ │ └── Terrain3DUtil.cs.uid
│ │ ├── extras/
│ │ │ ├── 3rd_party/
│ │ │ │ ├── import_sgt.gd
│ │ │ │ ├── import_sgt.gd.uid
│ │ │ │ ├── project_on_terrain3d.gd
│ │ │ │ └── project_on_terrain3d.gd.uid
│ │ │ ├── particle_example/
│ │ │ │ ├── Terrain3DParticles.tscn
│ │ │ │ ├── grass.gdshader
│ │ │ │ ├── grass.gdshader.uid
│ │ │ │ ├── grass_material.tres
│ │ │ │ ├── particles.gdshader
│ │ │ │ ├── particles.gdshader.uid
│ │ │ │ ├── process_material.tres
│ │ │ │ ├── terrain_3D_particles.gd
│ │ │ │ └── terrain_3D_particles.gd.uid
│ │ │ └── shaders/
│ │ │ ├── M_ocean.tres
│ │ │ ├── hex_grid.gdshaderinc
│ │ │ ├── hex_grid.gdshaderinc.uid
│ │ │ ├── lightweight.gdshader
│ │ │ ├── lightweight.gdshader.uid
│ │ │ ├── minimum.gdshader
│ │ │ ├── minimum.gdshader.uid
│ │ │ ├── ocean_shader.gdshader
│ │ │ └── ocean_shader.gdshader.uid
│ │ ├── icons/
│ │ │ ├── autoshader.svg.import
│ │ │ ├── color_paint.svg.import
│ │ │ ├── height_add.svg.import
│ │ │ ├── height_div.svg.import
│ │ │ ├── height_flat.svg.import
│ │ │ ├── height_mul.svg.import
│ │ │ ├── height_slope.svg.import
│ │ │ ├── height_smooth.svg.import
│ │ │ ├── height_sub.svg.import
│ │ │ ├── holes.svg.import
│ │ │ ├── layers.svg.import
│ │ │ ├── multimesh.svg.import
│ │ │ ├── navigation.svg.import
│ │ │ ├── picker_checked.svg.import
│ │ │ ├── region_add.svg.import
│ │ │ ├── region_remove.svg.import
│ │ │ ├── terrain3d.svg.import
│ │ │ ├── texture_paint.svg.import
│ │ │ ├── texture_spray.svg.import
│ │ │ └── wetness.svg.import
│ │ ├── menu/
│ │ │ ├── bake_lod_dialog.gd
│ │ │ ├── bake_lod_dialog.gd.uid
│ │ │ ├── bake_lod_dialog.tscn
│ │ │ ├── baker.gd
│ │ │ ├── baker.gd.uid
│ │ │ ├── channel_packer.gd
│ │ │ ├── channel_packer.gd.uid
│ │ │ ├── channel_packer.tscn
│ │ │ ├── channel_packer_dragdrop.gd
│ │ │ ├── channel_packer_dragdrop.gd.uid
│ │ │ ├── channel_packer_import_template.txt
│ │ │ ├── directory_setup.gd
│ │ │ ├── directory_setup.gd.uid
│ │ │ ├── directory_setup.tscn
│ │ │ ├── terrain_menu.gd
│ │ │ └── terrain_menu.gd.uid
│ │ ├── plugin.cfg
│ │ ├── src/
│ │ │ ├── asset_dock.gd
│ │ │ ├── asset_dock.gd.uid
│ │ │ ├── asset_dock.tscn
│ │ │ ├── double_slider.gd
│ │ │ ├── double_slider.gd.uid
│ │ │ ├── editor_plugin.gd
│ │ │ ├── editor_plugin.gd.uid
│ │ │ ├── gradient_operation_builder.gd
│ │ │ ├── gradient_operation_builder.gd.uid
│ │ │ ├── multi_picker.gd
│ │ │ ├── multi_picker.gd.uid
│ │ │ ├── operation_builder.gd
│ │ │ ├── operation_builder.gd.uid
│ │ │ ├── tool_settings.gd
│ │ │ ├── tool_settings.gd.uid
│ │ │ ├── toolbar.gd
│ │ │ ├── toolbar.gd.uid
│ │ │ ├── ui.gd
│ │ │ └── ui.gd.uid
│ │ ├── terrain.gdextension
│ │ ├── terrain.gdextension.uid
│ │ ├── tools/
│ │ │ ├── importer.gd
│ │ │ ├── importer.gd.uid
│ │ │ ├── importer.tscn
│ │ │ ├── region_mover.gd
│ │ │ └── region_mover.gd.uid
│ │ └── utils/
│ │ ├── terrain_3d_objects.gd
│ │ ├── terrain_3d_objects.gd.uid
│ │ ├── transform_changed_notifier.gd
│ │ └── transform_changed_notifier.gd.uid
│ ├── demo/
│ │ ├── CodeGeneratedDemo.tscn
│ │ ├── Demo.tscn
│ │ ├── NavigationDemo.tscn
│ │ ├── assets/
│ │ │ ├── materials/
│ │ │ │ ├── M_crystal_blue.tres
│ │ │ │ ├── M_crystal_purple.tres
│ │ │ │ ├── M_crystal_red.tres
│ │ │ │ ├── M_rock23_black_tp.tres
│ │ │ │ └── M_rock23_tp.tres
│ │ │ ├── models/
│ │ │ │ ├── CrystalC.tscn
│ │ │ │ ├── LOD10Example.tscn
│ │ │ │ ├── LOD5Example.tscn
│ │ │ │ ├── RockA.glb
│ │ │ │ ├── RockA.glb.import
│ │ │ │ ├── RockA.tscn
│ │ │ │ ├── RockB.glb
│ │ │ │ ├── RockB.glb.import
│ │ │ │ ├── RockB.tscn
│ │ │ │ ├── RockC.glb
│ │ │ │ ├── RockC.glb.import
│ │ │ │ ├── RockC.tscn
│ │ │ │ ├── Tunnel.glb
│ │ │ │ ├── Tunnel.glb.import
│ │ │ │ └── Tunnel.tscn
│ │ │ └── textures/
│ │ │ ├── asset_licenses.txt
│ │ │ ├── ground037_alb_ht.png.import
│ │ │ ├── ground037_nrm_rgh.png.import
│ │ │ ├── rock023_alb_ht.png.import
│ │ │ └── rock023_nrm_rgh.png.import
│ │ ├── components/
│ │ │ ├── DemoBenchmark.tscn
│ │ │ ├── Enemy.tscn
│ │ │ ├── Environment.tscn
│ │ │ ├── Player.tscn
│ │ │ ├── Tunnel.tscn
│ │ │ └── UI.tscn
│ │ ├── csharp/
│ │ │ ├── CodeGenerated.cs
│ │ │ ├── CodeGenerated.cs.uid
│ │ │ └── CodeGeneratedCSDemo.tscn
│ │ ├── data/
│ │ │ ├── M_terrain.tres
│ │ │ ├── assets.tres
│ │ │ ├── nav_mesh.res
│ │ │ ├── terrain3d_00-01.res
│ │ │ ├── terrain3d_00-02.res
│ │ │ └── terrain3d_00_00.res
│ │ └── src/
│ │ ├── CameraManager.gd
│ │ ├── CameraManager.gd.uid
│ │ ├── CaveEntrance.gd
│ │ ├── CaveEntrance.gd.uid
│ │ ├── CodeGenerated.gd
│ │ ├── CodeGenerated.gd.uid
│ │ ├── DemoScene.gd
│ │ ├── DemoScene.gd.uid
│ │ ├── Enemy.gd
│ │ ├── Enemy.gd.uid
│ │ ├── Player.gd
│ │ ├── Player.gd.uid
│ │ ├── RuntimeNavigationBaker.gd
│ │ ├── RuntimeNavigationBaker.gd.uid
│ │ ├── UI.gd
│ │ └── UI.gd.uid
│ ├── icon.png.import
│ └── project.godot
├── src/
│ ├── constants.h
│ ├── generated_texture.cpp
│ ├── generated_texture.h
│ ├── logger.h
│ ├── register_types.cpp
│ ├── register_types.h
│ ├── shaders/
│ │ ├── auto_shader.glsl
│ │ ├── backgrounds.glsl
│ │ ├── debug_views.glsl
│ │ ├── displacement.glsl
│ │ ├── displacement_buffer.glsl
│ │ ├── dual_scaling.glsl
│ │ ├── editor_functions.glsl
│ │ ├── gpu_depth.glsl
│ │ ├── macro_variation.glsl
│ │ ├── main.glsl
│ │ ├── overlays.glsl
│ │ ├── pbr_views.glsl
│ │ ├── projection.glsl
│ │ └── samplers.glsl
│ ├── target_node_3d.h
│ ├── terrain_3d.cpp
│ ├── terrain_3d.h
│ ├── terrain_3d_asset_resource.h
│ ├── terrain_3d_assets.cpp
│ ├── terrain_3d_assets.h
│ ├── terrain_3d_collision.cpp
│ ├── terrain_3d_collision.h
│ ├── terrain_3d_data.cpp
│ ├── terrain_3d_data.h
│ ├── terrain_3d_editor.cpp
│ ├── terrain_3d_editor.h
│ ├── terrain_3d_instancer.cpp
│ ├── terrain_3d_instancer.h
│ ├── terrain_3d_material.cpp
│ ├── terrain_3d_material.h
│ ├── terrain_3d_mesh_asset.cpp
│ ├── terrain_3d_mesh_asset.h
│ ├── terrain_3d_mesher.cpp
│ ├── terrain_3d_mesher.h
│ ├── terrain_3d_region.cpp
│ ├── terrain_3d_region.h
│ ├── terrain_3d_texture_asset.cpp
│ ├── terrain_3d_texture_asset.h
│ ├── terrain_3d_util.cpp
│ ├── terrain_3d_util.h
│ ├── unit_testing.cpp
│ └── unit_testing.h
└── tools/
├── build_release.sh
├── hooks/
│ ├── asmessage.applescript
│ ├── canonicalize_filename.sh
│ ├── pre-commit
│ ├── pre-commit-clang-format
│ └── winmessage.ps1
└── install-hooks.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .clang-format
================================================
# Commented out parameters are those with the same value as base LLVM style.
# We can uncomment them if we want to change their value, or enforce the
# chosen value in case the base style changes (last sync: Clang 14.0).
---
### General config, applies to all languages ###
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
# AlignArrayOfStructures: None
# AlignConsecutiveMacros: None
# AlignConsecutiveAssignments: None
# AlignConsecutiveBitFields: None
# AlignConsecutiveDeclarations: None
# AlignEscapedNewlines: Right
AlignOperands: DontAlign
AlignTrailingComments: false
# AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
# AllowShortEnumsOnASingleLine: true
# AllowShortBlocksOnASingleLine: Never
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortFunctionsOnASingleLine: All
# AllowShortLambdasOnASingleLine: All
# AllowShortIfStatementsOnASingleLine: Never
# AllowShortLoopsOnASingleLine: false
# AlwaysBreakAfterDefinitionReturnType: None
# AlwaysBreakAfterReturnType: None
# AlwaysBreakBeforeMultilineStrings: false
# AlwaysBreakTemplateDeclarations: MultiLine
# AttributeMacros:
# - __capability
# BinPackArguments: true
# BinPackParameters: true
# BraceWrapping:
# AfterCaseLabel: false
# AfterClass: false
# AfterControlStatement: Never
# AfterEnum: false
# AfterFunction: false
# AfterNamespace: false
# AfterObjCDeclaration: false
# AfterStruct: false
# AfterUnion: false
# AfterExternBlock: false
# BeforeCatch: false
# BeforeElse: false
# BeforeLambdaBody: false
# BeforeWhile: false
# IndentBraces: false
# SplitEmptyFunction: true
# SplitEmptyRecord: true
# SplitEmptyNamespace: true
# BreakBeforeBinaryOperators: None
# BreakBeforeConceptDeclarations: true
# BreakBeforeBraces: Attach
# BreakBeforeInheritanceComma: false
# BreakInheritanceList: BeforeColon
# BreakBeforeTernaryOperators: true
# BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon
# BreakStringLiterals: true
ColumnLimit: 0
# CommentPragmas: '^ IWYU pragma:'
# QualifierAlignment: Leave
# CompactNamespaces: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
# DeriveLineEnding: true
# DerivePointerAlignment: false
# DisableFormat: false
# EmptyLineAfterAccessModifier: Never
# EmptyLineBeforeAccessModifier: LogicalBlock
# ExperimentalAutoDetectBinPacking: false
# PackConstructorInitializers: BinPack
ConstructorInitializerAllOnOneLineOrOnePerLine: true
# AllowAllConstructorInitializersOnNextLine: true
# FixNamespaceComments: true
# ForEachMacros:
# - foreach
# - Q_FOREACH
# - BOOST_FOREACH
# IfMacros:
# - KJ_IF_MAYBE
# IncludeBlocks: Preserve
IncludeCategories:
- Regex: '".*"'
Priority: 1
- Regex: '^<.*\.h>'
Priority: 2
- Regex: '^<.*'
Priority: 3
# IncludeIsMainRegex: '(Test)?$'
# IncludeIsMainSourceRegex: ''
# IndentAccessModifiers: false
IndentCaseLabels: true
# IndentCaseBlocks: false
# IndentGotoLabels: true
# IndentPPDirectives: None
# IndentExternBlock: AfterExternBlock
# IndentRequires: false
IndentWidth: 4
# IndentWrappedFunctionNames: false
# InsertTrailingCommas: None
# JavaScriptQuotes: Leave
# JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
# LambdaBodyIndentation: Signature
# MacroBlockBegin: ''
# MacroBlockEnd: ''
# MaxEmptyLinesToKeep: 1
# NamespaceIndentation: None
# PenaltyBreakAssignment: 2
# PenaltyBreakBeforeFirstCallParameter: 19
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakOpenParenthesis: 0
# PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10
# PenaltyExcessCharacter: 1000000
# PenaltyReturnTypeOnItsOwnLine: 60
# PenaltyIndentedWhitespace: 0
# PointerAlignment: Right
# PPIndentWidth: -1
# ReferenceAlignment: Pointer
# ReflowComments: true
# RemoveBracesLLVM: false
# SeparateDefinitionBlocks: Leave
# ShortNamespaceLines: 1
# SortIncludes: CaseSensitive
# SortJavaStaticImport: Before
# SortUsingDeclarations: true
# SpaceAfterCStyleCast: false
# SpaceAfterLogicalNot: false
# SpaceAfterTemplateKeyword: true
# SpaceBeforeAssignmentOperators: true
# SpaceBeforeCaseColon: false
# SpaceBeforeCpp11BracedList: false
# SpaceBeforeCtorInitializerColon: true
# SpaceBeforeInheritanceColon: true
# SpaceBeforeParens: ControlStatements
# SpaceBeforeParensOptions:
# AfterControlStatements: true
# AfterForeachMacros: true
# AfterFunctionDefinitionName: false
# AfterFunctionDeclarationName: false
# AfterIfMacros: true
# AfterOverloadedOperator: false
# BeforeNonEmptyParentheses: false
# SpaceAroundPointerQualifiers: Default
# SpaceBeforeRangeBasedForLoopColon: true
# SpaceInEmptyBlock: false
# SpaceInEmptyParentheses: false
# SpacesBeforeTrailingComments: 1
# SpacesInAngles: Never
# SpacesInConditionalStatement: false
# SpacesInContainerLiterals: true
# SpacesInCStyleCastParentheses: false
## Godot TODO: We'll want to use a min of 1, but we need to see how to fix
## our comment capitalization at the same time.
SpacesInLineCommentPrefix:
Minimum: 0
Maximum: -1
# SpacesInParentheses: false
# SpacesInSquareBrackets: false
# SpaceBeforeSquareBrackets: false
# BitFieldColonSpacing: Both
# StatementAttributeLikeMacros:
# - Q_EMIT
# StatementMacros:
# - Q_UNUSED
# - QT_REQUIRE_VERSION
TabWidth: 4
# UseCRLF: false
UseTab: Always
# WhitespaceSensitiveMacros:
# - STRINGIZE
# - PP_STRINGIZE
# - BOOST_PP_STRINGIZE
# - NS_SWIFT_NAME
# - CF_SWIFT_NAME
---
### C++ specific config ###
Language: Cpp
Standard: c++17
---
### ObjC specific config ###
Language: ObjC
# ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 4
# ObjCBreakBeforeNestedBlockParam: true
# ObjCSpaceAfterProperty: false
# ObjCSpaceBeforeProtocolList: true
---
### Java specific config ###
Language: Java
# BreakAfterJavaFieldAnnotations: false
JavaImportGroups: ['org.godotengine', 'android', 'androidx', 'com.android', 'com.google', 'java', 'javax']
...
================================================
FILE: .gitattributes
================================================
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: [TokisanGames] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: Report a technical issue
description: Report a potential bug or technical issue in Terrain3D
body:
- type: markdown
attributes:
value: |
Has your issue already been addressed in [Installation](https://terrain3d.readthedocs.io/en/latest/docs/installation.html), [Preparing textures](https://terrain3d.readthedocs.io/en/latest/docs/texture_prep.html), [Troubleshooting](https://terrain3d.readthedocs.io/en/latest/docs/troubleshooting.html), or [Tips](https://terrain3d.readthedocs.io/en/latest/docs/tips_technical.html)?
- type: input
attributes:
label: Terrain3D version
description: >
Release version or the commit string of a development build. No -dev versions, provide the commit shown in `git log`.
placeholder: v1.0.0
validations:
required: true
- type: input
attributes:
label: System information
description: |
- Specify the version of Godot and your OS, GPU and rendering backend (Vulkan Forward+, Mobile, Compatibility/WebGL).
- You can copy this information to your clipboard by using *Help > Copy System Info* at the top of the editor window.
placeholder: Godot v4.1.3.stable - Windows 10/64 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 Laptop GPU (NVIDIA; 31.0.15.4633)
validations:
required: true
- type: dropdown
id: demo
attributes:
label: Is the issue reproducable in the demo?
description: |
Try to isolate the problem. E.g. If you're having issues with a texture, put it in the demo and see if it causes the same issue.
options:
- ''
- 'Yes'
- 'No'
- 'Not applicable'
validations:
required: true
- type: textarea
attributes:
label: Issue description
description: |
Briefly describe the issue. What doesn't work, what are you expecting, and what have you done to troubleshooting it?
You can paste or drag in screenshots or videos. Format code with ``` before and after on their own lines.
validations:
required: true
- type: textarea
attributes:
label: Logs
description: |
Terrain3D has [extensive logging](https://terrain3d.readthedocs.io/en/latest/docs/troubleshooting.html#debug-logs). Enable it and attach a text file, or copy the logs here. Format logs with ``` before and after on their own lines.
validations:
required: false
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: Documentation
url: https://terrain3d.readthedocs.io/
about: Many questions and issues have already been answered, including status, tips, and troubleshooting.
- name: Ask questions on Discord
url: https://tokisan.com/discord
about: Just have a question about features? Please use discord.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: Feature request
description: Suggest an idea for Terrain3D, or something else that isn't a technical issue
body:
- type: markdown
attributes:
value: |
Have you reviewed the [status of current and pending features](https://terrain3d.readthedocs.io/en/latest/docs/tips_technical.html#are-certain-features-supported)?
- type: textarea
attributes:
label: Description
description: |
Please describe the feature you would like to see in Terrain3D, how it might work, and why it's helpful.
Include examples of other terrain systems, GDC talks, white papers, and links to blogs or code that will be good reference info.
validations:
required: true
================================================
FILE: .github/actions/base-deps/action.yml
================================================
name: Setup Base Dependencies
description: Setup base dependencies
inputs:
platform:
required: true
description: Target platform.
runs:
using: "composite"
steps:
- name: Setup Python 3.x
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Setup SCons 4.4
shell: bash
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons==4.4.0
scons --version
- name: Setup Android Dependencies
if: inputs.platform == 'android'
uses: nttld/setup-ndk@v1
with:
ndk-version: r28b
link-to-sdk: true
- name: Setup Windows Dependencies
if: inputs.platform == 'windows'
shell: sh
run: |
sudo apt-get install mingw-w64
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- name: Setup Web Dependencies
if: inputs.platform == 'web'
uses: mymindstorm/setup-emsdk@v14
with:
version: 3.1.64
no-cache: true
- name: Verify Emscripten setup
if: inputs.platform == 'web'
shell: bash
run: |
emcc -v
================================================
FILE: .github/actions/build-cache/action.yml
================================================
name: Setup Build Cache
description: Setup build cache.
inputs:
cache-name:
description: The cache base name (job name by default).
default: "${{ github.job }}"
scons-cache:
description: The scons cache path.
default: "${{ github.workspace }}/.scons-cache/"
runs:
using: "composite"
steps:
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
uses: actions/cache@v4
with:
path: ${{ inputs.scons-cache }}
key: ${{ inputs.cache-name }}-${{ github.ref }}
# We try to match an existing cache to restore from it. Each potential key is checked against
# all existing caches as a prefix. E.g. 'linux-template-minimal' would match any cache that
# starts with "linux-template-minimal", such as "linux-template-minimal-master-refs/heads/master-6588a4a29af1621086feac0117d5d4d37af957fd".
#
# We check these prefixes in this order:
#
# 1. The exact match, including the base branch, the commit reference, and the SHA hash of the commit.
# 2. A partial match for the same base branch and the same commit reference.
# 3. A partial match for the same base branch and the base branch commit reference.
# 4. A partial match for the same base branch only (not ideal, matches any PR with the same base branch).
restore-keys: |
${{ inputs.cache-name }}-${{ github.ref }}
${{ inputs.cache-name }}-refs/heads/main
${{ inputs.cache-name }}
================================================
FILE: .github/workflows/android.yml
================================================
name: 🤖 Android Builds
on: [ workflow_call, workflow_dispatch ]
jobs:
build:
name: 🤖 Android ${{ matrix.arch }} ${{ matrix.target }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
platform: [android]
target: [debug, release]
arch: [arm64, arm32]
steps:
- name: Checkout Terrain3D
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Base Dependencies
uses: ./.github/actions/base-deps
with:
platform: ${{ matrix.platform }}
- name: Setup Build Cache
uses: ./.github/actions/build-cache
with:
cache-name: ${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.target }}
continue-on-error: true
- name: Build Terrain3D
env:
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/"
TARGET: 'template_${{ matrix.target }}'
ARCH: '${{ matrix.arch }}'
shell: sh
run: |
scons target=$TARGET platform='${{ matrix.platform }}' arch=$ARCH debug_symbols=no -j2
- name: Include Files
shell: sh
run: |
ls -l project/addons/terrain_3d/bin/
cp '${{ github.workspace }}/README.md' '${{ github.workspace }}/LICENSE.txt' ${{ github.workspace }}/project/addons/terrain_3d/
- name: Upload Package
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: t3d-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.target }}
path: |
${{ github.workspace }}/project/
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
include-hidden-files: true
name: ${{ github.event.repository.name }}
pattern: t3d-*
delete-merged: true
================================================
FILE: .github/workflows/build.yml
================================================
# Modeled off of godot-cpp https://github.com/godotengine/godot-cpp/blob/master/.github/workflows/ci.yml
name: 🛠️ Build All
on:
push:
branches: [ main, 1.1-godot4.4 ]
pull_request:
paths: [ '**' ]
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.name }} ${{ matrix.target }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
identifier: [linux, windows, macos, ios, android-arm32, android-arm64, web-nothreads]
target: [debug, release]
include:
- identifier: linux
platform: linux
name: 🐧 Linux
runner: ubuntu-22.04
flags: arch=x86_64
- identifier: windows
platform: windows
name: 🪟 Windows
runner: ubuntu-22.04
flags: arch=x86_64
- identifier: macos
platform: macos
name: 🍎 macOS
runner: macos-latest
flags: arch=universal
- identifier: ios
platform: ios
name: 🍏 iOS
runner: macos-latest
flags: arch=universal
- identifier: android-arm32
platform: android
name: 🤖 Android Arm32
runner: ubuntu-22.04
flags: arch=arm32
- identifier: android-arm64
platform: android
name: 🤖 Android Arm64
runner: ubuntu-22.04
flags: arch=arm64
- identifier: web-nothreads
platform: web
name: 🌐 Web No-threads
runner: ubuntu-22.04
flags: threads=no
steps:
- name: Checkout Terrain3D
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Base Dependencies
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
uses: ./.github/actions/base-deps
with:
platform: ${{ matrix.platform }}
- name: Setup Build Cache
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
uses: ./.github/actions/build-cache
with:
cache-name: ${{ matrix.identifier }}-${{ matrix.target }}
continue-on-error: true
- name: Build Terrain3D
env:
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/"
TARGET: 'template_${{ matrix.target }}'
shell: sh
run: |
scons target=$TARGET platform='${{ matrix.platform }}' ${{ matrix.flags }} debug_symbols=no -j2
- name: Strip Libraries (Windows/Linux)
if: ${{ matrix.platform == 'windows' || matrix.platform == 'linux' }}
shell: sh
run: |
ls -l project/addons/terrain_3d/bin/
strip project/addons/terrain_3d/bin/libterrain.*
ls -l project/addons/terrain_3d/bin/
- name: Include Files
shell: sh
run: |
cp '${{ github.workspace }}/README.md' '${{ github.workspace }}/LICENSE.txt' ${{ github.workspace }}/project/addons/terrain_3d/
- name: Upload Package
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: t3d-${{ matrix.identifier }}-${{ matrix.target }}
path: |
${{ github.workspace }}/project/
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
uses: actions/upload-artifact/merge@v4
with:
include-hidden-files: true
name: ${{ github.event.repository.name }}
pattern: t3d-*
delete-merged: true
================================================
FILE: .github/workflows/ios.yml
================================================
name: 🍏 iOS Builds
on: [ workflow_call, workflow_dispatch ]
jobs:
build:
name: 🍏 iOS ${{ matrix.arch }} ${{ matrix.target }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
platform: [ios]
target: [debug, release]
arch: [universal]
steps:
- name: Checkout Terrain3D
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Base Dependencies
uses: ./.github/actions/base-deps
with:
platform: ${{ matrix.platform }}
- name: Setup Build Cache
uses: ./.github/actions/build-cache
with:
cache-name: ${{ matrix.platform }}-${{ matrix.target }}
continue-on-error: true
- name: Build Terrain3D
env:
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/"
TARGET: 'template_${{ matrix.target }}'
ARCH: '${{ matrix.arch }}'
shell: sh
run: |
scons target=$TARGET platform='${{ matrix.platform }}' arch=$ARCH debug_symbols=no -j2
- name: Include Files
shell: sh
run: |
ls -l project/addons/terrain_3d/bin/*
cp '${{ github.workspace }}/README.md' '${{ github.workspace }}/LICENSE.txt' ${{ github.workspace }}/project/addons/terrain_3d/
- name: Upload Package
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: t3d-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.target }}
path: |
${{ github.workspace }}/project/
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
include-hidden-files: true
name: ${{ github.event.repository.name }}
pattern: t3d-*
delete-merged: true
================================================
FILE: .github/workflows/linux.yml
================================================
name: 🐧 Linux Builds
on: [ workflow_call, workflow_dispatch ]
jobs:
build:
name: 🐧 Linux ${{ matrix.arch }} ${{ matrix.target }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
platform: [linux]
target: [debug, release]
arch: [x86_64]
steps:
- name: Checkout Terrain3D
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Base Dependencies
uses: ./.github/actions/base-deps
with:
platform: ${{ matrix.platform }}
- name: Setup Build Cache
uses: ./.github/actions/build-cache
with:
cache-name: ${{ matrix.platform }}-${{ matrix.target }}
continue-on-error: true
- name: Build Terrain3D
env:
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/"
TARGET: 'template_${{ matrix.target }}'
ARCH: '${{ matrix.arch }}'
shell: sh
run: |
scons target=$TARGET platform='${{ matrix.platform }}' arch=$ARCH debug_symbols=no -j2
- name: Prepare Files
shell: sh
run: |
ls -l project/addons/terrain_3d/bin/
strip project/addons/terrain_3d/bin/libterrain.*
ls -l project/addons/terrain_3d/bin/
cp '${{ github.workspace }}/README.md' '${{ github.workspace }}/LICENSE.txt' ${{ github.workspace }}/project/addons/terrain_3d/
- name: Upload Package
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: t3d-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.target }}
path: |
${{ github.workspace }}/project/
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
include-hidden-files: true
name: ${{ github.event.repository.name }}
pattern: t3d-*
delete-merged: true
================================================
FILE: .github/workflows/macos.yml
================================================
name: 🍎 macOS Builds
on: [ workflow_call, workflow_dispatch ]
jobs:
build:
name: 🍎 macOS ${{ matrix.arch }} ${{ matrix.target }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
platform: [macos]
target: [debug, release]
arch: [universal]
steps:
- name: Checkout Terrain3D
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Base Dependencies
uses: ./.github/actions/base-deps
with:
platform: ${{ matrix.platform }}
- name: Setup Build Cache
uses: ./.github/actions/build-cache
with:
cache-name: ${{ matrix.platform }}-${{ matrix.target }}
continue-on-error: true
- name: Build Terrain3D
env:
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/"
TARGET: 'template_${{ matrix.target }}'
ARCH: '${{ matrix.arch }}'
shell: sh
run: |
scons target=$TARGET platform='${{ matrix.platform }}' arch=$ARCH debug_symbols=no -j2
- name: Include Files
shell: sh
run: |
ls -l project/addons/terrain_3d/bin/*/
cp '${{ github.workspace }}/README.md' '${{ github.workspace }}/LICENSE.txt' ${{ github.workspace }}/project/addons/terrain_3d/
- name: Upload Package
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: t3d-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.target }}
path: |
${{ github.workspace }}/project/
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
include-hidden-files: true
name: ${{ github.event.repository.name }}
pattern: t3d-*
delete-merged: true
================================================
FILE: .github/workflows/web.yml
================================================
name: 🌐 Web Builds
on: [ workflow_call, workflow_dispatch ]
jobs:
build:
name: 🌐 Web ${{ matrix.arch }} ${{ matrix.target }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
platform: [web]
target: [debug, release]
#threads: [yes, no]
steps:
- name: Checkout Terrain3D
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Base Dependencies
uses: ./.github/actions/base-deps
with:
platform: ${{ matrix.platform }}
- name: Setup Build Cache
uses: ./.github/actions/build-cache
with:
cache-name: ${{ matrix.platform }}-nothreads-${{ matrix.target }}
continue-on-error: true
- name: Build Terrain3D
env:
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/"
TARGET: 'template_${{ matrix.target }}'
shell: sh
run: |
scons target=$TARGET platform='${{ matrix.platform }}' threads=no debug_symbols=no -j2
- name: Prepare Files
shell: sh
run: |
ls -l project/addons/terrain_3d/bin/
cp '${{ github.workspace }}/README.md' '${{ github.workspace }}/LICENSE.txt' ${{ github.workspace }}/project/addons/terrain_3d/
- name: Upload Package
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: t3d-${{ matrix.platform }}-nothreads-${{ matrix.target }}
path: |
${{ github.workspace }}/project/
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
include-hidden-files: true
name: ${{ github.event.repository.name }}
pattern: t3d-*
delete-merged: true
================================================
FILE: .github/workflows/windows.yml
================================================
name: 🪟 Windows Builds
on: [ workflow_call, workflow_dispatch ]
jobs:
build:
name: 🪟 Windows ${{ matrix.arch }} ${{ matrix.target }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
platform: [windows]
target: [debug, release]
arch: [x86_64]
steps:
- name: Checkout Terrain3D
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Base Dependencies
uses: ./.github/actions/base-deps
with:
platform: ${{ matrix.platform }}
- name: Setup Build Cache
uses: ./.github/actions/build-cache
with:
cache-name: ${{ matrix.platform }}-${{ matrix.target }}
continue-on-error: true
- name: Build Terrain3D
env:
SCONS_CACHE: "${{ github.workspace }}/.scons-cache/"
TARGET: 'template_${{ matrix.target }}'
ARCH: '${{ matrix.arch }}'
shell: sh
run: |
scons target=$TARGET platform='${{ matrix.platform }}' arch=$ARCH debug_symbols=no -j2
- name: Prepare Files
shell: sh
run: |
ls -l project/addons/terrain_3d/bin/
strip project/addons/terrain_3d/bin/libterrain.*
ls -l project/addons/terrain_3d/bin/
cp '${{ github.workspace }}/README.md' '${{ github.workspace }}/LICENSE.txt' ${{ github.workspace }}/project/addons/terrain_3d/
- name: Upload Package
uses: actions/upload-artifact@v4
with:
include-hidden-files: true
name: t3d-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.target }}
path: |
${{ github.workspace }}/project/
merge:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
include-hidden-files: true
name: ${{ github.event.repository.name }}
pattern: t3d-*
delete-merged: true
================================================
FILE: .gitignore
================================================
# Terrain3D
project/addons/terrain_3d/bin/
project/addons/explore-editor-theme/
project/_dev/
project/_export/
project/_tests/
project/test/
src/_archive/
src/gen/
_misc/
_patches/
*.zip
# Docs
doc/_build
doc/art/
# Godot-specific ignores (Include script cache. See godot issue #75388)
/project/.import/
/project/.godot/
export.cfg
export_presets.cfg
# Objects
.scons-cache/
*.os
*.obj
*.o
# SConstruct
.sconf_temp
.sconsign.dblite
*.pyc
# MacOS
.DS_Store
# Editors
.vscode/
.vs/
================================================
FILE: .gitmodules
================================================
[submodule "godot-cpp"]
path = godot-cpp
url = https://github.com/godotengine/godot-cpp.git
branch = master
================================================
FILE: .readthedocs.yaml
================================================
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
build:
os: "ubuntu-22.04"
tools:
python: "3.11"
python:
install:
- requirements: doc/requirements.txt
sphinx:
configuration: doc/conf.py
# Possible options: htmlzip, pdf, epub
formats: []
================================================
FILE: AUTHORS.md
================================================
# Terrain3D Authors
The creation of this plugin is thanks to the following contributors.
## Core Team
* Cory Petkovsek [@TokisanGames](https://github.com/TokisanGames)
* Roope Palmroos [@outobugi](https://github.com/outobugi)
* Emerson Rowland [@Xtarsia](https://github.com/Xtarsia)
## MVPs
* Tom Coxon [@tcoxon](https://github.com/tcoxon)
* Aidan Davey [@aidandavey](https://github.com/aidandavey)
## Contributors
* Lorenz [@lw64](https://github.com/lw64)
* Loic Chen [@painfulexistence](https://github.com/painfulexistence)
* [@Dekker3D](https://github.com/Dekker3D)
* Laurent Senta [@laurentsenta](https://github.com/laurentsenta)
* Ryan [@Ryan-000](https://github.com/Ryan-000)
* Jacob Coughenour [@jacobcoughenour](https://github.com/jacobcoughenour)
* Slashscreen [@SlashScreen](https://github.com/SlashScreen)
* Roman Shapiro [@rds1983](https://github.com/rds1983)
* Malido [@Malidos](https://github.com/Malidos)
* Bruno Meneguello [@bkmeneguello](https://github.com/bkmeneguello)
* xht [@xanhast](https://github.com/xanhast)
* [@wenqiangwang](https://github.com/wenqiangwang)
* [@k1r4n8](https://github.com/k1r4n8)
* [@jesus-g20](https://github.com/jesus-g20)
* [@jeffercize](https://github.com/jeffercize)
* [@artoonu](https://github.com/artoonu)
* [@Zennii](https://github.com/Zennii)
* Sven Cannivy [@svencan](https://github.com/svencan)
* StAkira [@stakira](https://github.com/stakira)
* Sean Otto [@seanj29](https://github.com/seanj29)
* Scott Davis [@scottdavis](https://github.com/scottdavis)
* Rose [@az-raven](https://github.com/az-raven)
* [@OzelotVanilla](https://github.com/OzelotVanilla)
* Matt [@FishOfTheNorthStar](https://github.com/FishOfTheNorthStar)
* L [@lfxu](https://github.com/lfxu)
* Joyless [@Joy-less](https://github.com/Joy-less)
* Johan Frohlander [@pew-jfrohlander](https://github.com/pew-jfrohlander)
* [@GabrielPlante](https://github.com/GabrielPlante)
* Furq [@Furqit](https://github.com/Furqit)
* Feiyun Wang [@feiyunw](https://github.com/feiyunw)
* Brian [@epitaque](https://github.com/epitaque)
* Dissonant Void [@DissonantVoid](https://github.com/DissonantVoid)
* [@directedchaossoftware](https://github.com/directedchaossoftware)
* [@CrowhopTech](https://github.com/CrowhopTech)
* Benjamin Wolff [@benjiwolff](https://github.com/benjiwolff)
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing To Terrain3D
We need your help to make this the best terrain plugin for Godot.
Please see [System Architecture](https://terrain3d.readthedocs.io/en/stable/docs/system_architecture.html) to gain an understanding of how the system works. Then review the [roadmap](https://github.com/users/TokisanGames/projects/3) for priority of issues.
If you wish to take on a major component, it's best to join our [discord server](https://tokisan.com/discord) and discuss your plans in #terrain3d-dev to make sure your efforts are aligned with other plans.
**Table of Contents**
* [Important Directories](#important-directories)
* [Setup Your System](#setup-your-system)
* [PR Workflow](#pr-workflow)
* [Code Style](#code-style)
* [Documentation](#documentation)
* [Maintainers](#maintainers)
## Important Directories
* `src` - C++ source for the library
* `src/shaders` - GLSL source for the default shader
* `doc/doc_classes` - XML docs for C++ classes
* `doc/docs` - MD tutorial docs
* `project/addons/terrain_3d`
* `src` - GDScript for the editor plugin: the user interface for hand editing
* `menu` - GDScript for the tools menu: bakers, channel packer
* `tools` - GDScript for the importer, which will eventually be merged into the menu
* `utils` - GDScript for other objects, eg. terrain_3d_objects.gd
* `extras` - GDScript examples for users
## Setup Your System
Make sure you are setup to [build the plugin from source](https://terrain3d.readthedocs.io/en/stable/docs/building_from_source.html).
### Install clang-format
clang-format will adjust the style of your code to a consistent standard. Once you install it you can manually run it on all of your code to see or apply changes, and you can set it up to run automatically upon each commit.
#### Installing clang-format binary onto your system.
* Download version 13 or later
* Make sure the LLVM binary directory where `clang-format` is stored gets added to the `PATH` during installation
* Linux/OSX: Install the `clang-format` package, or all of `LLVM` or `clang` if your distribution doesn't provide the standalone tool
* Windows: Download LLVM for Windows from
#### Using clang-format automatically
We use Godot's clang-format hooks that will format your code upon making a commit. Install the hooks into your repo after cloning.
* Copy `tools/hooks/*` into `.git/hooks` or run `python tools/install-hooks.py`
#### Using clang-format manually
* View a formatted file, no changes on disk: `clang-format `
* See what changes would be made: `git-clang-format --diff `
* Change the files in place: `clang-format -i `
## PR Workflow
We use the standard [Godot PR workflow](https://contributing.godotengine.org/en/latest/organization/pull_requests/creating_pull_requests.html). Please submit PRs according to the same process Godot uses.
This includes:
* Creating a new branch (not main) before submitting the PR.
* Never using git merge, or the `sync` button. Only fetch, push, pull.
* To update your PR to the latest main, rebase it then force push into your branch.
* `git pull --rebase upstream main`
* `git push -f`
Read the guide above for more details.
## Code Style
### GDScript
In general, follow the [Godot GDScript style guidelines](https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html).
In addition:
* All variables and functions are static typed, with a colon then space (eg. `var state: int = 3`)
* Auto static typing can be used *only* when the type is specifically assigned (eg. `var point := Vector2(1, 1)`)
* Two blank lines between functions
### GLSL
* Similar to C++ formatting below, except use `float` and no clang-format
* Private uniforms are prefaced with `_` and are hidden from the inspector and not accessible via set/get_shader_param()
### C++
In general, follow the [Godot C++ style guidelines](https://contributing.godotengine.org/en/latest/engine/guidelines/code_style.html).
In addition:
Use const correctness:
* Function parameters that won't be changed (almost all) should be marked const. Exceptions are pointers, or where passing a variable the function is supposed to modify, eg. Terrain3D::_generate_triangles
* Functions that won't change the object should be marked const (e.g. most get_ functions)
Pass by reference:
* Pass everything larger than 4 bytes by reference, including Ref<> and arrays, dictionaries, RIDs. e.g. `const Transform3D &xform`
* Floats:
* Use `real_t` instead of `float`
* Format float literals like `0.0f` or `0.f`
* Float literals and `real_t` variables can share operations (e.g. `mydouble += 1.0f`) unless the compiler complains. e.g. `Math::lerp(mydouble, real_t(0.0f), real_t(1.0f))`
* Standard Library & Godot Functions:
* Use `std::abs`, not `Math::abs` (same), and definitely not `abs` (broken on mingw)
* Use `std::isnan`, not `Math::is_nan` (same)
Braces:
* Everything braced - no if/for one-liners. Including switch cases
* One line setters/getters can go in the header file
* Opening brace on the initial line (eg. `if (condition) {`), and ending brace at the same tab stop as the initial line
Private & Public:
* Private variables/functions prefaced with `_`
* One initial public section for constants
* Private/public/protected for members and functions in that order, in header and cpp files
* Functions in h and cpp files in same order
Other formatting:
* One blank line between functions
* All code passed through clang-format. See above
## Documentation
All PRs that include new methods and features or changed functionality should include documentation updates. This could be in the form of a tutorial page for the user manual, or API changes to the XML Class Reference.
### User Manual
Tutorials and usage documentation lives in [doc/docs](https://github.com/TokisanGames/Terrain3D/tree/main/doc/docs) and is written in Markdown (*.md). Images are stored in `images` and videos are stored [_static/video](https://github.com/TokisanGames/Terrain3D/tree/main/doc/_static/video).
Pages also need to be included in the table of contents `doc/index.rst`. Readthedocs will then be able to find everything it needs to build the html documentation upon a commit.
### Class Reference
The class reference documentation that contributors edit is stored in [XML files](https://github.com/TokisanGames/Terrain3D/tree/main/doc/classes). These files are used as the source for generated documentation.
Edit the class reference according to the [Godot class reference primer](https://docs.godotengine.org/en/stable/engine_details/class_reference/index.html).
Godot's doc-tool is used to extract or update the class structure from the compiled addon. See below for instructions.
### Using the Documentation Generation Tools
This step isn't required for contributors. You may ask for help generating the XML class structure so you can edit it, or generating the resulting RST files.
#### To setup your system
1. Use a bash shell available in linux, [gitforwindows](https://gitforwindows.org), or [Microsoft's WSL](https://learn.microsoft.com/en-us/windows/wsl/install).
2. Install the following modules using python's pip: `pip install docutils myst-parser sphinx sphinx-rtd-theme sphinx-rtd-dark-mode`.
3. Edit `doc/build_docs.sh` and adjust the paths to your Godot executable and `make_rst.py`, found in the Godot repository.
#### To edit the documentation
1. Build Terrain3D with your updated code.
2. Within the `doc` folder, run `./build_docs.sh`. The following will occur:
- The Godot executable dumps the XML structure for all classes, including those of installed addons.
- Any existing XML files (eg Terrain3D*) will be updated with the new structure, leaving prior written documentation.
- Sphinx RST files are generated from the XML files.
- All non-Terrain3D XML files are removed.
- A local html copy of the docs are generated from the Markdown and RST files, and a browser is open to view them.
3. Fill in the XML files with documentation of the new generated structure and make any other changes to the Markdown files.
4. Run the script again to update the RST files. This isn't necessary for Markdown updates, except to view the changes locally.
5. Push your updates to the Markdown, XML, and RST files to the repository. Due to the nature of generation scripts, carefully review the changes so you only push those you intend.
6. Readthedocs will detect commits to the main tree and will build the online html docs from the Markdown and RST files.
Doc generation via Sphinx is configured by conf.py and requirements.txt. Readthedocs also reads .readthedocs.yaml. The website is configured to automatically build based on specifically chosen branches and tags. `latest` is `main`. `stable` is a tag that we must manually update to point to the latest stable commit.
## Maintainers
There are various responsibilities and processes maintainers need to do to update Terrain3D.
1. Ensure PR builds are successful, and occasionally make changes to the build scripts when Github makes changes.
2. Ensure PRs are up to code standards and include XML documentation. You may need to generate the XML for them first.
3. [Update docs](#using-the-documentation-generation-tools) to generate the XML and RST files. Readthedocs will update automatically once PRs are merged. Though if it fails, you may need to log in and figure out why. It can be a bit finicky. They have automatic tags.
4. [Update C# bindings](generating_csharp_bindings.md) as the API changes.
5. Update versions and tags as indicated below.
## Updating New Versions and Releases of Terrain3D
Edit the following files on new releases and versions.
### New Terrain3D Release Version
* Set src/terrain_3d.h : _version
* Set project/addons/terrain_3d/plugin.cfg : version
* Set doc/conf.py : version
* Rebuild the docs with doc/build_docs.sh
* Review minimum version in terrain.gdextension
* Create a new tag for github
* Create a new branch for new milestones (1.0) so readthedocs will create a new version. You may need to enable it on their website.
* Reassign the `stable` tag for readthedocs to update that doc build. `latest` automatically builds off of `main`.
### New Terrain3DRegion Data Format Version
* Update src/terrain_3d_data.h : CURRENT_DATA_VERSION
* Update docs/data_format.md
### New Year:
* Update Copyright header in all source files and conf.py
## Maintaining multiple versions
Occasionally we might maintain two builds of the same version, such as `1.1-godot4.4` and `1.1` for Godot 4.5+. In this case the difference was the former used the godot-cpp 4.4 API, the latter used the 4.5 API. There was a minor but important difference in our code. I wanted all commits from one branch to be in the other branch, except for the few that changed the godot-cpp API. Here's how that process worked.
1. At the time, `main` was 1.1-dev and I had made a separate `1.1-godot4.4` branch. I made a commit changing godot-cpp to the 4.5 API.
2. Then after some commits, I cherry-picked all of the new ones from `main` into `1.1-godot4.4`.
3. On `main`, I created a tag called `_last-cherry-pick` so that when I periodically updated the 4.4 branch I knew where I left off.
4. Bulk cherry-picking is easy to do with the following:
```
git checkout 1.1-godot4.4 # Start in the destination branch
git cherry-pick --no-merges _last-cherry-pick..main # Use any two hashes or tags
git diff main # Ensure the only difference is the 4.5 API change in this example
git push # Upload all bulk cherry-picked commits
```
================================================
FILE: LICENSE.txt
================================================
MIT License
Copyright (c) 2023-2026 Cory Petkovsek, Roope Palmroos, and Contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================

# Terrain3D
A high performance, editable terrain system for Godot 4.
## Features
* Written in C++ as a GDExtension addon, which works with official builds of Godot Engine
* [Can be accessed](https://terrain3d.readthedocs.io/en/stable/docs/programming_languages.html) by GDScript, C#, and any language Godot supports
* Terrains as small as 64x64m up to 65.5x65.5km (4295km^2) in non-contiguous and variable sized regions
* Up to 32 textures
* Up to 10 levels of detail for the terrain mesh
* Foliage instancing, with up to 10 levels of detail, and a shadow impostor
* Sculpting, holes, texture painting, texture detiling, painting colors and wetness
* Imports heightmaps from [HTerrain](https://github.com/Zylann/godot_heightmap_plugin/), Gaea, World Creator, World Machine, Unity, Unreal and any tool that can export a heightmap. See [heightmaps](https://terrain3d.readthedocs.io/en/stable/docs/heightmaps.html)
## Games Using Terrain3D
Please see the [featured games using Terrain3D](https://terrain3d.readthedocs.io/en/latest/docs/games.html) for examples of what it can do.
## Getting Started
1. Read the [Introduction](https://terrain3d.readthedocs.io/en/stable/docs/introduction.html) to understand how this terrain system works.
2. Read the [Installation & Upgrade](https://terrain3d.readthedocs.io/en/stable/docs/installation.html) instructions.
3. Watch the [tutorial videos](https://terrain3d.readthedocs.io/en/stable/docs/tutorial_videos.html) and read through the documentation.
4. For support, read [Getting Help](https://terrain3d.readthedocs.io/en/stable/docs/getting_help.html) and join our [Discord server](https://tokisan.com/discord).
## Credit
Developed for the Godot community by:
|||
|--|--|
| **Cory Petkovsek, Tokisan Games** | [](https://twitter.com/TokisanGames) [](https://github.com/TokisanGames) [](https://tokisan.com/) [](https://tokisan.com/discord) [](https://www.youtube.com/@TokisanGames)|
| **Roope Palmroos, Outobugi Games** | [](https://twitter.com/outobugi) [](https://github.com/outobugi) [](https://outobugi.com/) [](https://www.youtube.com/@outobugi)|
And the contribution team in [AUTHORS.md](https://terrain3d.readthedocs.io/en/stable/docs/authors.html) and on the right of the github page.
## Contributing
Please see [CONTRIBUTING.md](https://github.com/TokisanGames/Terrain3D/blob/main/CONTRIBUTING.md) if you would like to help make Terrain3D the best terrain system for Godot.
## License
This addon has been released under the [MIT License](https://github.com/TokisanGames/Terrain3D/blob/main/LICENSE.txt).
================================================
FILE: SConstruct
================================================
#!/usr/bin/env python
from glob import glob
from pathlib import Path
import os
# TODO: Do not copy environment after godot-cpp/test is updated .
env = SConscript("godot-cpp/SConstruct")
# Add source files.
env.Append(CPPPATH=["src/"])
sources = Glob("src/*.cpp")
# Find gdextension path even if the directory or extension is renamed (e.g. project/addons/example/example.gdextension).
(extension_path,) = glob("project/addons/terrain_3d/*.gdextension")
# Find the addon path (e.g. project/addons/example).
addon_path = Path(extension_path).parent
# Find the project name from the gdextension file (e.g. example).
project_name = Path(extension_path).stem
scons_cache_path = os.environ.get("SCONS_CACHE")
if scons_cache_path != None:
CacheDir(scons_cache_path)
print("Scons cache enabled... (path: '" + scons_cache_path + "')")
# Embed documentation into the engine
if env["target"] in ["editor", "template_debug"]:
doc_data = env.GodotCPPDocData("src/gen/doc_data.gen.cpp", source=Glob("doc/doc_classes/*.xml"))
sources.append(doc_data)
# Create the library target (e.g. libexample.linux.debug.x86_64.so).
debug_or_release = "release" if env["target"] == "template_release" else "debug"
if env["platform"] == "macos":
library = env.SharedLibrary(
"{0}/bin/lib{1}.{2}.{3}.framework/{1}.{2}.{3}".format(
addon_path,
project_name,
env["platform"],
debug_or_release,
),
source=sources,
)
else:
library = env.SharedLibrary(
"{}/bin/lib{}.{}.{}.{}{}".format(
addon_path,
project_name,
env["platform"],
debug_or_release,
env["arch"],
env["SHLIBSUFFIX"],
),
source=sources,
)
## Option to use C++20 for this extension by replacing CXXFLAGS
#if env.get("is_msvc", False):
# env.Replace(CXXFLAGS=["/std:c++20"])
#else:
# env.Replace(CXXFLAGS=["-std=c++20"])
## Reenable CXXFLAGS removed by the above from godot-cpp/tools/godotcpp.py
# Disable exception handling. Godot doesn't use exceptions anywhere, and this
# saves around 20% of binary size and very significant build time.
#if env["disable_exceptions"]:
# if env.get("is_msvc", False):
# env.Append(CPPDEFINES=[("_HAS_EXCEPTIONS", 0)])
# else:
# env.Append(CXXFLAGS=["-fno-exceptions"])
#elif env.get("is_msvc", False):
# env.Append(CXXFLAGS=["/EHsc"])
Default(library)
================================================
FILE: Terrain3D.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.7.34024.191
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Terrain3D", "Terrain3D.vcxproj", "{B8850C81-3339-46A9-9668-CAA004E84629}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B8850C81-3339-46A9-9668-CAA004E84629}.Debug|x64.ActiveCfg = Debug|x64
{B8850C81-3339-46A9-9668-CAA004E84629}.Debug|x64.Build.0 = Debug|x64
{B8850C81-3339-46A9-9668-CAA004E84629}.Debug|x86.ActiveCfg = Debug|Win32
{B8850C81-3339-46A9-9668-CAA004E84629}.Debug|x86.Build.0 = Debug|Win32
{B8850C81-3339-46A9-9668-CAA004E84629}.Release|x64.ActiveCfg = Release|x64
{B8850C81-3339-46A9-9668-CAA004E84629}.Release|x64.Build.0 = Release|x64
{B8850C81-3339-46A9-9668-CAA004E84629}.Release|x86.ActiveCfg = Release|Win32
{B8850C81-3339-46A9-9668-CAA004E84629}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {119F9825-B9FE-4F51-9225-7EA96BF5BF7F}
EndGlobalSection
EndGlobal
================================================
FILE: Terrain3D.vcxproj
================================================
DebugWin32ReleaseWin32Debugx64Releasex6417.0Win32Proj{b8850c81-3339-46a9-9668-caa004e84629}Terrain3D10.0Applicationtruev143UnicodeApplicationfalsev143trueUnicodeMakefiletruev143UnicodeApplicationfalsev143trueUnicodescons dev_build=yesscons dev_build=yesscons --clean$(SolutionDir)\src;$(SolutionDir)\godot-cpp\gdextension;$(SolutionDir)\godot-cpp\gen\include;$(SolutionDir)\godot-cpp\include/std:c++17.vs.vsGDEXTENSIONLevel3trueWIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)trueConsoletrueLevel3truetruetrueWIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)trueConsoletruetruetrueLevel3true_DEBUG;_CONSOLE;%(PreprocessorDefinitions)trueConsoletrue.vs/Terrain3D-build.logLevel3truetruetrueNDEBUG;_CONSOLE;%(PreprocessorDefinitions)trueConsoletruetruetrueDocument
================================================
FILE: Terrain3D.vcxproj.filters
================================================
{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms{cddadac5-d2a5-45b0-947d-d3e2b055c87c}{4FC737F1-C7A5-4376-A066-2A32D752A2FF}cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx{93995380-89BD-4b04-88EB-625FBE52EBFB}h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd{fa4f3a1c-e2a4-4421-9b19-e15c14fce184}{0d771ba6-8e4a-4985-895c-d9b8eec8b3fd}5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers5. Headers6. C++6. C++6. C++6. C++6. C++6. C++6. C++6. C++6. C++6. C++6. C++6. C++6. C++6. C++6. C++1. Project Files1. Project Files1. Project Files1. Project Files1. Project Files1. Project Files1. Project Files1. Project Files1. Project Files4. Shaders4. Shaders4. Shaders1. Project Files1. Project Files2. Docs2. Docs2. Docs2. Docs4. Shaders4. Shaders4. Shaders4. Shaders2. Docs1. Project Files2. Docs2. Docs1. Project Files2. Docs2. Docs2. Docs2. Docs2. Docs1. Project Files1. Project Files1. Project Files2. Docs2. Docs2. Docs1. Project Files4. Shaders2. Docs2. Docs4. Shaders2. Docs4. Shaders2. Docs2. Docs4. Shaders4. Shaders4. Shaders2. Docs4. Shaders4. Shaders1. Project Files4. Shaders1. Project Files2. Docs2. Docs2. Docs2. Docs2. Docs2. Docs2. Docs2. Docs2. Docs2. Docs2. Docs2. Docs1. Project Files2. Docs2. Docs4. Shaders1. Project Files3. XML3. XML3. XML3. XML3. XML3. XML3. XML3. XML3. XML3. XML3. XML
================================================
FILE: Terrain3D.vcxproj.user
================================================
falsec:\gd\bin\Godot_v4.5.1-stable_win64.exe-e project.godotprojectWindowsLocalDebugger
================================================
FILE: doc/Makefile
================================================
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
install:
python -m venv .venv && \
. .venv/bin/activate && \
pip install -r requirements.txt && \
echo "Setup complete. Remember to run 'source .venv/bin/activate' to activate the virtual environment."
serve:
source ./.venv/bin/activate && \
make html && \
python -m http.server --directory _build/html
================================================
FILE: doc/_static/theme_overrides.css
================================================
/* override table width restrictions */
.wy-table-responsive table td, .wy-table-responsive table th {
white-space: normal;
}
.wy-table-responsive {
margin-bottom: 24px;
max-width: 100%;
overflow: visible;
}
================================================
FILE: doc/api/class_terrain3d.rst
================================================
:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/master/../_plugins/Terrain3D/doc/doc_classes/Terrain3D.xml.
.. _class_Terrain3D:
Terrain3D
=========
**Inherits:** ``Node3D``
.. rst-class:: classref-introduction-group
Description
-----------
Terrain3D is a high performance, editable terrain system for Godot 4. It provides a clipmap based terrain that supports terrains from 64x64m up to 65.5x65.5km with multiple LODs, 32 textures, and editor tools for importing or creating terrains.
This class handles mesh generation, and management of the whole system. See `System Architecture `__ for design details.
.. rst-class:: classref-reftable-group
Properties
----------
.. table::
:widths: auto
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| :ref:`Terrain3DAssets` | :ref:`assets` | |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``Shader`` | :ref:`buffer_shader_override` | |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`buffer_shader_override_enabled` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| RenderingServer.ShadowCastingSetting | :ref:`cast_shadows` | ``1`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``Node3D`` | :ref:`clipmap_target` | |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| :ref:`Terrain3DCollision` | :ref:`collision` | |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`collision_layer` | ``1`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`collision_mask` | ``1`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| :ref:`CollisionMode` | :ref:`collision_mode` | ``1`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``float`` | :ref:`collision_priority` | ``1.0`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`collision_radius` | ``64`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`collision_shape_size` | ``16`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``Node3D`` | :ref:`collision_target` | |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``float`` | :ref:`cull_margin` | ``0.0`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| :ref:`Terrain3DData` | :ref:`data` | |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``String`` | :ref:`data_directory` | ``""`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| :ref:`DebugLevel` | :ref:`debug_level` | ``0`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``float`` | :ref:`displacement_scale` | ``1.0`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``float`` | :ref:`displacement_sharpness` | ``0.25`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`free_editor_textures` | ``true`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| GeometryInstance3D.GIMode | :ref:`gi_mode` | ``1`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| :ref:`Terrain3DInstancer` | :ref:`instancer` | |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| :ref:`InstancerMode` | :ref:`instancer_mode` | ``1`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``float`` | :ref:`label_distance` | ``0.0`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`label_size` | ``48`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| :ref:`Terrain3DMaterial` | :ref:`material` | |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`mesh_lods` | ``7`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`mesh_size` | ``48`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`mouse_layer` | ``32`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| RenderingServer.ShadowCastingSetting | :ref:`ocean_cast_shadows` | ``0`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``float`` | :ref:`ocean_cull_margin` | ``20.0`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`ocean_enabled` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| GeometryInstance3D.GIMode | :ref:`ocean_gi_mode` | ``0`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``Node3D`` | :ref:`ocean_light_target` | |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``Material`` | :ref:`ocean_material` | |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`ocean_mesh_lods` | ``7`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`ocean_mesh_size` | ``32`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`ocean_render_layers` | ``1`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`ocean_tessellation_level` | ``0`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``float`` | :ref:`ocean_vertex_spacing` | ``4.0`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``PhysicsMaterial`` | :ref:`physics_material` | |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| :ref:`RegionSize` | :ref:`region_size` | ``256`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`render_layers` | ``2147483649`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`save_16_bit` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_autoshader` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_checkered` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_colormap` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_contours` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_control_angle` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_control_blend` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_control_scale` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_control_texture` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_displacement_buffer` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_grey` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_grid` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_heightmap` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_instancer_grid` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_jaggedness` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_navigation` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_region_grid` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_roughmap` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_texture_albedo` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_texture_ao` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_texture_height` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_texture_normal` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_texture_rough` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``bool`` | :ref:`show_vertex_grid` | ``false`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``int`` | :ref:`tessellation_level` | ``0`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``String`` | :ref:`version` | ``"1.1.0-dev"`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
| ``float`` | :ref:`vertex_spacing` | ``1.0`` |
+-------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------+
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``Mesh`` | :ref:`bake_mesh`\ (\ lod\: ``int``, filter\: :ref:`HeightFilter` = 0\ ) |const| |
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``PackedVector3Array`` | :ref:`generate_nav_mesh_source_geometry`\ (\ global_aabb\: ``AABB``, require_nav\: ``bool`` = true\ ) |const| |
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``Camera3D`` | :ref:`get_camera`\ (\ ) |const| |
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``Vector3`` | :ref:`get_clipmap_target_position`\ (\ ) |const| |
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``Vector3`` | :ref:`get_collision_target_position`\ (\ ) |const| |
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Terrain3DEditor` | :ref:`get_editor`\ (\ ) |const| |
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``Vector3`` | :ref:`get_intersection`\ (\ src_pos\: ``Vector3``, direction\: ``Vector3``, gpu_mode\: ``bool`` = false\ ) |
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``Object`` | :ref:`get_plugin`\ (\ ) |const| |
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``Dictionary`` | :ref:`get_raycast_result`\ (\ src_pos\: ``Vector3``, direction\: ``Vector3``, collision_mask\: ``int`` = 4294967295, exclude_terrain\: ``bool`` = false\ ) |const| |
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_camera`\ (\ camera\: ``Camera3D``\ ) |
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_editor`\ (\ editor\: :ref:`Terrain3DEditor`\ ) |
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_plugin`\ (\ plugin\: ``Object``\ ) |
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`snap`\ (\ ) |
+-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Signals
-------
.. _class_Terrain3D_signal_assets_changed:
.. rst-class:: classref-signal
**assets_changed**\ (\ ) :ref:`🔗`
Emitted when :ref:`assets` is changed.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_signal_material_changed:
.. rst-class:: classref-signal
**material_changed**\ (\ ) :ref:`🔗`
Emitted when :ref:`material` is changed.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Enumerations
------------
.. _enum_Terrain3D_DebugLevel:
.. rst-class:: classref-enumeration
enum **DebugLevel**: :ref:`🔗`
.. _class_Terrain3D_constant_ERROR:
.. rst-class:: classref-enumeration-constant
:ref:`DebugLevel` **ERROR** = ``0``
Errors and warnings always print.
.. _class_Terrain3D_constant_INFO:
.. rst-class:: classref-enumeration-constant
:ref:`DebugLevel` **INFO** = ``1``
Typically every function call and other important informational messages.
.. _class_Terrain3D_constant_DEBUG:
.. rst-class:: classref-enumeration-constant
:ref:`DebugLevel` **DEBUG** = ``2``
Detailed steps within functions.
.. _class_Terrain3D_constant_EXTREME:
.. rst-class:: classref-enumeration-constant
:ref:`DebugLevel` **EXTREME** = ``3``
Messages for continuous operations like snapping and editing.
.. rst-class:: classref-item-separator
----
.. _enum_Terrain3D_RegionSize:
.. rst-class:: classref-enumeration
enum **RegionSize**: :ref:`🔗`
.. _class_Terrain3D_constant_SIZE_64:
.. rst-class:: classref-enumeration-constant
:ref:`RegionSize` **SIZE_64** = ``64``
The region size is 64 x 64 meters, vertices, and pixels on Image maps.
.. _class_Terrain3D_constant_SIZE_128:
.. rst-class:: classref-enumeration-constant
:ref:`RegionSize` **SIZE_128** = ``128``
The region size is 128 x 128 meters, vertices, and pixels on Image maps.
.. _class_Terrain3D_constant_SIZE_256:
.. rst-class:: classref-enumeration-constant
:ref:`RegionSize` **SIZE_256** = ``256``
The region size is 256 x 256 meters, vertices, and pixels on Image maps. (default)
.. _class_Terrain3D_constant_SIZE_512:
.. rst-class:: classref-enumeration-constant
:ref:`RegionSize` **SIZE_512** = ``512``
The region size is 512 x 512 meters, vertices, and pixels on Image maps.
.. _class_Terrain3D_constant_SIZE_1024:
.. rst-class:: classref-enumeration-constant
:ref:`RegionSize` **SIZE_1024** = ``1024``
The region size is 1024 x 1024 meters, vertices, and pixels on Image maps.
.. _class_Terrain3D_constant_SIZE_2048:
.. rst-class:: classref-enumeration-constant
:ref:`RegionSize` **SIZE_2048** = ``2048``
The region size is 2048 x 2048 meters, vertices, and pixels on Image maps.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Property Descriptions
---------------------
.. _class_Terrain3D_property_assets:
.. rst-class:: classref-property
:ref:`Terrain3DAssets` **assets** :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_assets**\ (\ value\: :ref:`Terrain3DAssets`\ )
- :ref:`Terrain3DAssets` **get_assets**\ (\ )
The list of texture and mesh assets used by Terrain3D. You can optionally save this as an external ``.tres`` text file if you wish to share it with Terrain3D nodes in other scenes.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_buffer_shader_override:
.. rst-class:: classref-property
``Shader`` **buffer_shader_override** :ref:`🔗`
.. 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 `contributing one `__!
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_buffer_shader_override_enabled:
.. rst-class:: classref-property
``bool`` **buffer_shader_override_enabled** = ``false`` :ref:`🔗`
.. 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 `contributing one `__!
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_cast_shadows:
.. rst-class:: classref-property
RenderingServer.ShadowCastingSetting **cast_shadows** = ``1`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_cast_shadows**\ (\ value\: RenderingServer.ShadowCastingSetting\ )
- RenderingServer.ShadowCastingSetting **get_cast_shadows**\ (\ )
Tells the renderer how to cast shadows from the terrain onto other objects. This sets ``GeometryInstance3D.ShadowCastingSetting`` in the engine.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_clipmap_target:
.. rst-class:: classref-property
``Node3D`` **clipmap_target** :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_clipmap_target**\ (\ value\: ``Node3D``\ )
- ``Node3D`` **get_clipmap_target**\ (\ )
The terrain clipmap mesh and lods will center itself at the position of this node. If null, or if in the editor, it will fall back to the camera position. See :ref:`set_camera()`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_collision:
.. rst-class:: classref-property
:ref:`Terrain3DCollision` **collision** :ref:`🔗`
.. rst-class:: classref-property-setget
- :ref:`Terrain3DCollision` **get_collision**\ (\ )
The active :ref:`Terrain3DCollision` object.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_collision_layer:
.. rst-class:: classref-property
``int`` **collision_layer** = ``1`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_collision_layer**\ (\ value\: ``int``\ )
- ``int`` **get_collision_layer**\ (\ )
The physics layers the terrain lives on. Sets ``CollisionObject3D.collision_layer``.
Alias for :ref:`Terrain3DCollision.layer`.
Also see :ref:`collision_mask`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_collision_mask:
.. rst-class:: classref-property
``int`` **collision_mask** = ``1`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_collision_mask**\ (\ value\: ``int``\ )
- ``int`` **get_collision_mask**\ (\ )
The physics layers the physics body scans for colliding objects. Sets ``CollisionObject3D.collision_mask``.
Alias for :ref:`Terrain3DCollision.mask`.
Also see :ref:`collision_layer`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_collision_mode:
.. rst-class:: classref-property
:ref:`CollisionMode` **collision_mode** = ``1`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_collision_mode**\ (\ value\: :ref:`CollisionMode`\ )
- :ref:`CollisionMode` **get_collision_mode**\ (\ )
The selected mode determines if collision is generated and how. See :ref:`CollisionMode` for details.
Alias for :ref:`Terrain3DCollision.mode`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_collision_priority:
.. rst-class:: classref-property
``float`` **collision_priority** = ``1.0`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_collision_priority**\ (\ value\: ``float``\ )
- ``float`` **get_collision_priority**\ (\ )
The priority with which the physics server uses to solve collisions. The higher the priority, the lower the penetration of a colliding object. Sets ``CollisionObject3D.collision_priority``.
Alias for :ref:`Terrain3DCollision.priority`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_collision_radius:
.. rst-class:: classref-property
``int`` **collision_radius** = ``64`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_collision_radius**\ (\ value\: ``int``\ )
- ``int`` **get_collision_radius**\ (\ )
If :ref:`collision_mode` is Dynamic, this is the distance range within which collision shapes will be generated.
Alias for :ref:`Terrain3DCollision.radius`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_collision_shape_size:
.. rst-class:: classref-property
``int`` **collision_shape_size** = ``16`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_collision_shape_size**\ (\ value\: ``int``\ )
- ``int`` **get_collision_shape_size**\ (\ )
If :ref:`collision_mode` is Dynamic, this is the size of each collision shape.
Alias for :ref:`Terrain3DCollision.shape_size`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_collision_target:
.. rst-class:: classref-property
``Node3D`` **collision_target** :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_collision_target**\ (\ value\: ``Node3D``\ )
- ``Node3D`` **get_collision_target**\ (\ )
In dynamic mode, the terrain collision will center itself at the position of this node. If null, it will fall back to the :ref:`clipmap_target` position and failing that will use the camera position. The camera is always used in the editor. See :ref:`set_camera()`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_cull_margin:
.. rst-class:: classref-property
``float`` **cull_margin** = ``0.0`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_cull_margin**\ (\ value\: ``float``\ )
- ``float`` **get_cull_margin**\ (\ )
This margin is added to the vertical component of the terrain mesh bounding boxes (AABB). The terrain already sets its AABB from :ref:`Terrain3DData.get_height_range()`, which is calculated while sculpting. This setting only needs to be used if the shader has expanded the terrain beyond the AABB and the terrain meshes are being culled at certain viewing angles. This might happen from using :ref:`Terrain3DMaterial.world_background` with NOISE and a height value larger than the terrain heights. This setting is similar to ``GeometryInstance3D.extra_cull_margin``, but it only affects the Y axis.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_data:
.. rst-class:: classref-property
:ref:`Terrain3DData` **data** :ref:`🔗`
.. rst-class:: classref-property-setget
- :ref:`Terrain3DData` **get_data**\ (\ )
This class manages loading, saving, adding, and removing of Terrain3DRegions and access to their content.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_data_directory:
.. rst-class:: classref-property
``String`` **data_directory** = ``""`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_data_directory**\ (\ value\: ``String``\ )
- ``String`` **get_data_directory**\ (\ )
The directory where terrain data will be saved to and loaded from.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_debug_level:
.. rst-class:: classref-property
:ref:`DebugLevel` **debug_level** = ``0`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_debug_level**\ (\ value\: :ref:`DebugLevel`\ )
- :ref:`DebugLevel` **get_debug_level**\ (\ )
The verbosity of debug messages printed to the console. Errors and warnings are always printed. This can also be set via command line using ``--terrain3d-debug=LEVEL`` where ``LEVEL`` is one of ``ERROR, INFO, DEBUG, EXTREME``. The last includes continuously recurring messages like position updates for the mesh as the camera moves around.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_displacement_scale:
.. rst-class:: classref-property
``float`` **displacement_scale** = ``1.0`` :ref:`🔗`
.. 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`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_displacement_sharpness:
.. rst-class:: classref-property
``float`` **displacement_sharpness** = ``0.25`` :ref:`🔗`
.. 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`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_free_editor_textures:
.. rst-class:: classref-property
``bool`` **free_editor_textures** = ``true`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_free_editor_textures**\ (\ value\: ``bool``\ )
- ``bool`` **get_free_editor_textures**\ (\ )
Frees ground textures used for editing in _ready(). These textures are used to generate the TextureArrays, so if you don't change any :ref:`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 :ref:`Terrain3DAssets.clear_textures()`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_gi_mode:
.. rst-class:: classref-property
GeometryInstance3D.GIMode **gi_mode** = ``1`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_gi_mode**\ (\ value\: GeometryInstance3D.GIMode\ )
- GeometryInstance3D.GIMode **get_gi_mode**\ (\ )
Tells the renderer which global illumination mode to use for the terrain mesh. This sets ``GeometryInstance3D.gi_mode`` in the engine.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_instancer:
.. rst-class:: classref-property
:ref:`Terrain3DInstancer` **instancer** :ref:`🔗`
.. rst-class:: classref-property-setget
- :ref:`Terrain3DInstancer` **get_instancer**\ (\ )
The active :ref:`Terrain3DInstancer` object.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_instancer_mode:
.. rst-class:: classref-property
:ref:`InstancerMode` **instancer_mode** = ``1`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_instancer_mode**\ (\ value\: :ref:`InstancerMode`\ )
- :ref:`InstancerMode` **get_instancer_mode**\ (\ )
Normal - Generates MultiMeshInstance3Ds and renders all instances as normal.
Disabled - prevents the instancer from creating any MultiMeshInstance3Ds.
Alias for :ref:`Terrain3DInstancer.mode`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_label_distance:
.. rst-class:: classref-property
``float`` **label_distance** = ``0.0`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_label_distance**\ (\ value\: ``float``\ )
- ``float`` **get_label_distance**\ (\ )
If label_distance is non-zero (try 1024-4096) it will generate and display region coordinates in the viewport so you can identify the exact region files you are editing. This setting is the visible distance of the labels.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_label_size:
.. rst-class:: classref-property
``int`` **label_size** = ``48`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_label_size**\ (\ value\: ``int``\ )
- ``int`` **get_label_size**\ (\ )
Sets the font size for region labels. See :ref:`label_distance`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_material:
.. rst-class:: classref-property
:ref:`Terrain3DMaterial` **material** :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_material**\ (\ value\: :ref:`Terrain3DMaterial`\ )
- :ref:`Terrain3DMaterial` **get_material**\ (\ )
A custom material for Terrain3D. You can optionally save this as an external ``.tres`` text file if you wish to share it with instances of Terrain3D in other scenes. See :ref:`Terrain3DMaterial`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_mesh_lods:
.. rst-class:: classref-property
``int`` **mesh_lods** = ``7`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_mesh_lods**\ (\ value\: ``int``\ )
- ``int`` **get_mesh_lods**\ (\ )
The number of lods generated for the terrain meshes. Enable wireframe mode in the viewport to see them.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_mesh_size:
.. rst-class:: classref-property
``int`` **mesh_size** = ``48`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_mesh_size**\ (\ value\: ``int``\ )
- ``int`` **get_mesh_size**\ (\ )
The correlated size of the terrain meshes. Lod0 has ``4*mesh_size + 2`` quads per side. E.g. when mesh_size=8, lod0 has 34 quads to a side, including 2 quads for seams.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_mouse_layer:
.. rst-class:: classref-property
``int`` **mouse_layer** = ``32`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_mouse_layer**\ (\ value\: ``int``\ )
- ``int`` **get_mouse_layer**\ (\ )
Godot supports 32 render layers. For most objects, only layers 1-20 are available for selection in the inspector. 21-32 are settable via code, and are considered reserved for editor plugins.
This variable sets the editor render layer (21-32) to be used by ``get_intersection``, which the mouse cursor uses.
You may place other objects on this layer, however ``get_intersection`` will report intersections with them. So either dedicate this layer to Terrain3D, or if you must use all 32 layers, dedicate this one during editing or when using ``get_intersection``, and then you can use it during game play.
See :ref:`get_intersection()`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_ocean_cast_shadows:
.. rst-class:: classref-property
RenderingServer.ShadowCastingSetting **ocean_cast_shadows** = ``0`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_ocean_cast_shadows**\ (\ value\: RenderingServer.ShadowCastingSetting\ )
- RenderingServer.ShadowCastingSetting **get_ocean_cast_shadows**\ (\ )
Tells the renderer how to cast shadows from the ocean onto other objects. This sets ``GeometryInstance3D.ShadowCastingSetting`` in the engine.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_ocean_cull_margin:
.. rst-class:: classref-property
``float`` **ocean_cull_margin** = ``20.0`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_ocean_cull_margin**\ (\ value\: ``float``\ )
- ``float`` **get_ocean_cull_margin**\ (\ )
This margin is added to the vertical component of the ocean mesh bounding boxes (AABB). When you set the height of your waves in the shader, this margin should be adjusted. If it's too small, the meshes will clip at certain camera angles. If you set it too large, the renderer may have slightly more work to do. This setting is similar to ``GeometryInstance3D.extra_cull_margin``, but it only affects the Y axis.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_ocean_enabled:
.. rst-class:: classref-property
``bool`` **ocean_enabled** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_ocean_enabled**\ (\ value\: ``bool``\ )
- ``bool`` **is_ocean_enabled**\ (\ )
Generates another clipmap mesh, which you can apply an ocean shader to and configure independently of the terrain mesh.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_ocean_gi_mode:
.. rst-class:: classref-property
GeometryInstance3D.GIMode **ocean_gi_mode** = ``0`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_ocean_gi_mode**\ (\ value\: GeometryInstance3D.GIMode\ )
- GeometryInstance3D.GIMode **get_ocean_gi_mode**\ (\ )
Tells the renderer which global illumination mode to use for the ocean mesh. This sets ``GeometryInstance3D.gi_mode`` in the engine.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_ocean_light_target:
.. rst-class:: classref-property
``Node3D`` **ocean_light_target** :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_ocean_light_target**\ (\ value\: ``Node3D``\ )
- ``Node3D`` **get_ocean_light_target**\ (\ )
This sets the _light_direction and _light_color uniforms in the ocean shader, if they are present. You can use this for light scattering, detecting if the light is above the horizon, albedo coloring, etc.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_ocean_material:
.. rst-class:: classref-property
``Material`` **ocean_material** :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_ocean_material**\ (\ value\: ``Material``\ )
- ``Material`` **get_ocean_material**\ (\ )
You can assign a ``StandardMaterial`` here for testing, but you really need a ``ShaderMaterial``. Start with the example in ``addons/terrain_3d/extras/shaders/M_ocean.tres``, which you can build on. Or use any of the ocean shaders available around the internet, provided you set `skip_vertex_transform` and copy the geomorphing code from our `vertex()` shader, which will properly handle the LOD transitions on the clipmap.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_ocean_mesh_lods:
.. rst-class:: classref-property
``int`` **ocean_mesh_lods** = ``7`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_ocean_mesh_lods**\ (\ value\: ``int``\ )
- ``int`` **get_ocean_mesh_lods**\ (\ )
The number of lods generated for the ocean meshes. Enable wireframe mode in the viewport to see them.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_ocean_mesh_size:
.. rst-class:: classref-property
``int`` **ocean_mesh_size** = ``32`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_ocean_mesh_size**\ (\ value\: ``int``\ )
- ``int`` **get_ocean_mesh_size**\ (\ )
The correlated size of the ocean meshes. Lod0 has ``4*ocean_mesh_size + 2`` quads per side. E.g. when ocean_mesh_size=8, lod0 has 34 quads to a side, including 2 quads for seams.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_ocean_render_layers:
.. rst-class:: classref-property
``int`` **ocean_render_layers** = ``1`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_ocean_render_layers**\ (\ value\: ``int``\ )
- ``int`` **get_ocean_render_layers**\ (\ )
The render layers the ocean is drawn on. This sets ``VisualInstance3D.layers`` in the engine.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_ocean_tessellation_level:
.. rst-class:: classref-property
``int`` **ocean_tessellation_level** = ``0`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_ocean_tessellation_level**\ (\ value\: ``int``\ )
- ``int`` **get_ocean_tessellation_level**\ (\ )
This setting creates up to 6 additional subdivisions of the ocean mesh below LOD0, which provides more vertices for the vertex shader if desired. You can see it in wireframe mode.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_ocean_vertex_spacing:
.. rst-class:: classref-property
``float`` **ocean_vertex_spacing** = ``4.0`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_ocean_vertex_spacing**\ (\ value\: ``float``\ )
- ``float`` **get_ocean_vertex_spacing**\ (\ )
The distance between vertices, settable up to 100. Godot units are typically considered to be meters. This laterally scales the ocean vertices on X and Z axes, but does not scale wave height.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_physics_material:
.. rst-class:: classref-property
``PhysicsMaterial`` **physics_material** :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_physics_material**\ (\ value\: ``PhysicsMaterial``\ )
- ``PhysicsMaterial`` **get_physics_material**\ (\ )
Applies a ``PhysicsMaterial`` override to the entire terrain StaticBody.
Alias for :ref:`Terrain3DCollision.physics_material` See that entry for details.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_region_size:
.. rst-class:: classref-property
:ref:`RegionSize` **region_size** = ``256`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **change_region_size**\ (\ value\: :ref:`RegionSize`\ )
- :ref:`RegionSize` **get_region_size**\ (\ )
The number of vertices in each region, and the number of pixels for each map in :ref:`Terrain3DRegion`. 1 pixel always corresponds to 1 vertex. :ref:`vertex_spacing` laterally scales regions, but does not change the number of vertices or pixels in each.
There is no undo for this operation. However you can apply it again to reslice, as long as your data doesn't hit the maximum boundaries.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_render_layers:
.. rst-class:: classref-property
``int`` **render_layers** = ``2147483649`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_render_layers**\ (\ value\: ``int``\ )
- ``int`` **get_render_layers**\ (\ )
The render layers the terrain is drawn on. This sets ``VisualInstance3D.layers`` in the engine. The defaults is layer 1 and 32 (for the mouse cursor). When you set this via code, make sure the layer for :ref:`mouse_layer` is included, or set that variable again after this so that the mouse cursor and :ref:`get_intersection()` work.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_save_16_bit:
.. rst-class:: classref-property
``bool`` **save_16_bit** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_save_16_bit**\ (\ value\: ``bool``\ )
- ``bool`` **get_save_16_bit**\ (\ )
If enabled, heightmaps are saved as 16-bit half-precision to reduce file size. Files are always loaded in 32-bit for editing. Upon save, a copy of the heightmap is converted to 16-bit for writing. It does not change what is currently in memory.
This process is lossy. 16-bit precision gets increasingly worse with every power of 2. At a height of 256m, the precision interval is .25m. At 512m it is .5m. At 1024m it is 1m. Saving a height of 1024.4m will be rounded down to 1024m.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_autoshader:
.. rst-class:: classref-property
``bool`` **show_autoshader** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_autoshader**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_autoshader**\ (\ )
Displays the area designated for use by the autoshader, which shows materials based upon slope.
Alias for :ref:`Terrain3DMaterial.show_autoshader`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_checkered:
.. rst-class:: classref-property
``bool`` **show_checkered** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_checkered**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_checkered**\ (\ )
Shows a checkerboard display using a shader rendered pattern. This is turned on if the Texture List is empty.
Note that when a blank texture slot is created, a 1k checkerboard texture is generated and stored in the texture slot. That takes VRAM. The two patterns have a slightly different scale.
Alias for :ref:`Terrain3DMaterial.show_checkered`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_colormap:
.. rst-class:: classref-property
``bool`` **show_colormap** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_colormap**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_colormap**\ (\ )
Shows the color map in the albedo channel.
Alias for :ref:`Terrain3DMaterial.show_colormap`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_contours:
.. rst-class:: classref-property
``bool`` **show_contours** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_contours**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_contours**\ (\ )
Overlays contour lines on the terrain. Customize the options in the material when enabled. Press `4` with the mouse in the viewport to toggle.
Alias for :ref:`Terrain3DMaterial.show_contours`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_control_angle:
.. rst-class:: classref-property
``bool`` **show_control_angle** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_control_angle**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_control_angle**\ (\ )
Albedo shows the painted angle. Orange means 0°, Yellow 270°, Cyan 180°, Violet 90°. Or warm colors towards -Z, cool colors +Z, greens/yellows +X, reds/blues -X. Draw all angles coming from the center of a circle for a better understanding.
Alias for :ref:`Terrain3DMaterial.show_control_angle`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_control_blend:
.. rst-class:: classref-property
``bool`` **show_control_blend** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_control_blend**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_control_blend**\ (\ )
Displays the values used to blend the textures. Blue shows the autoshader blending, red shows manually painted blending.
Alias for :ref:`Terrain3DMaterial.show_control_blend`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_control_scale:
.. rst-class:: classref-property
``bool`` **show_control_scale** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_control_scale**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_control_scale**\ (\ )
Albedo shows the painted scale. Larger scales are more red, smaller scales are more blue. 0.5 middle grey is the default 100% scale.
Alias for :ref:`Terrain3DMaterial.show_control_scale`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_control_texture:
.. rst-class:: classref-property
``bool`` **show_control_texture** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_control_texture**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_control_texture**\ (\ )
Albedo shows the base and overlay texture indices defined by the control map. Red pixels indicate the base texture, with brightness showing texture ids 0 to 31. Green pixels indicate the overlay texture. Yellow indicates both.
Alias for :ref:`Terrain3DMaterial.show_control_texture`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_displacement_buffer:
.. rst-class:: classref-property
``bool`` **show_displacement_buffer** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_displacement_buffer**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_displacement_buffer**\ (\ )
Alias for :ref:`Terrain3DMaterial.show_displacement_buffer`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_grey:
.. rst-class:: classref-property
``bool`` **show_grey** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_grey**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_grey**\ (\ )
Albedo is set to 0.2 grey.
Alias for :ref:`Terrain3DMaterial.show_grey`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_grid:
.. rst-class:: classref-property
``bool`` **show_grid** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_region_grid**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_region_grid**\ (\ )
Alias for :ref:`Terrain3DMaterial.show_region_grid`. Press `1` with the mouse in the viewport to toggle.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_heightmap:
.. rst-class:: classref-property
``bool`` **show_heightmap** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_heightmap**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_heightmap**\ (\ )
Albedo is a white to black gradient depending on height. The gradient is scaled to a height of 300, so above that or far below 0 will be all white or black.
Alias for :ref:`Terrain3DMaterial.show_heightmap`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_instancer_grid:
.. rst-class:: classref-property
``bool`` **show_instancer_grid** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_instancer_grid**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_instancer_grid**\ (\ )
Overlays the 32x32m instancer grid on the terrain, which shows how the instancer data is partitioned. Press `2` with the mouse in the viewport to toggle.
Alias for :ref:`Terrain3DMaterial.show_instancer_grid`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_jaggedness:
.. rst-class:: classref-property
``bool`` **show_jaggedness** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_jaggedness**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_jaggedness**\ (\ )
Highlights non-smooth areas of the terrain. Jagged peaks, troughs, or edges that are a bit rough with sharp angles between vertices.
Alias for :ref:`Terrain3DMaterial.show_jaggedness`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_navigation:
.. rst-class:: classref-property
``bool`` **show_navigation** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_navigation**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_navigation**\ (\ )
Displays the area designated for generating the navigation mesh.
Alias for :ref:`Terrain3DMaterial.show_navigation`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_region_grid:
.. rst-class:: classref-property
``bool`` **show_region_grid** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_region_grid**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_region_grid**\ (\ )
Overlays the region grid on the terrain. This is more accurate than the region grid gizmo for determining where the region border is when editing. Press `1` with the mouse in the viewport to toggle.
Alias for :ref:`Terrain3DMaterial.show_region_grid`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_roughmap:
.. rst-class:: classref-property
``bool`` **show_roughmap** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_roughmap**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_roughmap**\ (\ )
Albedo is set to the roughness modification map as grey scale. Middle grey, 0.5 means no roughness modification. Black would be high gloss while white is very rough.
Alias for :ref:`Terrain3DMaterial.show_roughmap`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_texture_albedo:
.. rst-class:: classref-property
``bool`` **show_texture_albedo** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
- |void| **set_show_texture_albedo**\ (\ value\: ``bool``\ )
- ``bool`` **get_show_texture_albedo**\ (\ )
Albedo textures are shown only. Other channels are excluded.
Alias for :ref:`Terrain3DMaterial.show_texture_albedo`.
.. rst-class:: classref-item-separator
----
.. _class_Terrain3D_property_show_texture_ao:
.. rst-class:: classref-property
``bool`` **show_texture_ao** = ``false`` :ref:`🔗