[Mod] Map generator with Rivers [mapgen_rivers]

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

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

by voxelproof » Post

Gael de Sailly wrote:
Sun Aug 01, 2021 17:31

Releasing Mapgen Rivers v1.0

You're great, man.

Now everything makes sense again. Building worlds has become a real mystical adventure, an opportunity of tresspassing seemingly impassable existential threshold of so-called "reality", a daring feat of a bold methaphysical adventurer.

No joke. Just as serious as possible.

I love what you've done. The map generator works pretty fast, no glitches so far. And even if I encountered some, what I've seen already wouldn't ever change my sincere appreciation of your work which truly gave another dimension to the apparently unassuming gaming engine of Minetest and filled me with admiration.

Great, great thanks, Gael.

_______________________________

I will report any supposed bugs as soon as I encounter any, none so far, but it's just a few minutes of wandering.

Image
Attachments
mapgen_rivers3.jpg
mapgen_rivers3.jpg (707.11 KiB) Viewed 5140 times
To miss the joy is to miss all. Robert Louis Stevenson

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

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

by voxelproof » Post

Yep, there're some issues with lighting. There're those ugly dark spots here and there that spoil otherwise splendid vistas. I suppose it's the same issue that I encountered building EVB, and it may be after all something inherent to MT (or optimization algorithms in gfx subunits of CPU) rather than mapgen-specific.

I wonder if using command "fixlight" in WorldEdit mod would solve the problem.

Another issue that clearly steals what was supposed to be an asset of this mapgen are rivers turned into meadows.

However, mountain views are magnificent, and despite these shortcomings it's an excellent work, one of the best mods regarding world features ever created for MT.
Attachments
riverbed.jpg
riverbed.jpg (213.17 KiB) Viewed 5140 times
shadows2.jpg
shadows2.jpg (235.1 KiB) Viewed 5140 times
shadows1.jpg
shadows1.jpg (247.77 KiB) Viewed 5140 times
To miss the joy is to miss all. Robert Louis Stevenson

Pablo.R
Member
Posts: 42
Joined: Thu Mar 24, 2016 12:02
Location: Chile

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

by Pablo.R » Post

Gael, I have modified the view.py file to show the sea in a different color (CET_L6) than the lakes. Its not perfect yet but maybe you like it.

Code: Select all

#!/usr/bin/env python3

import numpy as np
import sys, traceback

has_matplotlib = True
try:
    import matplotlib.colors as mcl
    import matplotlib.pyplot as plt
    try:
        import colorcet as cc
        cmap1 = cc.cm.CET_L11
        cmap2 = cc.cm.CET_L12
        cmap3 = cc.cm.CET_L6.reversed()
    except ImportError: # No module colorcet
        import matplotlib.cm as cm
        cmap1 = cm.summer
        cmap2 = cm.ocean.reversed()
        cmap3 = cm.Blues
except ImportError: # No module matplotlib
    has_matplotlib = False

