What is it? an improved version of the python minetestmapper:
1. overhauled command line arguments
2. control the drawn region (--region, --minheight, and --maxheight options)
3. draw fog to have node further from the view point fade (--fog to control strength, --fogcolor to choose color)
4. draw cross-sections as well as top down view (--facing)
5. draw nodes that are larger than a single pixel (--pixelspernode option)
6. faster: 8 to 10 times faster than the original minetestmapper.py (but still slower than the c++ code)
The script is here: https://github.com/spillz/minetest/blob ... r-numpy.py
(repo is here: https://github.com/spillz/minetest)
You must have a recent python and numpy (see www.scipy.org) installed.
Performance
As a test I tried out the original and numpy versions of minetest mapper the on the Feb 25 posting of Stampy's world on Ubuntu laptop:
minetestmapper.py
Time 1m23s
Memory Usage: 52MB
minetestmapper-numpy.py
Time 10s
Memory Usage: 13MB
Examples
Examples using Morn76's Stampy's world:
Cross section (5 pixels per node)
Code: Select all
python minetestmapper-numpy.py --facing east --bgcolor lightblue --region 48 128 -384 -128 --drawscale --maxheight 64 --minheight -16 --pixelspernode 5 ~/.minetest/worlds/stampyworld stampye.png

Top view (3 pixels per node)

Command line arguments
Code: Select all
./minetestmapper-numpy.py -h
Code: Select all
usage: minetestmapper-numpy.py [-h] [--bgcolor COLOR] [--scalecolor COLOR]
[--origincolor COLOR] [--playercolor COLOR]
[--fogcolor COLOR] [--ugcolor COLOR]
[--drawscale] [--drawplayers] [--draworigin]
[--drawunderground]
[--drawunderground-standalone]
[--region XMIN XMAX ZMIN ZMAX]
[--maxheight YMAX] [--minheight YMIN]
[--pixelspernode PPN]
[--facing {up,down,north,south,east,west}]
[--fog FOGSTRENGTH]
world_dir [output]
A mapper for minetest
positional arguments:
world_dir the path to the world you want to map
output the output filename
optional arguments:
-h, --help show this help message and exit
--bgcolor COLOR set the background color (e.g. white or "#FFFFFF")
--scalecolor COLOR set the ruler and text color for the scale
--origincolor COLOR set the color for the map origin
--playercolor COLOR set the color for player markers
--fogcolor COLOR set the color for fog (default grey)
--ugcolor COLOR set the color for underground areas (default purple)
--drawscale draw a scale on the border of the map
--drawplayers draw markers for players
--draworigin draw the position of the origin (0,0)
--drawunderground draw underground areas overlaid on the map
--drawunderground-standalone
draw underground areas as a standalone map
--region XMIN XMAX ZMIN ZMAX
set the bounding x,z coordinates for the map (units
are nodes, default = -2000 2000 -2000 2000)
--maxheight YMAX don't draw above height YMAX (default = 500)
--minheight YMIN don't draw below height YMIN (defualt = -500)
--pixelspernode PPN number of pixels per node (default = 1)
--facing {up,down,north,south,east,west}
direction to face when drawing (north, south, east or
west will draw a cross-section)
--fog FOGSTRENGTH use fog strength of FOGSTRENGTH (0.0 by default, max
of 1.0)
1. Isometric view
2. GUI
3. Water transparency
4. Requests???