[Mod] River / mountain range mapgen [0.7.2] [watershed]

Nore
Developer
Posts: 501
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

by Nore » Post

The ore generation:
Image

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

by Krock » Post

Wow, would be too easy to follow that line-of-ores :3
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Nore, that's useful i'll try isolating the ores in future to see the distribution, as you can see too many precious ores, needs development and tuning ;)
Last edited by paramat on Wed Mar 05, 2014 20:10, edited 1 time in total.

Nore
Developer
Posts: 501
Joined: Wed Nov 28, 2012 11:35
GitHub: Ekdohibs

by Nore » Post

paramat wrote:Nore, that's useful i'll try isolating the ores in future to see the distribution, as you can see too many precious ores, needs development and tuning ;)
One of the problems is that all ores/etc use the same noise... so you've got diamond/mese/gold/.. sheets always in that order, and never two different ores at the same point.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Version 0.2.7
Further work on ore distribution. Ores are still in layers but within each layer there are now patchy seams of ores, within each seam the chance of ore per stone node is reduced for the precious ores.
Nore, yes i worked on ores all day yesterday, made improvements but am still unsatisfied, now i think the best approach is to work on the rock strata first and get that right, then i'll just squeeze the ore layers into that system.
Last edited by paramat on Sat Mar 08, 2014 07:39, edited 1 time in total.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Version 0.2.8. Needs tuning but makes good looking vein structures ... one 'ore' is gravel.
Last edited by paramat on Sun Feb 15, 2015 23:41, edited 2 times in total.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Version 0.2.10
Flower colour areas, faults/cliffs, desert stone as layer, climbable jungletrees.
https://github.com/paramat/watershed/co ... efc44256c2

User avatar
LazyJ
Member
Posts: 687
Joined: Wed Sep 12, 2012 12:29
Location: Podunk, Nowhere, USA

by LazyJ » Post

Howdy ;)


I've been waiting a long time for a mapgen like this. Mountain ranges that blend with the foothills. Floatlands that don't look like they were entirely a mapgen glitch. Rivers that are above sea level and flow with the contours of the land. Snow biomes that are large enough to look like they are supposed to be there instead of undersized, random splotches on the map. More variety of biomes, tree shapes, and even a cactus shape that looks like it came from the desert.


Version 0.2.10 'Bald Spots'
I plan to use 'Watershed' for my new, long-term singleplayer worlds. Before making the switch I wanted to thoroughly test 'Watershed' to make sure it would be suitable for long-term world use. I test with individual worlds that all use the same map seed so I can more easily make comparissons. Version 0.2.09 turned out wonderfully. Version 0.2.10 had a few, large area 'bald spots' and the edges of mountains and cliffs were more frequently all stone.


Image

When I started a new test world with the same map seed but with 'Watershed' v. 0.2.09, I went back to the same coordinates and the bald spots and stone-only cliff sides didn't appear.



Rose Water
There was a graphics glitch with the 'Watershed' water code that caused the water tiles to be randomly replaced with other node tiles. Rivers of floating flowers, dirt, sand, and junglegrass. I noticed this happened when 'new_style_water' was enabled. I prefer the new_style_water. Swapping out the 'Watershed' water code for the default, minetest_game water code fixed the graphics glitch.


Image



Version 0.2.09 - Tweaked and with Mods
Instead of using the 'mapgen v6' option, I used 'singlenode' and changed the parameters of 'Watershed' so everything was based off of sea level at y0. Since I was using 'singlenode' I swapped all the 'Watershed' nodes that were duplicates of default, minetest_game nodes with their minetest_game counterparts.

Then I installed all of my favorite plant and tree mods to enhance the scenery even more.

The final touch was to create textures in GIMP that fit with my favorite texture pack, Calinou's conversion of Misa's texture pack.


The results...


Emerald Floatlands
Image


Snow Forest
Image


Golden Tundra Canyon
Image



Just flying around to make these screenshots was a visual treat. 2D screenshots just don't do justice to the scenic beauty I saw appearing on my screen.

