Post your mapgen questions here (modding or engine)

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Post your mapgen questions here (modding or engine)

by paramat » Sun Jul 31, 2016 20:54

This will help the mapgen devs find mapgen questions.

This is placed in 'modding discussion' because other similar question threads are, and because it will probably be mostly used for modding questions, however engine questions are welcome too because i work on that.
Last edited by paramat on Wed Aug 03, 2016 01:35, edited 2 times in total.
 

User avatar
duane
Member
 
Posts: 776
Joined: Wed Aug 19, 2015 19:11
GitHub: duane-r

Re: Post your mapgen questions here (modding or engine)

by duane » Sun Jul 31, 2016 22:37

+1
 

ozkur
Member
 
Posts: 180
Joined: Wed Oct 07, 2015 20:59
In-game: ozkur or XoRoUZ

Re: Post your mapgen questions here (modding or engine)

by ozkur » Mon Aug 01, 2016 01:04

cool
Biplanes! 'Nuff said

I am a native English speaker, Ich spreche kein Deuscht, mais je parle un pue français.
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: Post your mapgen questions here (modding or engine)

by TumeniNodes » Mon Aug 01, 2016 15:15

paramat wrote:This will help the mapgen devs find mapgen questions.

This is placed in 'modding discussion' because other similar question threads are, and because it will probably be mostly used for modding questions, however engine questions are welcome too because i work on that.


Awesome, thank you for this.
My first question is:
*Is there any way to add the ridges settings (like in V7), into mgflat?
*If not, is it a possibility for the future?
*And..., if not that as well... what would be the main areas for me to tinker with to get V7 to look like it is mgflat, with lakes, mountains (hills) and ridges (and no floating islands?)

As you have seen, I love mgflat, but with nice large lakes and some mountain ranges..., but for me, it would be literally perfect if I were able to have one large(wide) river/ridges running through connecting a couple of lakes together..., using the same terrain height the lakes use, to build a really nice bridge or two over.

In other words, a "perfect" mg (in my own opinion) would have lakes, ridges, hills, and large spans of flat terrain for building... and a very easy, straight forward setting to turn floating islands off / on.
Flick?... Flick who?
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Mon Aug 01, 2016 16:22

I agree with lakes and plain areas, but I'm not sure if a flat mapgen is the right base.

Maybe more like a normal mapgen with very flat hills
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: Post your mapgen questions here (modding or engine)

by TumeniNodes » Mon Aug 01, 2016 19:42

burli wrote:I agree with lakes and plain areas, but I'm not sure if a flat mapgen is the right base.

Maybe more like a normal mapgen with very flat hills


This is the most recent settings I have for right now. I think mgflat is a perfect base, because it is very simple. If something similar to the ridges from v7 could be worked in, it would be even better, especially if it could produce nice, wide river channels.
It would give the perfect combinations of lakes, hills, rivers..., while providing a perfect amount of flat terrain with very simple to use settings. Flat terrain is the most important key for building towns, cities, large structures, etc.. so, it actually is a very good base on a couple of counts : )

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
chunksize = 5
mg_biome_np_heat = {
   flags = defaults
   lacunarity = 2
   octaves = 3
   offset = 50
   persistence = 0.5
   scale = 50
   seed = 5349
   spread = (750,750,750)
}
mg_biome_np_heat_blend = {
   flags = defaults
   lacunarity = 2
   octaves = 2
   offset = 0
   persistence = 1
   scale = 1.5
   seed = 13
   spread = (8,8,8)
}
mg_biome_np_humidity = {
   flags = defaults
   lacunarity = 2
   octaves = 3
   offset = 50
   persistence = 0.5
   scale = 50
   seed = 842
   spread = (750,750,750)
}
mg_biome_np_humidity_blend = {
   flags = defaults
   lacunarity = 2
   octaves = 2
   offset = 0
   persistence = 1
   scale = 1.5
   seed = 90003
   spread = (8,8,8)
}
mg_flags = trees, nocaves, nodungeons, noflat, light, nodecorations
mg_name = flat
mgflat_cave_width = 0.3
mgflat_ground_level = 24
mgflat_hill_steepness = 120
mgflat_hill_threshold = 0.45
mgflat_lake_steepness = 48
mgflat_lake_threshold = -0.25
mgflat_large_cave_depth = -33
mgflat_np_cave1 = {
   flags = defaults
   lacunarity = 2
   octaves = 4
   offset = 0
   persistence = 0.5
   scale = 12
   seed = 52534
   spread = (96,96,96)
}
mgflat_np_cave2 = {
   flags = defaults
   lacunarity = 2
   octaves = 4
   offset = 0
   persistence = 0.5
   scale = 12
   seed = 10325
   spread = (96,96,96)
}
mgflat_np_filler_depth = {
   flags = defaults
   lacunarity = 2
   octaves = 3
   offset = 0
   persistence = 0.7
   scale = 1.2
   seed = 261
   spread = (150,150,150)
}
mgflat_np_terrain = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 0
   persistence = 0.6
   scale = 1
   seed = 7244
   spread = (600,600,600)
}
mgflat_spflags = lakes, hills
seed = 11303812373526807364
water_level = 1
[end_of_params]
Flick?... Flick who?
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Tue Aug 02, 2016 13:44

