[Mod] Map generator with Rivers [mapgen_rivers]

User avatar
Gael de Sailly
Member
Posts: 774
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly Ginkgoo
Location: France

[Mod] Map generator with Rivers [mapgen_rivers]

by Gael de Sailly » Post

Map Generator with Rivers

I'm happy to introduce this new mapgen that I've been developing since April!
I had already posted my ideas on a previous topic and showed some screens, but now I consider this is out, even if I still need to rework parts of the code.

The concept is to generate landscapes that look realistic, by reproducing surface geological phenomenons like river flowing and erosion.

Its main particularity compared to conventional Minetest mapgens is that rivers flow strictly downhill, and combine together to form wider rivers, until they reach the sea. Another notable feature is the possibility of large lakes above sea level.

Important note: Unlike most other Minetest mods, it does not contain standalone Lua code, but it requires pre-processing with a separate Python program (included). The Python side deals with a data grid that represents the world at large scale. The Lua side performs actual map generation in-game. It upscales the grid data, and adds smaller-scale features.
+ Illustration of the concept
+ Technical features
+ ToDo List
Screenshots using mapgen_rivers + biomegen:
Image
+ More screenshots

Usage

mapgen_rivers contains by default a demo grid of 400x400 cells (corresponding to a 4800x4800 map), so you can start the game directly and it will generate using this demo grid, but it's better if you generate a new (and larger!) grid before every world creation.
  1. You need Python 3 with the libraries numpy, scipy and noise. Install them if they are not present.
    For example if you use pip package manager :

    Code: Select all

    pip install numpy scipy noise
  2. Execute the script generate.py and it will generate a 1000x1000 grid in 15-30 minutes. For basic use, use no arguments, or just append --mapsize=<size> to specify a size in cells per edge (default 1000). Check documentation for advanced use of the script.

    Example:

    Code: Select all

    ./generate.py --mapsize=1200
  3. You can start Minetest and create your world ; the grid will be copied on world init.

Download

Download zip / Browse on Github

Dependencies: default
Recommended: biomegen
--> biomegen was originally designed for being part of this project, until I realized it may have other uses.

License: GNU LGPL v3.0

Showcase server by Gundul:
gundul.ddnss.de, port 39155, come and have fun exploring the map!
Last edited by Gael de Sailly on Thu Nov 26, 2020 20:50, edited 4 times in total.
Just realize how bored we would be if the world was perfect.

User avatar
twoelk
Member
Posts: 1400
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by twoelk » Post

exciting!!

User avatar
Lone_Wolf
Member
Posts: 2412
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: Lone_Wolf or LoneWolfHT
In-game: Lone_Wolf
Location: Not there, THERE!

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Lone_Wolf » Post

Awesome work. Would be nice if this worked with other games too

Gundul
Member
Posts: 1079
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gundul » Post

This looks very interesting. I hope I will find some time to check this out next weekend.
My servers: Jungle, Lilly in the valley

User avatar
Panquesito7
Member
Posts: 11
Joined: Tue Jun 09, 2020 05:37
GitHub: Panquesito7
IRC: Panquesito7
In-game: Panquesito7
Location: Monterrey, México
Contact:

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Panquesito7 » Post

Very nice mod! Gotta have to test this mod soon! 👍
Cloud Items | The Algorithms developer | C++ & Lua coder | Teleport request (TPR) maintainer

MisterE
Member
Posts: 150
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by MisterE » Post

could the OP or others post some pre-generated maps that are 30000 x 30000 nodes? I tried installing the python libraries and ran into missing files problems with noise right away

MisterE
Member
Posts: 150
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by MisterE » Post

also, and this be confined to a certain y range using the other_worlds mod or similar?

User avatar
Gael de Sailly
Member
Posts: 774
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly Ginkgoo
Location: France

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gael de Sailly » Post

MisterE wrote:
Wed Nov 18, 2020 21:39
could the OP or others post some pre-generated maps that are 30000 x 30000 nodes? I tried installing the python libraries and ran into missing files problems with noise right away
What error do you get and what installation method do you use? For my part I use pip and all works fine. Also make sure you are on Python 3.