if has_matplotlib:
    def view_map(dem, lakes, scale=1, center=False, sea_level=0.0, title=None):
        lakes_sea = np.maximum(lakes, sea_level)
        water = np.maximum(lakes_sea - dem, 0)
        max_elev = dem.max()
        max_depth = water.max()
        max_lake_depth = lakes.max()

        ls = mcl.LightSource(azdeg=315, altdeg=45)
        norm_ground = plt.Normalize(vmin=sea_level, vmax=max_elev)
        norm_sea = plt.Normalize(vmin=0, vmax=max_depth)
        norm_lake = plt.Normalize(vmin=0, vmax=max_lake_depth)
        rgb = ls.shade(dem, cmap=cmap1, vert_exag=1/scale, blend_mode='soft', norm=norm_ground)

        (X, Y) = dem.shape
        if center:
            extent = (-(Y+1)*scale/2, (Y-1)*scale/2, -(X+1)*scale/2, (X-1)*scale/2)
        else:
            extent = (-0.5*scale, (Y-0.5)*scale, -0.5*scale, (X-0.5)*scale)
        plt.imshow(np.flipud(rgb), extent=extent, interpolation='antialiased')
        alpha = (water > 0).astype('u1')
        lakes_alpha = ((lakes_sea - np.maximum(dem,sea_level)) > 0).astype('u1')
        # plt.imshow(np.flipud(water), alpha=np.flipud(alpha), cmap=cmap2, extent=extent, vmin=0, vmax=max_depth, interpolation='antialiased')
        plt.imshow(np.flipud(water), alpha=np.flipud(alpha), cmap=cmap3, extent=extent, vmin=0, vmax=max_depth, interpolation='antialiased')
        plt.imshow(np.flipud(water), alpha=np.flipud(lakes_alpha), cmap=cmap2, extent=extent, vmin=0, vmax=max_depth, interpolation='antialiased')

        sm1 = plt.cm.ScalarMappable(cmap=cmap1, norm=norm_ground)
        plt.colorbar(sm1).set_label('Elevation')

        sm2 = plt.cm.ScalarMappable(cmap=cmap2, norm=norm_lake)
        cb2 = plt.colorbar(sm2)
        cb2.ax.invert_yaxis()
        cb2.set_label('Lake Depth')

        sm3 = plt.cm.ScalarMappable(cmap=cmap3, norm=norm_sea)
        cb3 = plt.colorbar(sm3)
        cb3.ax.invert_yaxis()
        cb3.set_label('Ocean Depth')

        plt.xlabel('X')
        plt.ylabel('Z')

        if title is not None:
            plt.title(title, fontweight='bold')

    def update(*args, t=0.01, **kwargs):
        try:
            plt.clf()
            view_map(*args, **kwargs)
            plt.pause(t)
        except:
            traceback.print_exception(*sys.exc_info())

    def plot(*args, **kwargs):
        try:
            plt.clf()
            view_map(*args, **kwargs)
            plt.pause(0.01)
            plt.show()
        except Exception as e:
            traceback.print_exception(*sys.exc_info())

else:
    def update(*args, **kwargs):
        pass
    def plot(*args, **kwargs):
        pass

def stats(dem, lakes, scale=1):
    surface = dem.size

    continent = np.maximum(dem, lakes) >= 0
    continent_surface = continent.sum()

    lake = continent & (lakes>dem)
    lake_surface = lake.sum()

    print('---   General    ---')
    print('Grid size (dem):     {:5d}x{:5d}'.format(dem.shape[0], dem.shape[1]))
    print('Grid size (lakes):   {:5d}x{:5d}'.format(lakes.shape[0], lakes.shape[1]))
    if scale > 1:
        print('Map size:            {:5d}x{:5d}'.format(int(dem.shape[0]*scale), int(dem.shape[1]*scale)))
    print()
    print('---   Surfaces   ---')
    print('Continents:        {:6.2%}'.format(continent_surface/surface))
    print('-> Ground:         {:6.2%}'.format((continent_surface-lake_surface)/surface))
    print('-> Lakes:          {:6.2%}'.format(lake_surface/surface))
    print('Oceans:            {:6.2%}'.format(1-continent_surface/surface))
    print()
    print('---  Elevations  ---')
    print('Mean elevation:      {:4.0f}'.format(dem.mean()))
    print('Mean ocean depth:    {:4.0f}'.format((dem*~continent).sum()/(surface-continent_surface)))
    print('Mean continent elev: {:4.0f}'.format((dem*continent).sum()/continent_surface))
    print('Lowest elevation:    {:4.0f}'.format(dem.min()))
    print('Highest elevation:   {:4.0f}'.format(dem.max()))
    print()
Attachments
ksnip_20210814-155203.png
ksnip_20210814-155203.png (307.95 KiB) Viewed 5140 times

Pablo.R
Member
Posts: 42
Joined: Thu Mar 24, 2016 12:02
Location: Chile

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

by Pablo.R » Post

I was travelling the last days between a lot of beautiful landscapes. Finally I found something extrange, some kelps not like sea water.
ksnip_20210818-210302.png
ksnip_20210818-210302.png (444.78 KiB) Viewed 5140 times
Edit: I have water level set in -5 in minetest configuration, must be that.

Pablo.R
Member
Posts: 42
Joined: Thu Mar 24, 2016 12:02
Location: Chile

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

by Pablo.R » Post

