Skip to content

Commit

Permalink
Merge pull request #1 from PHS-TSA/terrain
Browse files Browse the repository at this point in the history
Terrain
  • Loading branch information
MattsAttack authored Mar 20, 2024
2 parents 14c26e0 + 78183e4 commit 6cae5dc
Show file tree
Hide file tree
Showing 111 changed files with 4,800 additions and 32 deletions.
21 changes: 21 additions & 0 deletions addons/terrain_3d/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 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.
44 changes: 44 additions & 0 deletions addons/terrain_3d/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<img src="doc/docs/images/terrain3d.png">

# Terrain3D
A high performance, editable terrain system for Godot 4.

## Features
* Written in C++ as a GDExtension plugin, which works with official engine builds
* Can be accessed by GDScript, C#, and any language Godot supports
* Geometric Clipmap Mesh Terrain, as used in The Witcher 3. See [System Architecture](https://terrain3d.readthedocs.io/en/stable/docs/system_architecture.html)
* Up to 16k x 16k in 1k regions (imagine multiple islands without paying for 16k^2 vram)
* Up to 10 Levels of Detail (LODs)
* Up to 32 texture sets using albedo, normal, roughness, height
* Sculpting, holes, texture painting, texture detiling, painting colors and wetness
* Supports importing heightmaps from [HTerrain](https://github.com/Zylann/godot_heightmap_plugin/), WorldMachine, Unity, Unreal and any tool that can export a heightmap (raw/r16/exr/+). See [importing data](https://terrain3d.readthedocs.io/en/stable/docs/import_export.html)

See [Project Status](https://terrain3d.readthedocs.io/en/stable/docs/project_status.html) for details.

## Getting Started

Read through our [documentation](https://terrain3d.readthedocs.io/en/stable/index.html), starting with [Installation](https://terrain3d.readthedocs.io/en/stable/docs/installation.html).

For support, read [Getting Help](https://terrain3d.readthedocs.io/en/stable/docs/getting_help.html) or join our [Discord server](https://tokisan.com/discord).

## Credit
Developed for the Godot community by:

|||
|--|--|
| **Cory Petkovsek, Tokisan Games** | [<img src="https://github.com/dmhendricks/signature-social-icons/blob/master/icons/round-flat-filled/35px/twitter.png?raw=true" width="24"/>](https://twitter.com/TokisanGames) [<img src="https://github.com/dmhendricks/signature-social-icons/blob/master/icons/round-flat-filled/35px/github.png?raw=true" width="24"/>](https://github.com/TokisanGames) [<img src="https://github.com/dmhendricks/signature-social-icons/blob/master/icons/round-flat-filled/35px/www.png?raw=true" width="24"/>](https://tokisan.com/) [<img src="https://github.com/dmhendricks/signature-social-icons/blob/master/icons/round-flat-filled/35px/discord.png?raw=true" width="24"/>](https://tokisan.com/discord) [<img src="https://github.com/dmhendricks/signature-social-icons/blob/master/icons/round-flat-filled/35px/youtube.png?raw=true" width="24"/>](https://www.youtube.com/@TokisanGames)|
| **Roope Palmroos, Outobugi Games** | [<img src="https://github.com/dmhendricks/signature-social-icons/blob/master/icons/round-flat-filled/35px/twitter.png?raw=true" width="24"/>](https://twitter.com/outobugi) [<img src="https://github.com/dmhendricks/signature-social-icons/blob/master/icons/round-flat-filled/35px/github.png?raw=true" width="24"/>](https://github.com/outobugi) [<img src="https://github.com/dmhendricks/signature-social-icons/blob/master/icons/round-flat-filled/35px/www.png?raw=true" width="24"/>](https://outobugi.com/) [<img src="https://github.com/dmhendricks/signature-social-icons/blob/master/icons/round-flat-filled/35px/youtube.png?raw=true" width="24"/>](https://www.youtube.com/@outobugi)|

And other contributors displayed on the right of the github page and in [AUTHORS.md](https://github.com/TokisanGames/Terrain3D/blob/main/AUTHORS.md).

Geometry clipmap mesh code created by [Mike J. Savage](https://mikejsavage.co.uk/blog/geometry-clipmaps.html). Blog and repository code released under the MIT license per email communication with Mike.

## 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 plugin has been released under the [MIT License](https://github.com/TokisanGames/Terrain3D/blob/main/LICENSE.txt).

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file added addons/terrain_3d/editor/brushes/acrylic1.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/circle0.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/circle1.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/circle2.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/circle3.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/circle4.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/hill1.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/hill2.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/mountain1.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/mountain2.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/mountain3.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/mountain4.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/peak1.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/peak2.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/peak3.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/ring1.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/smoke.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/square1.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/square2.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/square3.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/square4.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/square5.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/stones.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/terrain1.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/terrain2.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/terrain3.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/terrain4.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/terrain5.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/terrain6.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/texture1.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/texture2.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/texture3.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/texture4.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/texture5.exr
Binary file not shown.
Binary file added addons/terrain_3d/editor/brushes/vegetation1.exr
Binary file not shown.
28 changes: 28 additions & 0 deletions addons/terrain_3d/editor/components/bake_lod_dialog.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@tool
extends ConfirmationDialog

var lod: int = 0
var description: String = ""


func _ready() -> void:
set_unparent_when_invisible(true)
about_to_popup.connect(_on_about_to_popup)
visibility_changed.connect(_on_visibility_changed)
%LodBox.value_changed.connect(_on_lod_box_value_changed)


func _on_about_to_popup() -> void:
lod = %LodBox.value


func _on_visibility_changed() -> void:
# Change text on the autowrap label only when the popup is visible.
# Works around Godot issue #47005:
# https://github.com/godotengine/godot/issues/47005
if visible:
%DescriptionLabel.text = description


func _on_lod_box_value_changed(p_value: float) -> void:
lod = %LodBox.value
41 changes: 41 additions & 0 deletions addons/terrain_3d/editor/components/bake_lod_dialog.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[gd_scene load_steps=2 format=3 uid="uid://bhvrrmb8bk1bt"]

[ext_resource type="Script" path="res://addons/terrain_3d/editor/components/bake_lod_dialog.gd" id="1_57670"]

[node name="bake_lod_dialog" type="ConfirmationDialog"]
title = "Bake Terrain3D Mesh"
position = Vector2i(0, 36)
size = Vector2i(400, 115)
visible = true
script = ExtResource("1_57670")

[node name="VBoxContainer" type="VBoxContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 8.0
offset_top = 8.0
offset_right = -8.0
offset_bottom = -49.0
grow_horizontal = 2
grow_vertical = 2

[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 20

[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "LOD:"

[node name="LodBox" type="SpinBox" parent="VBoxContainer/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
max_value = 8.0
value = 4.0

[node name="DescriptionLabel" type="Label" parent="VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
autowrap_mode = 2
Loading

0 comments on commit 6cae5dc

Please sign in to comment.