I'm thinking about stopping to use noise, I'm aware it has problems in some cases even if it works well for me. Also it has no seed system, and no 3D simplex noise (perlin noise is not adapted because its orthogonal nature would bias the rivers that are defined by noise gradients). I may switch to opensimplex instead.

About map size, for now I recommend not exceeding 2000x2000 grid (which would give a 24000x map by default, or 30000x with a blocksize of 15), the format in which the grid is saved is currently not adapted to big maps, because there is no way to load only a part of it. I should rework this, but this may lead to a break of compatibility with older worlds.

More pre-generated maps are a good idea, the mod currently includes one but it is quite small, to keep the download light (this demo map will load if you start the game directly). Also did you manage to use the one I posted the other day?
MisterE wrote:
Wed Nov 18, 2020 21:40
also, and this be confined to a certain y range using the other_worlds mod or similar?
For now there is nothing limiting in y range. I have no idea how my mod (and Lua mapgens in general) behave with multi-layers mods, but I think there is high risk of bugs, especially if the mod loading order is not controlled. I could look into some of them to see how they work and how I can make mapgen_rivers compatible.

Oooh, that's already many things to do... I should write a clean ToDo list before all, and even if I am under lockdown, I don't have unlimited time ;)
Just realize how bored we would be if the world was perfect.

Gundul
Member
Posts: 1079
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gundul » Post

This is really fun to play with and the generated maps look very good so far.
Very realistic flow of the rivers and the eroded valleys.

Do not miss out to install matplotlib and colorcet like suggested in the github repo page
and you will get informed by a nice generated map on your screen :)
My servers: Jungle, Lilly in the valley

Gundul
Member
Posts: 1079
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gundul » Post

Is there a way to make rivers deeper and wider ?
I played around a bit with different values, but it seems that river size is
depending on luck and initial map seed.

so far I had good results for small maps with this config :

Code: Select all

mapsize = 350
scale = 400
vscale = 400
offset = 0
persistence = 0.7
lacunarity = 2.0

K = 3
m = 0.35
d = 0.2
sea_level = 1
flex_radius = 30

time = 10
niter = 15
~              
My servers: Jungle, Lilly in the valley

User avatar
Gael de Sailly
Member
Posts: 774
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly Ginkgoo
Location: France

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gael de Sailly » Post

Thank you for your feedback! :)
Glad to see that you managed to use the generate script.
Gundul wrote:
Sat Nov 21, 2020 10:52
Do not miss out to install matplotlib and colorcet like suggested in the github repo page
and you will get informed by a nice generated map on your screen :)
Oh yes I should add this on the description on the forum.
I think I did a bad job writing this description, I should rewrite parts of it, and make it more attractive.
Also it's not too late to find a better name, I'm thinking of it.
Gundul wrote:
Sat Nov 21, 2020 17:25
Is there a way to make rivers deeper and wider ?
I played around a bit with different values, but it seems that river size is
depending on luck and initial map seed.
[...]
A river's width depends on its catchment basin (also called drainage basin: surface in which a water drop will eventually flow in a given river), so there are small and big rivers.
Catchment basins are calculated on Python side, but river width is also configurable on Lua side.

If you want to increase these catchment areas: make continents bigger! You can increase scale, or add an offset to terrain elevation (like offset = 30).
On Lua side, you can play with max catchment, in settings tab (or mapgen_rivers_max_catchment in minetest.conf), if you decrease it, you will have wider rivers. Technically it controls the catchment area at which rivers will reach their maximal width (they can't exceed 2 full cells in width = 24 nodes if blocksize is 12).
River depth : increase riverbed slope in settings tab.
Just realize how bored we would be if the world was perfect.

Gundul
Member
Posts: 1079
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gundul » Post

Gael de Sailly wrote:
Sat Nov 21, 2020 21:21
Gundul wrote:
Sat Nov 21, 2020 10:52
Do not miss out to install matplotlib and colorcet like suggested in the github repo page
and you will get informed by a nice generated map on your screen :)
Oh yes I should add this on the description on the forum.
I think I did a bad job writing this description, I should rewrite parts of it, and make it more attractive.
Also it's not too late to find a better name, I'm thinking of it.
I do not think it needs an other name. It does exactly what the name says.
And your description is good also, only I guess, most people are not too much interested into
technical details. Reading is inconvenient XD. If you like to attract people keep text low and
add pictures and/or clips. :)

