From 944a898d480d19e3f3cb1a21c22631950c282eec Mon Sep 17 00:00:00 2001 From: MJacred Date: Mon, 28 Aug 2023 20:11:02 +0200 Subject: [PATCH] Update docs --- README.md | 10 ++++++---- docs/raw-example.md | 13 ++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 75b926a..4615469 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # Blender Mesh to RAW file Exporter -Exports your selected object's mesh as a heightmap `.raw` file with -* 16-bit or 24-bit unsigned integer value -* endianness: little or big +Exports your selected object's mesh as a heightmap file in the formats +* `.raw` + * bit depth: 16, 24 or 32 (unsigned integer value) + * endianness: little or big +* OpenEXR (32-bit float) Tested import with the following heightmap terrain engines * [Zylann's Heightmap Plugin](https://github.com/Zylann/godot_heightmap_plugin) @@ -13,7 +15,7 @@ The most common method to create a heightmap in Blender is to use the camera in But not everybody supports 16-bit PNG (e.g. [Godot does not](https://github.com/godotengine/godot/pull/19497)). Then there's the the full (32-bit; not necessarily supported in target platform) or single channel half (16-bit) precision floating-point method using [_OpenEXR_](https://blender.stackexchange.com/questions/191253/how-to-render-height-map-in-blender), where you'll have to know if your target platform needs floats in the range of 0..1 or real height values (in meters). You could later remap e.g. 0..1 to real heights, but the precision loss there is not acceptable. Precision loss often results in _stepping artifacts_. And then you have to be careful of Blender's color management: the color space needs to be linear, not e.g. sRGB. And use the correct [map height value](https://github.com/Zylann/godot_heightmap_plugin/issues/90#issuecomment-536215938) in your material. -And I tried all that, even working with Blender's compositor and reading the camera's z-depth. [Nothing gave good results](https://github.com/Zylann/godot_heightmap_plugin/issues/327). Hence this add-on, which uses real height information and directly reads the vertices' z-value and converts float to 16- or 24-bit unsigned integers for the `.raw` file. +And I tried all that, even working with Blender's compositor and reading the camera's z-depth. [Nothing gave good results](https://github.com/Zylann/godot_heightmap_plugin/issues/327). Hence this add-on, which uses real height information and directly reads the vertices' z-value and converts them as needed. ## Installation diff --git a/docs/raw-example.md b/docs/raw-example.md index 581f7b6..2271d03 100644 --- a/docs/raw-example.md +++ b/docs/raw-example.md @@ -10,8 +10,9 @@ * clicking on `Get Status` gives you feedback on your Mesh: check your resolution and copy your min and max height values, * specify the location and filename to save to * choose your bit-depth - * 24-bit (better for maps with high difference between min and max value ([1](https://github.com/Zylann/godot_heightmap_plugin/issues/340#issuecomment-1222655581), [2: slide 17](https://www.gdcvault.com/play/1025480/Terrain-Rendering-in-Far-Cry))) - * 16-bit + * 32-bit (best results) + * 24-bit (good results) + * 16-bit (potentially bad results) * choose your endianness (default: little) * click `Export` and you get your mesh as a heightmap file (`.raw`) * Done @@ -24,11 +25,9 @@ In Godot, with Zylann's Heightmap Plugin, you import your `.raw` file like `.png`, `.exr`, etc. Import settings -* Raw Endianess: The one you chose on your export -* godot4 branch: - * Once [this PR](https://github.com/Zylann/godot_heightmap_plugin/pull/369) is merged, you can import 24-bit raw files. Bit-depth is auto-detected. -* main branch (for Godot 3.x) - * expects 16-bit raw file; **does not support 24-bit import!** +* Bit depth and Raw Endianess: The ones you chose on your export +* for Godot 3.x: + * only supports 16-bit raw file * `Min Height` + `Max Height`: take them from the Add-on Panel in Blender, see `Min-Max`. ![Imported map in Godot using Zylann's Heightmap Plugin](images/godot_zylanns_hm_plugin.png)