Thanks for an amazing mod, paramat!

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

This mapgen really does deserve to be on a server. It is stuff like this that keeps the fire of hope in Minetest alive.

As I said before, see if you can find a way for plant-generating and ore-generating mods to work with this mapgen. Put a big smile on the face of VanessaE.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Thanks LazyJ, beautiful screenshots, i like the trees you have added in your own version, although i coded this i am still blown away by peoples's screenshots, and it is good to see textures other than my own or default. Perhaps i will change this mod to use singlenode as this perhaps seems to be the players' preference?

The bare stone areas are a result of adding paragen type faults / cliffs, i have vertically stretched the 3D noise to try and keep these cliffs near-vertical, but it is unavoidable to have a few horizontal bare areas. You are of course welcome to maintain your own fork of this mod if you don't like those. I need to work on the strata system to get stripy-strata visible in the cliffs (as in paragen).

The rose water is funny. I think i removed the fancy water texture from the node definition, i will check and probably put that back in.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

LazyJ, the next version will have special tiles re-added to water, it's important to use watershed water because it has a spread range of 3 and is non-renewable, normal water will make a mess of the rivers. The fix is to add back in the 'special tiles' to the node definition:

Code: Select all

    special_tiles = {
        {
            name="default_water_source_animated.png",
            animation={type="vertical_frames",
            aspect_w=16, aspect_h=16, length=2.0},
            backface_culling = false,
        }
    },
Last edited by paramat on Mon Mar 24, 2014 01:39, edited 1 time in total.

spillz
Member
Posts: 138
Joined: Thu Feb 13, 2014 05:11

by spillz » Post

paramat: this is great stuff. I'm finally going to check this out...

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Thats cool spillz.

I should mention this, perhaps people may have seen this mysterioius parameter:

Code: Select all

local XLSAMP = 0 -- Extra large scale height variation amplitude

Code: Select all

-- 2D noise for extra large scale height variation

local np_xlscale = {
    offset = 0,
    scale = 1,
    spread = {x=8192, y=8192, z=8192},
    seed = -72,
    octaves = 3,
    persist = 0.4
}
This is the continental scale height variation that creates large adjacent continents and archipelagos, this could perhaps create the nation states of a server, 8000x8000 goes into 64000x64000 64 times, i thought that was enough.
So at the moment it's zero because i wanted it neutralised while tuning everything else.
LazyJ this needs to be tuned to a good value before starting your long term world, problem is every tweak needs several hours of world generating to see the result, but i will start with a good estimate of ...

Code: Select all

local XLSAMP = 0.4 -- Extra large scale height variation amplitude
Last edited by paramat on Mon Mar 24, 2014 02:12, edited 1 time in total.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Version 0.2.11 is at github.
Fix water tiles, new jungletrees, set continent parameters.
https://github.com/paramat/watershed/co ... 4dda4760f6

spillz
Member
Posts: 138
Joined: Thu Feb 13, 2014 05:11

by spillz » Post

Is there any way to force generate a big chunk of terrain? (I think I read about some mod that basically walks a player around for hours, but that seems really hacky)

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Yep the 'explore map' mod by Echo.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

LazyJ, the sandstone strata were unfinished, more strata will appear angled across the cliffs and bare stone areas in the next version.
Last edited by paramat on Tue Mar 25, 2014 03:47, edited 1 time in total.

spillz
Member
Posts: 138
Joined: Thu Feb 13, 2014 05:11

by spillz » Post

So cool. Look forward to trying the new version. What colors.txt are you using? When I drew a world based on your mods, lots of blocks were blacked out.

spillz
Member
Posts: 138
Joined: Thu Feb 13, 2014 05:11

by spillz » Post

PS: Any interest in writing a worldgen modding tutorial? I think it would be very instructive, as it's not straightforward from just looking at the code.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Code: Select all