The map is really important when generating new terrain. It gives you first glance even the script is
still calculating. Second, after finishing you can zoom in and out and you have a cursor saying the
exact coordinates by just pointing. Take that coords, multiply with 12, add any vertical value and
you can teleport exactly to any point on the map.
Gael de Sailly wrote:
Sat Nov 21, 2020 21:21

A river's width depends on its catchment basin (also called drainage basin: surface in which a water drop will eventually flow in a given river), so there are small and big rivers.
Catchment basins are calculated on Python side, but river width is also configurable on Lua side.

If you want to increase these catchment areas: make continents bigger! You can increase scale, or add an offset to terrain elevation (like offset = 30).
On Lua side, you can play with max catchment, in settings tab (or mapgen_rivers_max_catchment in minetest.conf), if you decrease it, you will have wider rivers. Technically it controls the catchment area at which rivers will reach their maximal width (they can't exceed 2 full cells in width = 24 nodes if blocksize is 12).
River depth : increase riverbed slope in settings tab.
Thanks that already helped a lot. I already got some very good results.
My servers: Jungle, Lilly in the valley

User avatar
Gael de Sailly
Member
Posts: 774
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly Ginkgoo
Location: France

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gael de Sailly » Post

Gundul wrote:
Sun Nov 22, 2020 10:39
And your description is good also, only I guess, most people are not too much interested into
technical details. Reading is inconvenient XD. If you like to attract people keep text low and
add pictures and/or clips. :)
Thanks for the advice!
Yes that's what I mean when I say it's bad. In fact I knew that some people were waiting for it, so I did not spend too much time on this description before releasing. In fact it's partly made of paragraphs I cut out in the Readme!
I think I will make a video presentation/tutorial, and a more "visual" description for the forum, with pictures and keywords. And the technical details should go in a spoiler.
Gundul wrote:
Sun Nov 22, 2020 10:39
The map is really important when generating new terrain. It gives you first glance even the script is
still calculating. Second, after finishing you can zoom in and out and you have a cursor saying the
exact coordinates by just pointing. Take that coords, multiply with 12, add any vertical value and
you can teleport exactly to any point on the map.
Oh yes I just see that I didn't say anything about map preview on the forum!
BTW you have another script to view the map, view_map.py, that accepts a scale parameter:

Code: Select all

view_map.py river_data 12
Just realize how bored we would be if the world was perfect.

User avatar
twoelk
Member
Posts: 1400
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by twoelk » Post

Would be great if Amidst for Minetest would have suport for this and could be used as seed preview tool
Last edited by twoelk on Tue Nov 24, 2020 14:37, edited 1 time in total.

MisterE
Member
Posts: 150
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by MisterE » Post

here is the error I get when I try to install noise:

Code: Select all

C:\Users\gbrru>pip install noise
Collecting noise
  Using cached noise-1.2.2.tar.gz (125 kB)
