Crates.io | minetest-worldmapper |
lib.rs | minetest-worldmapper |
version | 0.3.4 |
source | src |
created_at | 2022-02-25 19:00:42.178948 |
updated_at | 2023-12-24 11:43:46.036222 |
description | Minetest world mapper |
homepage | |
repository | https://github.com/UgnilJoZ/minetest-worldmapper |
max_upload_size | |
id | 539587 |
size | 133,760 |
A multi-threaded mapper for Minetest with node transparency support.
It generates a view of the world from above, rendering one pixel per voxel.
This project is currently tested on Linux only. If you have Windows and it doesn't work, please file a bug report. But if you have another OS and it does not work, please report also a bug.
First, compile the project with cargo:
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. |
Via the RUST_LOG
environment variable, you can choose one out of the log levels trace
, debug
, info
, warn
, and error
. The default is error
.
minetest-worldmapper --world TestWorld/ --config config.example.toml --output map.png
RUST_LOG=debug 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, which is based on TOML. An example config file is part of this repo. Its main purpose is to map the voxel content to colors.
Config option | Type | Description |
---|---|---|
sufficient_alpha |
Integer | (optional, defaults to 230 ) When determining a pixel's color, stop going through transparent nodes when reaching this opacity value. Between 0 and 255. |
background_color |
String | Hex color string; either in the format "rrggbb" (full opacity) or "rrggbbaa" (color with alpha value). Serves as a fallback color if all voxels for a given pixel are exhausted and there is transparency left. |
hillshading.enabled |
Boolean | (optional, defaults to true ) Enables terrain relief visualisation. |
hillshading.min_alpha |
Integer | (optional, defaults to 128 ) At which alpha value a node counts as "terrain" |
node_colors |
Table | Maps node itemstrings to color strings (which have the same format as background_color ). Every node not listed here is treated like air. |
background_color = "888888"
[node_colors]
"default:water_source" = "00228888"
LevelDB is not supported as backend.
Only map chunks with map format version 29 (the current) are supported.
The crate minetestworld is the basis for this renderer.