Gael de Sailly wrote:
Mon Aug 02, 2021 17:13
SciFurz wrote:
Mon Aug 02, 2021 00:20
Is it possible to add in an adjustable marging to the generation of the edges, so that they're less of a straight line? Something like 0-1000 nodes, or maybe more to create a smaller base map with lots of big peninsulas and/or fjords.
That's a good idea and I think it is possible, the base noise array could be tweaked to be progressively lowered near borders, and the flow/erosion calculations on this map would likely produce the nice coast shapes you expect :)
Not the priority right now, but I will write it in my ToDo list.
That will be incredible! I will be waiting for it.

Gael, really a lot of thanks for your map generators, they make the most beautiful landscapes. I use them since your first "Forest" map generator.

User avatar
Ektod
Member
Posts: 35
Joined: Thu May 17, 2018 01:52
In-game: ektod

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

by Ektod » Post

This mod doesn't seem to be working fine on my smartphone (Android). I don't know how to explain, i tried isolating the mod but got the same results: GIGANTIC unclimbable mountains are all the world; rivers make no sense and other weird things obviously unintended.

I would have added more screenshots but the limit is three, for good reasons.

Image Uh? Unexpectedly thin mountain.


ImageThe water source generated right in the air, also look at the mountain in the background.


ImageRivers stopped running there, i don't think they were even meant to flow like that.


It may be a problem of architecture, or it may be me being stupid, i seriously have no idea, you have better chances of knowing what it can be, but if you need more info or a tester i am willing to help.
I used it with the singlenode mapgen, i also tried singlenode without mods and there was just void, so the mod is doing something.
Attachments
Screenshot_20210830-012558.png
Screenshot_20210830-012558.png (277.41 KiB) Viewed 5140 times
Screenshot_20210829-212559.png
Screenshot_20210829-212559.png (657.18 KiB) Viewed 5140 times
Screenshot_20210830-013107.png
Screenshot_20210830-013107.png (118.53 KiB) Viewed 5140 times

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

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

by Gael de Sailly » Post

Oops... sorry for forgetting all of you! For some reason I haven't been notified for your posts and did not check.
Thank you very much for your comments, I'll try to catch up all of them and answer the questions.

@twoelk: your screenshot looks rather like Valleys Mapgen.
runs wrote:
Thu Aug 05, 2021 15:29
I try to use this but a lot of problems (just 1 min of testing). Unusable.

1. Weird Black Shadows:

No I do not use the new dynamic shadow.

2. Weird Generation of coasts:
A thin layer of terrain in the top (1 block only) an a sea below.

3. Bad deco colocation:

A lot of trees cut by water.

4. Flooding in some areas.

5. Mountains to high and width. They are a kind of giant hills.

6. Rivers not carved in the mountains. Simply flooding.

7. Slow generation and game loading. Maybe this is cause of LUA mapgen. Mapgens should be C++ definitively...
@runs: it seems like another mapgen is active in your world, maybe the core mapgen has not been set to singlenode (my mod currently does not check for this, I need to fix it). This should fix most of your issues.
Last edited by Gael de Sailly on Mon Sep 06, 2021 09:53, edited 1 time in total.
Just realize how bored we would be if the world was perfect.

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

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

by Gael de Sailly » Post

voxelproof wrote:
Wed Aug 11, 2021 15:13
You're great, man.

Now everything makes sense again. Building worlds has become a real mystical adventure, an opportunity of tresspassing seemingly impassable existential threshold of so-called "reality", a daring feat of a bold methaphysical adventurer.

No joke. Just as serious as possible.

I love what you've done. The map generator works pretty fast, no glitches so far. And even if I encountered some, what I've seen already wouldn't ever change my sincere appreciation of your work which truly gave another dimension to the apparently unassuming gaming engine of Minetest and filled me with admiration.

Great, great thanks, Gael.

_______________________________

I will report any supposed bugs as soon as I encounter any, none so far, but it's just a few minutes of wandering.
Thank you very much for your support! :)
voxelproof wrote:
Wed Aug 11, 2021 17:57
Yep, there're some issues with lighting. There're those ugly dark spots here and there that spoil otherwise splendid vistas. I suppose it's the same issue that I encountered building EVB, and it may be after all something inherent to MT (or optimization algorithms in gfx subunits of CPU) rather than mapgen-specific.

I wonder if using command "fixlight" in WorldEdit mod would solve the problem.