paragen:permafrost 181 144 107
paragen:dirt 181 144 107
paragen:desertstone 105 56 43
paragen:needles 47 80 41
paragen:jungleleaf 119 132 50
paragen:cactus 95 255 0
paragen:grass 27 35 25
paragen:swampwater 48 108 48
paragen:swampwaterflow 48 108 48
paragen:stone 97 93 92
paragen:sand 218 180 106
paragen:luxblock 255 218 90
paragen:goldengrass 188 160 0
paragen:drygrass 147 119 71
paragen:activelayer 147 119 71
paragen:water 11 53 115
paragen:waterflow 11 53 115
paragen:snow 221 223 255

paragenv7:dirt 181 144 107
paragenv7:permafrost 181 144 107
paragenv7:acacialeaf 47 80 41
paragenv7:needles 47 80 41
paragenv7:jungleleaf 119 132 50
paragenv7:ssapling 95 255 0
paragenv7:psapling 95 255 0
paragenv7:cactus 95 255 0
paragenv7:grass 27 35 25
paragenv7:goldengrass 188 160 0
paragenv7:drygrass 147 119 71

flexrealm:perfrost 181 144 107
flexrealm:dirt 181 144 107
flexrealm:destone 105 56 43
flexrealm:needles 47 80 41
flexrealm:junleaf 119 132 50
flexrealm:grass 27 35 25
flexrealm:swatzero 48 108 48
flexrealm:swatfour 48 108 48
flexrealm:swatflow 48 108 48
flexrealm:stone 97 93 92
flexrealm:sand 218 180 106
flexrealm:desand 227 138 73
flexrealm:drygrass 147 119 71
flexrealm:frograss 87 76 45
flexrealm:watzero 11 53 115
flexrealm:watfour 11 53 115
flexrealm:watflow 11 53 115
flexrealm:cloud 227 233 240
flexrealm:lavazero 255 221 88

watershed:dirt 84 51 35
watershed:redstone 105 56 43
watershed:needles 47 80 41
watershed:jungleleaf 119 132 50
watershed:stone 97 93 92
watershed:grass 27 35 25
watershed:water 11 53 115
watershed:waterflow 11 53 115
watershed:drygrass 147 119 71
watershed:permafrost 181 144 107

moonrealm:stone 97 93 92
moonrealm:dust 132 132 132
moonrealm:luxore 255 255 0
moonrealm:luxnode 255 255 0
moonrealm:waterice 155 155 255

asteroid:snowblock 221 223 255
asteroid:waterice 155 155 255
asteroid:stone 97 93 92
asteroid:cobble 116 112 111
asteroid:gravel 137 125 112
asteroid:dust 132 132 132

trail:dirt_walked 181 144 107
trail:dirt_with_grass_walked 255 0 0
trail:desert_sand_walked 255 0 0
trail:snow_walked 255 0 0
trail:snow_block_walked 255 0 0
trail:sand_walked 255 0 0

conifers:trunk 234 207 156
conifers:trunk_reversed 234 207 156
conifers:leaves 47 80 41
conifers:leaves_special 47 80 41
conifers:sapling 95 255 0

volcano:magma_source 255 51 0
volcano:magma_slow 255 51 0
volcano:magma_flowing 255 51 0
volcano:ash 132 132 132

slabrealm:redstone 105 56 43
slabrealm:jleaf 47 80 41
slabrealm:needles 47 80 41
slabrealm:jsapling 95 255 0
slabrealm:psapling 95 255 0
slabrealm:grassslab 27 35 25
slabrealm:stone 97 93 92
slabrealm:slith 204 204 204
slabrealm:desertsandslab 227 138 73
slabrealm:sandslab 218 180 106
slabrealm:snowslab 221 223 255
slabrealm:snowblock 221 223 255
slabrealm:ice 155 155 255
slabrealm:cloud 227 233 240

landup:destone 105 56 43
landup:stone 97 93 92
landup:grass 27 35 25

floatindev:desertstone 105 56 43
floatindev:stone 97 93 92

jungletree:leaves_green 47 80 41
jungletree:leaves_red 47 80 41
jungletree:leaves_yellow 47 80 41
jungletree:sapling 95 255 0