Building wheels for collected packages: noise
  Building wheel for noise (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\gbrru\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gbrru\\AppData\\Local\\Temp\\pip-install-cnak1m0u\\noise\\setup.py'"'"'; __file__='"'"'C:\\Users\\gbrru\\AppData\\Local\\Temp\\pip-install-cnak1m0u\\noise\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\gbrru\AppData\Local\Temp\pip-wheel-5sx6_gvk'
       cwd: C:\Users\gbrru\AppData\Local\Temp\pip-install-cnak1m0u\noise\
  Complete output (14 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\noise
  copying perlin.py -> build\lib.win-amd64-3.6\noise
  copying shader.py -> build\lib.win-amd64-3.6\noise
  copying shader_noise.py -> build\lib.win-amd64-3.6\noise
  copying test.py -> build\lib.win-amd64-3.6\noise
  copying __init__.py -> build\lib.win-amd64-3.6\noise
  running build_ext
  building 'noise._simplex' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for noise
  Running setup.py clean for noise
Failed to build noise
Installing collected packages: noise
    Running setup.py install for noise ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\gbrru\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gbrru\\AppData\\Local\\Temp\\pip-install-cnak1m0u\\noise\\setup.py'"'"'; __file__='"'"'C:\\Users\\gbrru\\AppData\\Local\\Temp\\pip-install-cnak1m0u\\noise\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\gbrru\AppData\Local\Temp\pip-record-l4mg4vvk\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\gbrru\appdata\local\programs\python\python36\Include\noise'
         cwd: C:\Users\gbrru\AppData\Local\Temp\pip-install-cnak1m0u\noise\
    Complete output (14 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\noise
    copying perlin.py -> build\lib.win-amd64-3.6\noise
    copying shader.py -> build\lib.win-amd64-3.6\noise
    copying shader_noise.py -> build\lib.win-amd64-3.6\noise
    copying test.py -> build\lib.win-amd64-3.6\noise
    copying __init__.py -> build\lib.win-amd64-3.6\noise
    running build_ext
    building 'noise._simplex' extension
    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\gbrru\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gbrru\\AppData\\Local\\Temp\\pip-install-cnak1m0u\\noise\\setup.py'"'"'; __file__='"'"'C:\\Users\\gbrru\\AppData\\Local\\Temp\\pip-install-cnak1m0u\\noise\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\gbrru\AppData\Local\Temp\pip-record-l4mg4vvk\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\gbrru\appdata\local\programs\python\python36\Include\noise' Check the logs for full command output.

I tried installing Microsoft C++ Build Tools but it must not have worked bc the error remains

Gundul
Member
Posts: 1079
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gundul » Post

Example map server:


For all those lazy reading and who love it even more convenient. A pregenerated map
with fly, fast, teleport and settime priv on a server.

The map:
Image

The server:

"rivers"
gundul.ddnss.de
port 39155

Check it out out and see one of the most realistic
mapgens in minetest !
My servers: Jungle, Lilly in the valley

User avatar
Gael de Sailly
Member
Posts: 774
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly Ginkgoo
Location: France

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gael de Sailly » Post

Oh thank you so much for your support! Very nice map on this server.
Logged on this evening, and discovered the spectacular landscapes around 1000;2000 (80;160 on the preview map), where the big (and very high) lake at the left flows into a complex canyon system.
+ Screenshots
Just realize how bored we would be if the world was perfect.

User avatar
Gael de Sailly
Member
Posts: 774
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly Ginkgoo
Location: France

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gael de Sailly » Post

MisterE wrote:
Mon Nov 23, 2020 13:35
here is the error I get when I try to install noise:

Code: Select all

C:\Users\gbrru>pip install noise
Collecting noise
  Using cached noise-1.2.2.tar.gz (125 kB)
Building wheels for collected packages: noise
  Building wheel for noise (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\gbrru\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gbrru\\AppData\\Local\\Temp\\pip-install-cnak1m0u\\noise\\setup.py'"'"'; __file__='"'"'C:\\Users\\gbrru\\AppData\\Local\\Temp\\pip-install-cnak1m0u\\noise\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\gbrru\AppData\Local\Temp\pip-wheel-5sx6_gvk'
       cwd: C:\Users\gbrru\AppData\Local\Temp\pip-install-cnak1m0u\noise\
  Complete output (14 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\noise
  copying perlin.py -> build\lib.win-amd64-3.6\noise
  copying shader.py -> build\lib.win-amd64-3.6\noise
  copying shader_noise.py -> build\lib.win-amd64-3.6\noise
  copying test.py -> build\lib.win-amd64-3.6\noise
  copying __init__.py -> build\lib.win-amd64-3.6\noise
  running build_ext
  building 'noise._simplex' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for noise
  Running setup.py clean for noise
Failed to build noise
Installing collected packages: noise
    Running setup.py install for noise ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\gbrru\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gbrru\\AppData\\Local\\Temp\\pip-install-cnak1m0u\\noise\\setup.py'"'"'; __file__='"'"'C:\\Users\\gbrru\\AppData\\Local\\Temp\\pip-install-cnak1m0u\\noise\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\gbrru\AppData\Local\Temp\pip-record-l4mg4vvk\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\gbrru\appdata\local\programs\python\python36\Include\noise'
         cwd: C:\Users\gbrru\AppData\Local\Temp\pip-install-cnak1m0u\noise\
    Complete output (14 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\noise
    copying perlin.py -> build\lib.win-amd64-3.6\noise
    copying shader.py -> build\lib.win-amd64-3.6\noise
    copying shader_noise.py -> build\lib.win-amd64-3.6\noise
    copying test.py -> build\lib.win-amd64-3.6\noise
    copying __init__.py -> build\lib.win-amd64-3.6\noise
    running build_ext
    building 'noise._simplex' extension
    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\gbrru\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\gbrru\\AppData\\Local\\Temp\\pip-install-cnak1m0u\\noise\\setup.py'"'"'; __file__='"'"'C:\\Users\\gbrru\\AppData\\Local\\Temp\\pip-install-cnak1m0u\\noise\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\gbrru\AppData\Local\Temp\pip-record-l4mg4vvk\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\gbrru\appdata\local\programs\python\python36\Include\noise' Check the logs for full command output.

I tried installing Microsoft C++ Build Tools but it must not have worked bc the error remains
I thought there were binaries available for Python libs on Windows, but apparently that's not the case.
For this I'm sorry but I don't have any experience of compilation under Windows (I work on Linux only).
Is anybody able to help MisterE?
Just realize how bored we would be if the world was perfect.

MisterE
Member
Posts: 150
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by MisterE » Post

well I have a linux VM, so Ill use that, and let you know about any problems

MisterE
Member
Posts: 150
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by MisterE » Post

Gundul wrote:
Mon Nov 23, 2020 18:00
Example map server:


For all those lazy reading and who love it even more convenient. A pregenerated map
with fly, fast, teleport and settime priv on a server.

The map:
Image

The server:

"rivers"
gundul.ddnss.de
port 39155

Check it out out and see one of the most realistic
mapgens in minetest !
There is a lot of lag when exploring. I am not complaining, but is there a simple explanation--- Is it that the server does not have a lot of resources, or is it that the mapgen is laggy in itself?

Gundul
Member
Posts: 1079
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gundul » Post

The server has a lack of resources. Even though the map is already calculated with /emergeblocks, it looks like some chunks are recalculated when visiting. The server hardware isn't made for calculating with lua mapgens. For just showing it is enough.

[Edit] should be better now
My servers: Jungle, Lilly in the valley

MisterE
Member
Posts: 150
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by MisterE » Post

so I installed the req'd packages with linux mint, and ran the script, and got this error.

Code: Select all

sudo python3 /usr/share/games/minetest/mods/mapgen_rivers/generate.py
terrain.conf river_data
Initializing model
Traceback (most recent call last):
  File "/usr/share/games/minetest/mods/mapgen_rivers/generate.py", line 98, in <module>
    terrainlib.update(model.dem, model.lakes, t=5, title='Initializing...')
  File "/usr/share/games/minetest/mods/mapgen_rivers/terrainlib/view.py", line 52, in update
    view_map(*args, **kwargs)
  File "/usr/share/games/minetest/mods/mapgen_rivers/terrainlib/view.py", line 34, in view_map
    plt.imshow(np.flipud(rgb), extent=extent, interpolation='antialiased')
  File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 2671, in imshow
    __ret = gca().imshow(
  File "/usr/lib/python3/dist-packages/matplotlib/__init__.py", line 1601, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "/usr/lib/python3/dist-packages/matplotlib/cbook/deprecation.py", line 369, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/matplotlib/cbook/deprecation.py", line 369, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/matplotlib/axes/_axes.py", line 5675, in imshow
    im = mimage.AxesImage(self, cmap, norm, interpolation, origin, extent,
  File "/usr/lib/python3/dist-packages/matplotlib/image.py", line 855, in __init__
    super().__init__(
  File "/usr/lib/python3/dist-packages/matplotlib/image.py", line 214, in __init__
    self.set_interpolation(interpolation)
  File "/usr/lib/python3/dist-packages/matplotlib/image.py", line 756, in set_interpolation
    raise ValueError('Illegal interpolation string')
ValueError: Illegal interpolation string
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_share_games_minetest_mods_mapgen_rivers_generate.py.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/share/games/minetest/mods/mapgen_rivers/generate.py", line 98, in <module>
    terrainlib.update(model.dem, model.lakes, t=5, title='Initializing...')
  File "/usr/share/games/minetest/mods/mapgen_rivers/terrainlib/view.py", line 52, in update
    view_map(*args, **kwargs)
  File "/usr/share/games/minetest/mods/mapgen_rivers/terrainlib/view.py", line 34, in view_map
    plt.imshow(np.flipud(rgb), extent=extent, interpolation='antialiased')
  File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 2671, in imshow
    __ret = gca().imshow(
  File "/usr/lib/python3/dist-packages/matplotlib/__init__.py", line 1601, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
  File "/usr/lib/python3/dist-packages/matplotlib/cbook/deprecation.py", line 369, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/matplotlib/cbook/deprecation.py", line 369, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/matplotlib/axes/_axes.py", line 5675, in imshow
    im = mimage.AxesImage(self, cmap, norm, interpolation, origin, extent,
  File "/usr/lib/python3/dist-packages/matplotlib/image.py", line 855, in __init__
    super().__init__(
  File "/usr/lib/python3/dist-packages/matplotlib/image.py", line 214, in __init__
    self.set_interpolation(interpolation)
  File "/usr/lib/python3/dist-packages/matplotlib/image.py", line 756, in set_interpolation
    raise ValueError('Illegal interpolation string')
ValueError: Illegal interpolation string


here is my config file:

Code: Select all


mapsize = 1000
scale = 400
vscale = 8000
offset = 0
persistence = 0.6
lacunarity = 2.0

K = 2
m = 0.35
d = 0.2
sea_level = 0
flex_radius = 20

time = 10
niter = 10

I dont have the module colorcet installed... I couldnt find it on my repo's package list, and pip3 isnt installing to python3's directory. So to install modules I was using sudo apt install python3-lib_name

It seems to be working if I remove the package python3-matplotlib

Gundul
Member
Posts: 1079
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gundul » Post

I think I found the lag problem an the server. I generated again the map and disabled now
biomegen and river_mapgen mod. First tests look like lagfree now, please try again:

"rivers"
gundul.ddnss.de
Port: 39155
My servers: Jungle, Lilly in the valley

Gundul
Member
Posts: 1079
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gundul » Post

MisterE wrote:
Tue Nov 24, 2020 22:48
so I installed the req'd packages with linux mint, and ran the script, and got this error.

Code: Select all

sudo python3 /usr/share/games/minetest/mods/mapgen_rivers/generate.py

I think it has nothing to do with your config file.
And maybe you should not run generate.py as superuser.

I am running ubuntu 18.04 (mint is also a derivate of ubuntu).
I just followed the discriptions on the github page and it worked for me.

generate.py was executable for me. If it is not for you try "chmod 777 generate.py"
Last edited by Gundul on Wed Nov 25, 2020 17:17, edited 1 time in total.
My servers: Jungle, Lilly in the valley

User avatar
Gael de Sailly
Member
Posts: 774
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly Ginkgoo
Location: France

Re: [Mod] Map generator with Rivers [mapgen_rivers]

by Gael de Sailly » Post

MisterE wrote:
Tue Nov 24, 2020 22:48
so I installed the req'd packages with linux mint, and ran the script, and got this error.

[...]

I dont have the module colorcet installed... I couldnt find it on my repo's package list, and pip3 isnt installing to python3's directory. So to install modules I was using sudo apt install python3-lib_name

It seems to be working if I remove the package python3-matplotlib
I think your version of matplotlib is outdated (this is quite common with package managers), and it makes the script crash. I will see how to fix this (I want the calculation to keep working at least, if matplotlib fails).
Colorcet is fully optional, it should not have anything to do with this. Just the map preview is going to be a bit weird because matplotlib's built-in color maps look so bad :)
Gundul wrote:
Wed Nov 25, 2020 05:38
I think I found the lag problem an the server. I generated again the map and disabled now
biomegen and river_mapgen mod. First tests look like lagfree now, please try again:

"rivers"
gundul.ddnss.de
Port: 39155
Ok cool, will come here again :)
For the lag problem: is there something to be fixed in my mod?
Just realize how bored we would be if the world was perfect.

Post Reply

Who is online

Users browsing this forum: StarNinjas and 5 guests