Another issue that clearly steals what was supposed to be an asset of this mapgen are rivers turned into meadows.

However, mountain views are magnificent, and despite these shortcomings it's an excellent work, one of the best mods regarding world features ever created for MT.
Judging from the first screenshot, your issue seems similar to runs': a core mapgen is interfering (probably flat in your case). Will definitely fix that soon so that mapgen could be set to singlenode automatically...
I think light issues also come from this.

I see that you do not have biomes other than meadow/snow: those are the basic biomes generated by mapgen_rivers, and I made a separate mod (biomegen) to generate core biomes instead.
Just realize how bored we would be if the world was perfect.

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

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

by Gael de Sailly » Post

Ektod wrote:
Mon Aug 30, 2021 06:20
This mod doesn't seem to be working fine on my smartphone (Android). I don't know how to explain, i tried isolating the mod but got the same results: GIGANTIC unclimbable mountains are all the world; rivers make no sense and other weird things obviously unintended.

I would have added more screenshots but the limit is three, for good reasons.

[...]

It may be a problem of architecture, or it may be me being stupid, i seriously have no idea, you have better chances of knowing what it can be, but if you need more info or a tester i am willing to help.
I used it with the singlenode mapgen, i also tried singlenode without mods and there was just void, so the mod is doing something.
Yes clearly there is something wrong with the landscape.
Could you paste your mapgen_rivers.conf file (located in world dir)? It might be a problem with parameters getting weird values for some reason. You can also try to reset all parameter related to mapgen_rivers in minetest.conf, start a new world and see if it's better.
Apart from this I have no idea of what it could be. I haven't tested my mod on Android and know very little about this system.
Just realize how bored we would be if the world was perfect.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

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

by runs » Post

Gael de Sailly wrote:
Mon Sep 06, 2021 09:06
Oops... sorry for forgetting all of you! For some reason I haven't been notified for your posts and did not check.
Thank you very much for your comments, I'll try to catch up all of them and answer the questions.

@twoelk: your screenshot looks rather like Valleys Mapgen.
runs wrote:
Thu Aug 05, 2021 15:29
I try to use this but a lot of problems (just 1 min of testing). Unusable.

1. Weird Black Shadows:

No I do not use the new dynamic shadow.

2. Weird Generation of coasts:
A thin layer of terrain in the top (1 block only) an a sea below.

3. Bad deco colocation:

A lot of trees cut by water.

4. Flooding in some areas.

5. Mountains to high and width. They are a kind of giant hills.

6. Rivers not carved in the mountains. Simply flooding.

7. Slow generation and game loading. Maybe this is cause of LUA mapgen. Mapgens should be C++ definitively...
@runs: it seems like another mapgen is active in your world, maybe the core mapgen has not been set to singlenode (my mod currently does not check for this, I need to fix it). This should fix most of your issues.
Oh ok I did nit know that

Nightshdr
New member
Posts: 2
Joined: Wed Sep 08, 2021 21:57

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

by Nightshdr » Post

Registered just to thank you for creating this fabulous map generator. Traveling without debug nor map gives to proper atmosphere. Tried to use /emergeblocks to get distance views without the blackness or loading, not sure if it helped. Ideally the whole map can be finished once at the start (total noob here). Anyway, got the max viewing distance set to 4000 and enabled the fog effect seems nice. Does anyone have tips on which mods to combine this with to get animals and other simulation effects going?
Attachments
MT-map_rivers-climate.png
MT-map_rivers-climate.png (549.23 KiB) Viewed 5140 times

User avatar
Ektod
Member
Posts: 35
Joined: Thu May 17, 2018 01:52
In-game: ektod

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

by Ektod » Post