But flat is flat. Everything is on one height

Another question: What kind of cave "biomes" are possible?

I think about ice, hot, mossy, wet, flooded, crystal (rare). Valley_c has also lichen and some fungi

What else? Could be realistic, fantasy, whatever
 

ozkur
Member
 
Posts: 180
Joined: Wed Oct 07, 2015 20:59
In-game: ozkur or XoRoUZ

Re: Post your mapgen questions here (modding or engine)

by ozkur » Tue Aug 02, 2016 16:40

burli wrote:But flat is flat. Everything is on one height

Another question: What kind of cave "biomes" are possible?

I think about ice, hot, mossy, wet, flooded, crystal (rare). Valley_c has also lichen and some fungi

What else? Could be realistic, fantasy, whatever

for caves, you could just have biomes under ground, and hope they overlap with a cave.
Biplanes! 'Nuff said

I am a native English speaker, Ich spreche kein Deuscht, mais je parle un pue français.
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

Re: Post your mapgen questions here (modding or engine)

by BrunoMine » Tue Aug 02, 2016 16:53

I'm studying minetest.register_decoration but can not find any article or research that explains specific way about it.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
noise_params = {
    offset=0,
    scale=.45,
    spread={x=100, y=100, z=100},
    seed=354,
    octaves=3,
    persist=0.7
},

What is the relationship of each of these parameters with mapgen on minetest.register_decoration?
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your mapgen questions here (modding or engine)

by paramat » Tue Aug 02, 2016 21:52

TumeniNodes,
mgflat is meant to be super-simple so i'm not sure it should be developed, i even met resistence to adding the lakes and hills features.
MgV7 with custom noise params can probably do what you want, i might post an example later.

Burli,
The current biome API does not function in caves, but it might be able to in the future.

BrunoMine,
That noise is to provide a varying value of 'fill_ratio'.

'offset' is the average noise value,
scale is the typical variation of the noise value either side of offset,
'spread' is the largest scale (in nodes) of variation in the noise pattern (keep the 3 numbers equal).
'octaves' is the number of levels of detail in the noise pattern, first octave is size 'spread', reach additional octave is variation on a scale half the size of the previous.
'persistence' is the 'roughness' of the noise pattern, the strength of small-scale variation relative to large-scale variation.
'seed' is a randomly chosen integer of 1 to 6 digits long that completely specifies the noise pattern, make sure it's different for each noise you use. 2 identical seeds will produce identical noise patterns.

Here's my more detailed explanation from elsewhere:

///////////////////////////////////////////

'offset' is the centre value of the noise value, often 0.

'scale' is the approximate variation of the noise value either side of the centre value, often 1.
Depending on the number of octaves and the persistence the variation is usually 1 to 2 times the scale value. The exact variation can be calculated from octaves and persistence.
(To be exact, scale is the variation of octave 1, additional octaves add extra variation, see below).

'spread' is the size in nodes of the largest scale variation. If the noise is terrain height this would be the approximate size of the largest islands or seas, there will be no structure on a larger scale than this.
There are 3 values for x, y, z so you can stretch or squash the shape of your structures, normally you would set all 3 values to be the same, even for 2D noise where the y value is not used).

'octaves' is the number of levels of detail in the noise variation.
The largest scale variation is 'spread', that is octave 1. Each additional octave adds variation on a scale one half the size, so here you will have variation on scales of 2048, 1024, 512 nodes.

'persist' is persistence. This is how large the variation of each additional octave is relative to the previous octave.
Octave 1 always outputs a variation from -1 to 1, the 'amplitude' is 1.
With 3 octaves persist 0.5, a much used standard noise:
Octave 2 outputs a variation from -0.5 to 0.5 (amplitude 0.5).
Octave 3 will output -0.25 to 0.25 (amplitude 0.5 x 0.5).
The 3 octaves are added to result in a noise variation of -1.75 to 1.75.
'persist' is therefore the roughness of the noise pattern, 0.33 is fairly smooth, 0.67 is rough and spiky, 0.5 is a medium value.

'seed' is the magic seed number that determines the entire noise pattern.
Just type in any random number, different for each use of noise.
This is actually a 'seed difference', the noise actually uses 'seed' + 'world seed', to make any noise pattern world-dependant and repeatable.
'seed' then makes sure each use of noise in a world is using a different pattern.
Last edited by paramat on Tue Aug 02, 2016 22:08, edited 1 time in total.
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: Post your mapgen questions here (modding or engine)

