A multi-threaded mapper for Minetest with node transparency support.
It generates a view of the world from above, rendering one pixel per voxel.
First, compile the project with cargo:
bash
cargo build --release
Then, call the executable target/release/minetest-worldmapper
with the three required arguments:
| Option | Short | Description | | -------- | ----- | ----------------------------------------- | | --world | -w | The directory of the world to render. | | --config | -c | The config file. The format should follow the config format. | | --output | -o | The image file which the map should be rendered to. |
bash
minetest-worldmapper --world TestWorld/ --config config.example.toml --output map.png
If a voxel is rendered and its color are entirely determined by the config file. An example config file is part of this repo. Its main purpose is to map content IDs to colors.
| Config option | Type | Description |
| ------------------ | ------------ | ----------------------------------- |
| version
| Integer | Config version. Currently always 1. |
| background_color
| String | Hex color string in the format "rrggbb" or "rrggbbaa". Serves as a fallback color if all voxels for a given pixel are exhausted and there is transparency left. |
| target_alpha
| Integer | When determining a pixel's color, stop going through transparent nodes when reaching this opacity value. Between 0 and 255. |
| node_colors
| Table | A mapping from content names to color strings in the same format as background_color
. |
The crate minetestworld is the basis for this renderer.