Here is the mapgen_rivers.conf file of a new world i created (deleted previous one), it has the same issue than the others.
Spoiler
river_erosion_coef = 0.5
np_distort_x = {
flags = defaults
lacunarity = 2
persistence = 0.75
octaves = 3
seed = -4574
spread = (64,32,64)
scale = 1
offset = 0
}
grid_x_size = 1000
evol_time = 10
diffusive_erosion = 0.5
version = 1.0
river_erosion_power = 0.4
np_distort_amplitude = {
flags = absvalue
lacunarity = 2
persistence = 0.5
octaves = 5
seed = 676
spread = (1024,1024,1024)
scale = 10
offset = 0
}
np_distort_z = {
flags = defaults
lacunarity = 2
persistence = 0.75
octaves = 3
seed = -7940
spread = (64,32,64)
scale = 1
offset = 0
}
glacier_factor = 8
evol_time_step = 1
grid_z_size = 1000
np_base = {
flags = eased
lacunarity = 2
persistence = 0.6
octaves = 8
seed = 2469
spread = (2048,2048,2048)
scale = 300
offset = 0
}
biomes = true
blocksize = 15
elevation_chill = 0.25
tectonic_speed = 70
glaciers = false
riverbed_slope = 0.4
river_widening_power = 0.5
min_catchment = 3600
compensation_radius = 50
distort = true
center = true
I think resetting the config was one of the things I did, i'm almost sure but can't really remember well. But if it isn't the problem then yeah... no clue what it can be.

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

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

by Gael de Sailly » Post

Pablo.R wrote:
Sat Aug 14, 2021 19:56
Gael, I have modified the view.py file to show the sea in a different color (CET_L6) than the lakes. Its not perfect yet but maybe you like it.

Code: Select all

#!/usr/bin/env python3

import numpy as np
import sys, traceback

has_matplotlib = True
try:
    import matplotlib.colors as mcl
    import matplotlib.pyplot as plt
    try:
        import colorcet as cc
        cmap1 = cc.cm.CET_L11
        cmap2 = cc.cm.CET_L12
        cmap3 = cc.cm.CET_L6.reversed()
    except ImportError: # No module colorcet
        import matplotlib.cm as cm
        cmap1 = cm.summer
        cmap2 = cm.ocean.reversed()
        cmap3 = cm.Blues
except ImportError: # No module matplotlib
    has_matplotlib = False

if has_matplotlib:
    def view_map(dem, lakes, scale=1, center=False, sea_level=0.0, title=None):
        lakes_sea = np.maximum(lakes, sea_level)
        water = np.maximum(lakes_sea - dem, 0)
        max_elev = dem.max()
        max_depth = water.max()
        max_lake_depth = lakes.max()

        ls = mcl.LightSource(azdeg=315, altdeg=45)
        norm_ground = plt.Normalize(vmin=sea_level, vmax=max_elev)
        norm_sea = plt.Normalize(vmin=0, vmax=max_depth)
        norm_lake = plt.Normalize(vmin=0, vmax=max_lake_depth)
        rgb = ls.shade(dem, cmap=cmap1, vert_exag=1/scale, blend_mode='soft', norm=norm_ground)

        (X, Y) = dem.shape
        if center:
            extent = (-(Y+1)*scale/2, (Y-1)*scale/2, -(X+1)*scale/2, (X-1)*scale/2)
        else:
            extent = (-0.5*scale, (Y-0.5)*scale, -0.5*scale, (X-0.5)*scale)
        plt.imshow(np.flipud(rgb), extent=extent, interpolation='antialiased')
        alpha = (water > 0).astype('u1')
        lakes_alpha = ((lakes_sea - np.maximum(dem,sea_level)) > 0).astype('u1')
        # plt.imshow(np.flipud(water), alpha=np.flipud(alpha), cmap=cmap2, extent=extent, vmin=0, vmax=max_depth, interpolation='antialiased')
        plt.imshow(np.flipud(water), alpha=np.flipud(alpha), cmap=cmap3, extent=extent, vmin=0, vmax=max_depth, interpolation='antialiased')
        plt.imshow(np.flipud(water), alpha=np.flipud(lakes_alpha), cmap=cmap2, extent=extent, vmin=0, vmax=max_depth, interpolation='antialiased')

        sm1 = plt.cm.ScalarMappable(cmap=cmap1, norm=norm_ground)
        plt.colorbar(sm1).set_label('Elevation')

        sm2 = plt.cm.ScalarMappable(cmap=cmap2, norm=norm_lake)
        cb2 = plt.colorbar(sm2)
        cb2.ax.invert_yaxis()
        cb2.set_label('Lake Depth')

        sm3 = plt.cm.ScalarMappable(cmap=cmap3, norm=norm_sea)
        cb3 = plt.colorbar(sm3)
        cb3.ax.invert_yaxis()
        cb3.set_label('Ocean Depth')

        plt.xlabel('X')
        plt.ylabel('Z')

        if title is not None:
            plt.title(title, fontweight='bold')

    def update(*args, t=0.01, **kwargs):
        try:
            plt.clf()
            view_map(*args, **kwargs)
            plt.pause(t)
        except:
            traceback.print_exception(*sys.exc_info())

    def plot(*args, **kwargs):
        try:
            plt.clf()
            view_map(*args, **kwargs)
            plt.pause(0.01)
            plt.show()
        except Exception as e:
            traceback.print_exception(*sys.exc_info())

