This mod aims to generate Minetest worlds from real topographical data (Digital Elevation Model).
I've been working for a while trying to generate maps of real places of the world, especially working with bobomb on his Real Terrain mod that was a great experiment, but faced huge stability problems because of the external libraries we needed to run in Lua to read the DEM image, or the hacky method that was implemented to read the image in pure Lua.
Here I come with a different approach. The image is not read in Lua but by a separate Python file (image_convert.py) that deals with the image and generate a database in the specified world directory, that is easily readable by Minetest natively.
This has the advantage of providing a very stable and proper code for the Lua mapgen.
This has the drawback of needing to prepare the world by running this Python file before.
This mod doesn't come with pre-loaded geographical data, it only provides the tools to use them. You need to find your data on the Internet. But I can help you :)
Spoiler
To generate your map:
- Find DEM (Digital Elevation Model) data of the region you want (I personally use SRTM that has one pixel every 93m). Download it in image format (usually GeoTiff).
You can use additional maps for land cover and rivers, this is explained in the README. - Launch Minetest, create a world and active this mod. Don't start the game for now!
- Use the python script provided by this mod (image_convert.py) to generate the database, by calling it like this:
This opens a configuration window with all the options you may need for your map.
Code: Select all
./image_convert.py
You might find some options a bit complicated, but you don't necessarily need to understand and tune everything. They are explained in the README.
It generates 2 files in the world dir: heightmap.dat which is the database itself, and heightmap.dat.conf, configuration file easily readable with text editor that allow to change some parameters (currently only scale is supported). - Now start the game and enjoy!
I hope this is clear enough. Please say it if you have any difficulty.
^ France and southern England
Spoiler
^ British Isles
^ Northern India. You're above the Ganga Plain, looking eastwards. You can make out the Ganges river bed at the right foreground, the Brahmaputra at the background, both converging in the huge Bengal Delta at the extreme right.
At the left the forests are gradually climbing up the Himalayas chain, until you reach the highest summits. The icy peak at the extreme left is the legendary Mount Everest. Beyond this mountain barrier stands the Tibet Plateau.
^ Iceland, with the famous Vatnajökull Glacier at the right background.
Spoiler
^ Mont Blanc, France, generated using tile #38-03, rivers disabled.
^ Great view over the Doubs valley, (France/Switzerland), and its curious hairpinned loop. Tile #38-03
^ Ardèche gorge using tile #37-04, French canyon very popular for kayaking (I did it this autumn and that's really something I'll remember!!)
I'll obviously make a screenshot with rivers enabled as soon as possible.
^ Fuji mountain in Japan, tile #64-05
^ Saar Loop in Germany, very nice landscape on tile #38-03. Screenshot needs to be updated too with the new rivers feature.
Download (Code on GitHub)
License: LGPL v2.1
This mod is still experimental and is not ready for regular use. The database format, especially, could change in future versions without backward compatibility.
I encourage you to report me any bug, or suggestion for the code (I think it could be optimized a lot). Any contribution would be appreciated.