slabworld:slabstone 97 93 92
slabworld:slith 204 204 204
slabworld:cslith 204 204 204
slabworld:cslithslab 204 204 204
slabworld:cslithstair 204 204 204
slabworld:lighton 255 218 90
slabworld:light 255 218 90
slabworld:slabcloud 227 233 240
slabworld:redslabstone 105 56 43

vrealm:sand 218 180 106
vrealm:grass 27 35 25
vrealm:desert_sand 227 138 73

moonlet:lighton 255 218 90
moonlet:light 255 218 90
moonlet:omsand 227 138 73
moonlet:omstone 206 113 68

flolands:floatstone 66 72 97
flolands:floatsand 106 218 196

noise23:flosand 106 218 196
noise23:stone 97 93 92

rainforest:jungleleaf 119 132 50
These 2 mods are simplified versions of my mapgens, written and commented as sort-of tutorials:
viewtopic.php?id=8483
viewtopic.php?id=8628
In the stability thread i describe 3D noise mapgen as used in Minetest mapgen v5.
;)

EDIT
Version 0.2.12
Fix/more sandstone strata, testing new mapgen params
Last edited by paramat on Sun Feb 15, 2015 23:42, edited 2 times in total.

spillz
Member
Posts: 138
Joined: Thu Feb 13, 2014 05:11

by spillz » Post

So what does

Code: Select all

minetest.get_perlin_map(np_terrain, chulens):get3dMap_flat(minpos)
do?

get_perlin_map returns some sort of array, then get3DMap converts to table? (not helping that I find lua syntax confusing)

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Yeah, the new perlin functions calculate a whole chunks' worth of noise values in bulk, the old slow way was a separate call to C++ for every noise calculation, for every node.
For 3D the 'nvals' table is in (z(y(x))) order, so the first 80 values are the lowest southernmost x-line across a chunk, the following x-lines work upwards. The first 80*80 values are the southernmost vertical xy-plane, the following xy planes work northwards. Roughly half a million values per chunk!
I learnt all this by finding an old IRC log where hmmmm describes the perlin maps :)
Last edited by paramat on Wed Mar 26, 2014 02:00, edited 1 time in total.

spillz
Member
Posts: 138
Joined: Thu Feb 13, 2014 05:11

by spillz » Post

Ok, more questions:

1. The perlin data values are doubles between 0.0 and 1.0? And this is regular perlin noise?
2. A chunk at 0,0,0 to 80,80,80 will generate the same way every time for a given world seed? Or is it different every time?
3. Still don't quite understand what stability does... are you placing nodes in empty space starting with enough stone to make it stable? I guess I need to take a look at a cross-section.
4. Assume this one is one of your fastest (haven't tested)? How much time to generate the noise vs do the stuff in LUA? I did test watershed, which is more complicated and on my good pc with luajit got about 0.6s per chunk, and on my slower laptop around 1.2s, both with luajit. Luajit cut time by about half. So assume the Lua time is substantial, but not everything otherwise the saving due to jit would be bigger.
Last edited by spillz on Wed Mar 26, 2014 03:00, edited 1 time in total.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

1. In the noise parameters, 'offset' is the centre value and 'scale' is the very approximate amplitude, because i'm used to the old perlin functions i always set these to 0 and 1, the result is the noise values will be mostly between -1.5 and +1.5, depending on number of 'octaves' and 'persistence'.
2. Yes same way every time.
3. The 3D noise defines the terrain shape as well as the proposed sand layer surrounding the stone, a sand node is only placed in a column if supported by 2 stone nodes, or a solid pillar of sand on 2 stone nodes.
4. Hm not sure that could easily be timed though.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

by paramat » Post

Version 0.2.13
Added perlin map overgeneration from 'overgen' mod, solves some problems at chunk borders but needs more work.
Lowered sea level, still trying to find good continental scale parameters.
Removed the soil table that checked soil depth to be deeper than tree root depth, clever idea but not worth the complexity and extra processing.
Last edited by paramat on Sat Mar 29, 2014 02:12, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 20 guests