Skip to content

Commit

Permalink
Merge branch 'godot4'
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
#	addons/zylann.hterrain/native/factory.gd
#	addons/zylann.hterrain/native/hterrain.gdnlib
#	addons/zylann.hterrain/tools/globalmap_baker.gd
#	addons/zylann.hterrain/tools/packed_textures/texture_layered_importer.gd
  • Loading branch information
Zylann committed Jul 18, 2023
2 parents 9c6e5c6 + 3270d32 commit 7c73ffb
Show file tree
Hide file tree
Showing 185 changed files with 5,336 additions and 6,257 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# Godot-specific ignores
.import/
.godot/
export.cfg
export_presets.cfg

Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@ This is a high-level changelog for each released versions of the plugin.
For a more detailed list of past and incoming changes, see the commit history.


1.6.2 (dev)
------------
1.7
------

This version requires Godot 4.1.

- Ported the plugin to Godot 4.1
- Heightmaps now use 32-bit floats instead of 16-bit floats
- Changed some APIs to use `Vector2i`
- Added `cast_shadow` setting to `HTerrain`
- Added `cast_shadow` setting to `HTerrainDetailLayer`
- Added slope limit slider to detail density painting
- Exposed `roughness` in detail layer shader (but reflections may be off due to the normals hack)
- Allow decimal values in `min_height` and `max_height` when importing a heightmap
- Changed shape list in brush settings so it can be used as a regular palette when cycling is off
- Fixed terrain not functional when using a 32-bit version of Godot (The GDNative library is only maintained for 64-bit)
- Fixed TextureSet editor logging errors when selecting slots with textures using color codes instead of image files
- Fixed texture list becoming empty when selecting another terrain sharing the same TextureSet
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ HeightMap terrain plugin for Godot Engine

![Editor screenshot](https://user-images.githubusercontent.com/1311555/49705861-a5275380-fc19-11e8-8338-9ad364d2db8d.png)

Heightmap-based terrain for Godot 3.3.x, 3.4.x and 3.5.x.
It supports texture painting, colouring, holes, level of detail and grass, while still targeting the Godot API.

**Note:** The current Godot `master` branch isn't supported yet. Use Godot 3.3.x or higher if you want to use this plugin.
Heightmap-based terrain for Godot 4.1.
It supports texture painting, colouring, holes, level of detail and grass, while still targetting the Godot API.

This repository holds the latest development version, which means it has the latest features but can also have bugs.
For a "stable" version, use the asset library or download from a commit tagged with a version.
The `master` branch is the latest development version, and may have bugs. Some major features can also be in other branches until they are done. For release versions, check the Git branches named after those versions, like `0.10`.

To get the last version that supported Godot 3.0.6, checkout [branch `0.10`](https://github.com/Zylann/godot_heightmap_plugin/tree/0.10).

To get the last version that supported Godot 3.x, checkout [branch `godot3`](https://github.com/Zylann/godot_heightmap_plugin/tree/godot3)


Installation
--------------
Expand Down
2 changes: 1 addition & 1 deletion addons/zylann.hterrain/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
HeightMap terrain for Godot Engine
------------------------------------

Copyright (c) 2016-2020 Marc Gilleron
Copyright (c) 2016-2023 Marc Gilleron

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:

Expand Down
9 changes: 6 additions & 3 deletions addons/zylann.hterrain/doc/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ This written doc should be the most up to date and precise information, but vide

### How to install

You will need to use Godot 3.1 or later. It is best to use latest stable 3.x version (Godot 4 is not supported yet).
You will need to use Godot 4.1 or later.

To get the last version that supported Godot 3.x, checkout the `godot3` branch in the Git repository.

#### Automatically

Expand Down Expand Up @@ -127,14 +129,15 @@ As you sculpt, the plugin automatically recomputes normals of the terrain, and s
You can enable or disable collisions by checking the `Collisions enabled` property in the inspector.

Heightmap-based terrains usually implement collisions directly using the heightmap, which saves a lot of computations compared to a classic mesh collider.
This plugin depends on the **Bullet Physics** integration in Godot, which does have a height-field collider. **Godot Physics** does not support it until version 3.4, so if you use an older version, you may want to make sure Bullet is enabled in your project settings:

![Screenshot of the option to choose physics engines in project settings](images/choose_bullet_physics.png)

Some editor tools rely on colliders to work, such as snapping to ground or plugins like Scatter or other prop placement utilities. To make sure the collider is up to date, you can force it to update after sculpting with the `Terrain -> Update Editor Collider` menu:

![Screenshot of the menu to update the collider](images/update_editor_collider.png)

Note: if you use Godot 3.3, you need to make sure to use the Bullet physics engine in your project settings.


#### Known issues

Expand Down Expand Up @@ -770,7 +773,7 @@ A list of `uniform` parameters are recognized, some of which are required for he

Parameter name | Type | Format | Description
------------------------------------|------------------|---------|--------------
`u_terrain_heightmap` | `sampler2D` | `RH` | The heightmap, a half-precision float texture which can be sampled in the red channel. Like the other following maps, you have to access it using cell coordinates, which can be computed as seen in the built-in shader.
`u_terrain_heightmap` | `sampler2D` | `RH` | The heightmap, a 32-bit float texture which can be sampled in the red channel. Like the other following maps, you have to access it using cell coordinates, which can be computed as seen in the built-in shader.
`u_terrain_normalmap` | `sampler2D` | `RGB8` | The precalculated normalmap of the terrain, which you can use instead of computing it from the heightmap
`u_terrain_colormap` | `sampler2D` | `RGBA8` | The color map, which is the one modified by the color brush. The alpha channel is used for holes.
`u_terrain_splatmap` | `sampler2D` | `RGBA8` | The classic 4-component splatmap, where each channel determines the weight of a given texture. The sum of each channel across all splatmaps must be 1.0.
Expand Down
Loading

0 comments on commit 7c73ffb

Please sign in to comment.