else:
    def update(*args, **kwargs):
        pass
    def plot(*args, **kwargs):
        pass

def stats(dem, lakes, scale=1):
    surface = dem.size

    continent = np.maximum(dem, lakes) >= 0
    continent_surface = continent.sum()

    lake = continent & (lakes>dem)
    lake_surface = lake.sum()

    print('---   General    ---')
    print('Grid size (dem):     {:5d}x{:5d}'.format(dem.shape[0], dem.shape[1]))
    print('Grid size (lakes):   {:5d}x{:5d}'.format(lakes.shape[0], lakes.shape[1]))
    if scale > 1:
        print('Map size:            {:5d}x{:5d}'.format(int(dem.shape[0]*scale), int(dem.shape[1]*scale)))
    print()
    print('---   Surfaces   ---')
    print('Continents:        {:6.2%}'.format(continent_surface/surface))
    print('-> Ground:         {:6.2%}'.format((continent_surface-lake_surface)/surface))
    print('-> Lakes:          {:6.2%}'.format(lake_surface/surface))
    print('Oceans:            {:6.2%}'.format(1-continent_surface/surface))
    print()
    print('---  Elevations  ---')
    print('Mean elevation:      {:4.0f}'.format(dem.mean()))
    print('Mean ocean depth:    {:4.0f}'.format((dem*~continent).sum()/(surface-continent_surface)))
    print('Mean continent elev: {:4.0f}'.format((dem*continent).sum()/continent_surface))
    print('Lowest elevation:    {:4.0f}'.format(dem.min()))
    print('Highest elevation:   {:4.0f}'.format(dem.max()))
    print()
Thank you for this code, making the difference between sea and lakes is interesting and I had not thought about it previously. I pushed these changes on a new branch. I forgot to credit you on the commit message, I will change it when merging.

The sea colormap looks a bit dark and purple-ish to me, maybe it is possible to modify it to make more subtle variations. But the concept is cool.
Ektod wrote:
Thu Sep 09, 2021 13:16
Here is the mapgen_rivers.conf file of a new world i created (deleted previous one), it has the same issue than the others.
Spoiler
river_erosion_coef = 0.5
np_distort_x = {
flags = defaults
lacunarity = 2
persistence = 0.75
octaves = 3
seed = -4574
spread = (64,32,64)
scale = 1
offset = 0
}
grid_x_size = 1000
evol_time = 10
diffusive_erosion = 0.5
version = 1.0
river_erosion_power = 0.4
np_distort_amplitude = {
flags = absvalue
lacunarity = 2
persistence = 0.5
octaves = 5
seed = 676
spread = (1024,1024,1024)
scale = 10
offset = 0
}
np_distort_z = {
flags = defaults
lacunarity = 2
persistence = 0.75
octaves = 3
seed = -7940
spread = (64,32,64)
scale = 1
offset = 0
}
glacier_factor = 8
evol_time_step = 1
grid_z_size = 1000
np_base = {
flags = eased
lacunarity = 2
persistence = 0.6
octaves = 8
seed = 2469
spread = (2048,2048,2048)
scale = 300
offset = 0
}
biomes = true
blocksize = 15
elevation_chill = 0.25
tectonic_speed = 70
glaciers = false
riverbed_slope = 0.4
river_widening_power = 0.5
min_catchment = 3600
compensation_radius = 50
distort = true
center = true
I think resetting the config was one of the things I did, i'm almost sure but can't really remember well. But if it isn't the problem then yeah... no clue what it can be.
I see nothing weird in this config, so for now I can't explain this :/
I don't see why the same algorithm can behave differently on different OS, do you have any idea of something on the Minetest API or in I/O system that can be different on Android?
I can do some tests on Android, this will be my first Minetest experience on phone, lol
Just realize how bored we would be if the world was perfect.

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

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

