Skip to content

Commit

Permalink
Update docs; Fix clearing import
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Jan 6, 2025
1 parent e09d684 commit 39d71ec
Show file tree
Hide file tree
Showing 57 changed files with 348 additions and 196 deletions.
22 changes: 11 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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 with Cory to make sure your efforts are aligned with other plans.
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)
Expand All @@ -16,16 +16,16 @@ If you wish to take on a major component, it's best to join our [discord server]

## 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
* `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
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Cory Petkovsek, Roope Palmroos, and Contributors.
Copyright (c) 2025 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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Terrain3D
A high performance, editable terrain system for Godot 4.


## Features
* Written in C++ as a GDExtension addon, which works with official engine builds
* Can be accessed by GDScript, C#, and any language Godot supports
Expand All @@ -14,7 +15,6 @@ A high performance, editable terrain system for Godot 4.
* Sculpting, holes, texture painting, texture detiling, painting colors and wetness
* Imports 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

Expand All @@ -33,7 +33,7 @@ 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).
And other contributors displayed on the right of the github page and in [AUTHORS.md](https://terrain3d.readthedocs.io/en/stable/docs/authors.html).

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.

Expand Down
3 changes: 1 addition & 2 deletions Terrain3D.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@
<None Include="doc\docs\double_precision.md" />
<None Include="doc\docs\games.md" />
<None Include="doc\docs\instancer.md" />
<None Include="doc\docs\misc.md" />
<None Include="doc\docs\platforms.md" />
<None Include="doc\docs\nightly_builds.md" />
<None Include="doc\docs\press.md" />
<None Include="doc\docs\data_format.md" />
<None Include="doc\docs\heightmaps.md" />
<None Include="doc\docs\texture_painting.md" />
<None Include="doc\docs\user_interface.md" />
<None Include="doc\index.rst" />
Expand All @@ -216,7 +216,6 @@
</ItemGroup>
<ItemGroup>
<Text Include=".readthedocs.yaml" />
<Text Include="doc\docs\project_status.md" />
<Text Include="doc\docs\import_export.md" />
<Text Include="doc\docs\programming_languages.md" />
<Text Include="doc\docs\occlusion_culling.md" />
Expand Down
9 changes: 3 additions & 6 deletions Terrain3D.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@
<None Include="doc\docs\games.md">
<Filter>2. Docs</Filter>
</None>
<None Include="doc\docs\misc.md">
<Filter>2. Docs</Filter>
</None>
<None Include="doc\docs\instancer.md">
<Filter>2. Docs</Filter>
</None>
Expand Down Expand Up @@ -238,6 +235,9 @@
<None Include="project\addons\terrain_3d\extras\minimum.gdshader">
<Filter>4. Shaders</Filter>
</None>
<None Include="doc\docs\heightmaps.md">
<Filter>2. Docs</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Text Include=".readthedocs.yaml">
Expand All @@ -258,9 +258,6 @@
<Text Include="doc\docs\occlusion_culling.md">
<Filter>2. Docs</Filter>
</Text>
<Text Include="doc\docs\project_status.md">
<Filter>2. Docs</Filter>
</Text>
<Text Include="doc\docs\shader_design.md">
<Filter>2. Docs</Filter>
</Text>
Expand Down
6 changes: 3 additions & 3 deletions doc/api/class_terrain3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1104,13 +1104,13 @@ The main caveats of using this mode is that the call to get_intersection() reque



This mode can also be used by your plugins and games, such as a space ship firing lasers at the terrain and causing an explosion at the hit point. However if the calls aren't continuous, you'll need to call once to capture the viewport image, wait for it to be drawn, then call again to get the result:
This mode can also be used by your plugins and games, such as a space ship firing lasers at the terrain and causing an explosion at the hit point. However if the calls aren't continuous, eg driven by the mouse, you'll need to call once to capture the viewport image, wait for it to be drawn, then call again to get the result:

::

var target_point = terrain.get_intersection(camera_pos, camera_dir)
var target_point = terrain.get_intersection(camera_pos, camera_dir, true)
await RenderingServer.frame_post_draw
target_point = terrain.get_intersection(camera_pos, camera_dir)
target_point = terrain.get_intersection(camera_pos, camera_dir, true)



Expand Down
2 changes: 1 addition & 1 deletion doc/api/class_terrain3ddata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ Returns ``Vector3(base texture id, overlay id, blend value)``.

Returns ``Vector3(NAN, NAN, NAN)`` if the position is a hole or outside of defined regions.

This is often used for playing footstep sounds. It's up to the gamedev to determine which is visually apparent based on shader settings.
This is often used for playing sounds on footsteps. It's up to the gamedev to determine which is visually apparent based on shader settings.

Due to blending, it won't be pixel perfect. Try having your player controller print this value while walking around to see how the blending values look. Perhaps you'll find that the overlay texture is visible starting at a blend value of .3 to .5, otherwise the base is visible. You can also observe the control blend debug view with :ref:`Terrain3DMaterial.show_control_blend<class_Terrain3DMaterial_property_show_control_blend>`.

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'Terrain3D'
copyright = '2024 Cory Petkovsek, Roope Palmroos, and Contributors'
copyright = '2025 Cory Petkovsek, Roope Palmroos, and Contributors'
author = 'Cory Petkovsek, Roope Palmroos, and Contributors'
release = '1.0.0'

Expand Down
2 changes: 1 addition & 1 deletion doc/doc_classes/Terrain3DData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
<description>
Returns [code skip-lint]Vector3(base texture id, overlay id, blend value)[/code].
Returns [code skip-lint]Vector3(NAN, NAN, NAN)[/code] if the position is a hole or outside of defined regions.
This is often used for playing footstep sounds. It's up to the gamedev to determine which is visually apparent based on shader settings.
This is often used for playing sounds on footsteps. It's up to the gamedev to determine which is visually apparent based on shader settings.
Due to blending, it won't be pixel perfect. Try having your player controller print this value while walking around to see how the blending values look. Perhaps you'll find that the overlay texture is visible starting at a blend value of .3 to .5, otherwise the base is visible. You can also observe the control blend debug view with [member Terrain3DMaterial.show_control_blend].
Observing how this is done in The Witcher 3, there are only about 6 sounds used (snow, foliage, dirt, gravel, rock, wood), and except for wood, they are not pixel perfect. Wood is easy to do by detecting if the player is walking on wood meshes. The other 5 sounds are played when the player is in an area where the textures are blending. So it might play rock while over a dirt area. This shows pixel perfect accuracy is not important. It will still provide a seamless audio visual experience.
</description>
Expand Down
1 change: 1 addition & 0 deletions doc/docs/controlmap_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ We process each uint32 pixel as a bit field with the following definition, start
* We use a FORMAT_RF 32-bit float Image or Texture to allocate the memory. Then in C++, we read or write each uint32 pixel directly into the "float" memory. The values are meaningless when interpreted as floats. We don't convert the integer values to float, so there is no precision loss. Godot shaders support usamplers so we can interpret the memory directly as uint32, without requiring any conversion.
* Gamedevs can use the conversion and testing functions found in Terrain3DUtil defined in [C++](https://github.com/TokisanGames/Terrain3D/blob/main/src/terrain_3d_util.h) and [GDScript](../api/class_terrain3dutil.rst).
* Possible future plans for reserved bits:
* 2 bits - Hole and Navigation might be stored elsewhere, freeing up 2 bits
* 5 bits - 32 paintable particles
* 3 bits - paintable slope array index+
* 2 bits - 4 layers (including Hole above, eg water, non-destructive, hole, normal mesh)
Expand Down
5 changes: 3 additions & 2 deletions doc/docs/games.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ Terrain3D is being used in the following games. To add yours, submit it to the #
| [Pest Apocalypse](https://store.steampowered.com/app/2506810/Pest_Apocalypse/) | [Kikimora Games](https://x.com/KikimoraGames) | Post-apocalyptic pizza delivery
| [Forg](https://store.steampowered.com/app/2807130/Forg/) | [Crow Games](https://www.youtube.com/@crowgamesdev) | FPS tower defense
| [open-fpsz](https://gitlab.com/open-fpsz/open-fpsz) | [anyreso](https://mastodon.gamedev.place/@anyreso) | Open-source, Tribes-like FPS multiplayer shooter
| [Element](https://devanew.itch.io/element) | [Luke Aaron](https://www.youtube.com/watch?v=b18jDnY1YS4) | Gamejam FPS tactial shooter

## Tech Demos
## Demos

| Game | Studio | Description |
|------|--------|-------------|
| [Landscape Demo](https://github.com/OverfortGames/LandscapeDemo) | [Overfort Games](https://x.com/OverfortGames) | Island demo w/ source
| [Island Demo](https://github.com/OverfortGames/LandscapeDemo) | [Overfort Games](https://x.com/OverfortGames) | Island demo w/ source
| [Jungle Demo](https://wrobot.itch.io/jungledemo) | [WrobotGames](https://x.com/wrobot123) | Godot rendering demo in a jungle
Loading

0 comments on commit 39d71ec

Please sign in to comment.