by philipbenr » Tue Aug 02, 2016 22:00

Is there a simple way to take the current mapgen and "scale it up" by a factor of X or something easy? So the mountains are taller, the oceans are deeper, the rivers are wider, and things like that? I don't know exactly how the mapgen works, (I have a simplistic idea) so anything you can tell me about parameters, noise based generation or anything will help.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your mapgen questions here (modding or engine)

by paramat » Tue Aug 02, 2016 22:11

Horizontally: just multiply all 3 of the the 'spread' numbers:
spread={x=100, y=100, z=100},

Vertically: any noise called 'terrain_base' 'terrain_alt', 'terrain_higher', 'mount_height' etc. just mulitply the 'scale' number.
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Tue Aug 02, 2016 22:22

Paramat, I know that the normal biomes doesn't work for caves. I want to collect ideas for my own cave biomes
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your mapgen questions here (modding or engine)

by paramat » Tue Aug 02, 2016 22:29

That's perhaps best done in a seperate thread, the discussion will get chopped up and hard to find here. This thread is more for questions about mapgen as it is now.
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: Post your mapgen questions here (modding or engine)

by philipbenr » Tue Aug 02, 2016 22:33

@paramat: Thank you very much. Will experiment with this on the weekend.
 

ozkur
Member
 
Posts: 180
Joined: Wed Oct 07, 2015 20:59
In-game: ozkur or XoRoUZ

Re: Post your mapgen questions here (modding or engine)

by ozkur » Tue Aug 02, 2016 23:27

can you change what caves are made of? (like instead of air, caves could be filled with a different node, like water.)
Biplanes! 'Nuff said

I am a native English speaker, Ich spreche kein Deuscht, mais je parle un pue français.
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your mapgen questions here (modding or engine)

by paramat » Wed Aug 03, 2016 01:37

Core mapgen caves are always air, but you can use 'blob ore' or 'vein ore' to create small caves or tunnels of any material.
 

ozkur
Member
 
Posts: 180
Joined: Wed Oct 07, 2015 20:59
In-game: ozkur or XoRoUZ

Re: Post your mapgen questions here (modding or engine)

by ozkur » Wed Aug 03, 2016 02:02

thanks
Biplanes! 'Nuff said

I am a native English speaker, Ich spreche kein Deuscht, mais je parle un pue français.
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: Post your mapgen questions here (modding or engine)

by TumeniNodes » Wed Aug 03, 2016 02:15

Thank you paramat. Very thorough explanations.
I'm off to the cave to tinker with v7...
Flick?... Flick who?
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

Re: Post your mapgen questions here (modding or engine)

by BrunoMine » Wed Aug 03, 2016 20:30

This seems to be a way to find dungeon:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.set_gen_notify("dungeon")
minetest.register_on_generated(function(minp, maxp, seed)
   local array = minetest.get_mapgen_object("gennotify")
   minetest.chat_send_all(dump(array))
end)

See http://dev.minetest.net/Mapgen_objects
But I want to find elsewhere. Plains or beaches for example. It is possible?
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your mapgen questions here (modding or engine)

by paramat » Thu Aug 04, 2016 01:08

Gen notify only works for certain things, not biomes. However it works for decorations, so if a decoration only occurs in a particular biome ..
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your mapgen questions here (modding or engine)

by paramat » Thu Aug 04, 2016 01:53

TumeniNodes

Try this, it works well. I have matched it as close as possible to your mgflat parameters.
I haven't edited mountain noises, i'll leave that to you.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mgv7_np_terrain_base = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 24
   persistence = 0.6
   scale = 0
   seed = 82341
   spread = (600,600,600)
}
mgv7_np_terrain_alt = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = -23
   persistence = 0.6
   scale = 11
   seed = 5934
   spread = (600,600,600)
}
mgv7_np_persist = {
   flags = defaults
   lacunarity = 2
   octaves = 3
   offset = 0.6
   persistence = 0.6
   scale = 0
   seed = 539
   spread = (2000,2000,2000)
}
mgv7_np_height_select = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 1
   persistence = 0.6
   scale = 4
   seed = 7244
   spread = (600,600,600)
}


Image

^ Nice natural bridge over the river
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

Re: Post your mapgen questions here (modding or engine)

by BrunoMine » Thu Aug 04, 2016 02:18

paramat wrote:it works for decorations, so if a decoration only occurs in a particular biome ..

it looks interesting, but I need to add a decoration only to find it. How can I find a decoration in gennotify?
I want to ride a structure (such as a house, bar, village)
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your mapgen questions here (modding or engine)

by paramat » Thu Aug 04, 2016 06:12

 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Thu Aug 04, 2016 06:35

paramat wrote:TumeniNodes

Try this, it works well. I have matched it as close as possible to your mgflat parameters.
I haven't edited mountain noises, i'll leave that to you.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mgv7_np_terrain_base = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 24
   persistence = 0.6
   scale = 0
   seed = 82341
   spread = (600,600,600)
}
mgv7_np_terrain_alt = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = -23
   persistence = 0.6
   scale = 11
   seed = 5934
   spread = (600,600,600)
}
mgv7_np_persist = {
   flags = defaults
   lacunarity = 2
   octaves = 3
   offset = 0.6
   persistence = 0.6
   scale = 0
   seed = 539
   spread = (2000,2000,2000)
}
mgv7_np_height_select = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 1
   persistence = 0.6
   scale = 4
   seed = 7244
   spread = (600,600,600)
}


This is interesting, but to flat for me. Everything on the same height, no beaches, only steep cliffs...

Can you briefly explain the parameters so that i can tinker around? And is it possible to remove these flying artifacts?
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Thu Aug 04, 2016 08:34

We should really add simplex noise. The perlin artifacts are clear to see in the minimap

Image
Attachments
Bildschirmfoto vom 2016-08-04 10-32-13.jpg
Bildschirmfoto vom 2016-08-04 10-32-13.jpg (518.11 KiB) Viewed 12105 times
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Post your mapgen questions here (modding or engine)

by paramat » Thu Aug 04, 2016 13:52

You can reduce the amount of floaty stuff by reducing 'persistence' (roughness) of 'mgv7_np_mountain', try 0.5, 0.4 maybe as low as 0.3.

2D noise is smooth because it is 'eased' (smoothed) by default, 3D noise is not eased by default except in mgv5, for performance reasons, each eased 3D noise adds roughly 10ms to generation time (huge).
Non-eased 3D noise is spiky and has a grid appearence, ease it using noise flags:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mgv7_np_mountain = {
   flags = eased
   lacunarity = 2
   octaves = 5
   offset = -0.6
   persistence = 0.63
   scale = 1
   seed = 5333
   spread = (250,350,250)
}

You can also un-ease 2D noise with 'flags = noeased'.
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: Post your mapgen questions here (modding or engine)

by TumeniNodes » Thu Aug 04, 2016 16:04

paramat wrote:TumeniNodes

Try this, it works well. I have matched it as close as possible to your mgflat parameters.
I haven't edited mountain noises, i'll leave that to you.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
mgv7_np_terrain_base = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 24
   persistence = 0.6
   scale = 0
   seed = 82341
   spread = (600,600,600)
}
mgv7_np_terrain_alt = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = -23
   persistence = 0.6
   scale = 11
   seed = 5934
   spread = (600,600,600)
}
mgv7_np_persist = {
   flags = defaults
   lacunarity = 2
   octaves = 3
   offset = 0.6
   persistence = 0.6
   scale = 0
   seed = 539
   spread = (2000,2000,2000)
}
mgv7_np_height_select = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 1
   persistence = 0.6
   scale = 4
   seed = 7244
   spread = (600,600,600)
}


Image

^ Nice natural bridge over the river


Thank you paramat for this beautiful base to start with. You need to add a disclaimer / warning this map should not be viewed for the first time with a mouthful of Fruity Pebbles...
I already have about 20 bookmarks within 10 minutes of exploring for awesome build sites :D
This landscape is astounding. So, I am definitely saving these orig settings, and eager to fiddle around with it so I can hopefully become more familiar with all these variables.
Thank you, again
Flick?... Flick who?
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Post your mapgen questions here (modding or engine)

by burli » Thu Aug 04, 2016 16:26

thx paramat, but v7 mapgen is a bitch ;-)

Now most mountains have a gentle smoothed side an a totally insane side

Image

What I miss are "normal" mountains like the Alps. Based on your parameters I was able to generate a relative flat terrain. But now the oceans are also flat :-(

I have to learn a lot about noises

Image
Attachments
Bildschirmfoto vom 2016-08-04 18-23-23.jpg
Bildschirmfoto vom 2016-08-04 18-23-23.jpg (220.79 KiB) Viewed 12105 times
Bildschirmfoto vom 2016-08-04 18-11-39.jpg
Bildschirmfoto vom 2016-08-04 18-11-39.jpg (343.41 KiB) Viewed 12105 times
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: Post your mapgen questions here (modding or engine)

by TumeniNodes » Thu Aug 04, 2016 16:29

burli wrote:thx paramat, but v7 mapgen is a bitch ;-)

Now most mountains have a gentle smoothed side an a totally insane side

Image

What I miss are "normal" mountains like the Alps. Based on your parameters I was able to generate a relative flat terrain. But now the oceans are also flat :-(

I have to learn a lot about noises

Image


Hey, you got your nice beach though... :P (bottom screen)
Flick?... Flick who?
 

Next

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 9 guests

cron