by Gael de Sailly » Post

I made a new bugfix release v1.0.1 that automatically sets mapgen to singlenode, to prevent the "double mapgen" issue that many of you encountered.
Just realize how bored we would be if the world was perfect.

User avatar
voxelproof
Member
Posts: 1087
Joined: Sat Aug 05, 2017 08:13
Location: Europe

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

by voxelproof » Post

Gael de Sailly wrote:
Sat Sep 18, 2021 17:40
I made a new bugfix release v1.0.1 that automatically sets mapgen to singlenode, to prevent the "double mapgen" issue that many of you encountered.
Thanks, as I remember I actually did start your mode in flat world, just had not realized that that may interfere cause due to my previous experience I had expected that the new map generator would completely overwrite everything in a fresh world. Thaks for the explanation and once again, for your commitment adding to MT so much more :)
To miss the joy is to miss all. Robert Louis Stevenson

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

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

by Gael de Sailly » Post

I wrote:
Mon Aug 02, 2021 17:13
SciFurz wrote:
Mon Aug 02, 2021 00:20
Is it possible to add in an adjustable marging to the generation of the edges, so that they're less of a straight line? Something like 0-1000 nodes, or maybe more to create a smaller base map with lots of big peninsulas and/or fjords.
That's a good idea and I think it is possible, the base noise array could be tweaked to be progressively lowered near borders, and the flow/erosion calculations on this map would likely produce the nice coast shapes you expect :)
Not the priority right now, but I will write it in my ToDo list.
I finally tried to implement these margins to make world borders look more natural, and I got the result I was expecting.

The outer coasts it generates are similar to what you would find elsewhere, so I did not take screenshots, but found more interesting to show the world map:
margin.png
margin.png (229.22 KiB) Viewed 5103 times
Margin width was set to 2K nodes here, but it looks much thinner because it is a smooth transition.

You can find this new version on the new margin branch.
Just realize how bored we would be if the world was perfect.

User avatar
MisterE
Member
Posts: 693
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 you port this to a c++ mapgen sometime? it would be worth compiling a special version of minetest for. the luagen is still somewhat slow

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

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

by Gael de Sailly » Post

MisterE wrote:
Mon Jan 03, 2022 18:17
could you port this to a c++ mapgen sometime? it would be worth compiling a special version of minetest for. the luagen is still somewhat slow
I hope to do it one day, I have already an unfinished C++ project: mapgen_rivers_c, that currently contains only the main pregen algorithm (and input data need to be generated with Python). This is useless in its current form and was mainly coded to train my (still low) C++ skills, but it could serve as a basis for a C mapgen integrated into Minetest. Much, much work remains to be done, however.
Just realize how bored we would be if the world was perfect.

User avatar
MisterE
Member
Posts: 693
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

thats cool. it would be nice to have, one day

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

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

by Gael de Sailly » Post

Minor release today (v1.0.2) with optimizations
Skipping too high chunks, along with other optimizations, have sped up map generation by 20-30%.

Progressive margin, and other features (maybe standardizing all settings that are still in grid units instead of node units, or 1-node depth offset for rivers) will be for the next feature release.

The first post is outdated again... to be rewritten.
Just realize how bored we would be if the world was perfect.

User avatar
MisterE
Member
Posts: 693
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 thought I would use this in an original game, but then I realized it has a default dependancy :(

Any possibility of removing the default depends? And still having it work with the biome system?

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

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

by Gael de Sailly » Post

MisterE wrote:
Mon Jan 17, 2022 21:14
Any possibility of removing the default depends? And still having it work with the biome system?
Yes, I can absolutely remove the default depend, its only use is to generate some nodes like dirt with grass, in case biomegen is not used.
Just realize how bored we would be if the world was perfect.

User avatar
MisterE
Member
Posts: 693
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

can I simply remove the depends in the mod.conf, use biomegen, and expect it to work?

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

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

by Gael de Sailly » Post

No, there are a few lines to change in init.lua, around L150
I'm doing these changes right now
Just realize how bored we would be if the world was perfect.

User avatar
MisterE
Member
Posts: 693
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

oh great, thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests