Post your mapgen questions here (modding or engine)

User avatar
burli
Member
 
Posts: 1641
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
(518.11 KiB) Not downloaded yet
 

User avatar
paramat
Developer
 
Posts: 3435
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: 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:

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: 2825
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: 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.

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
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

User avatar
burli
Member
 
Posts: 1641
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
(220.79 KiB) Not downloaded yet
Bildschirmfoto vom 2016-08-04 18-11-39.jpg
(343.41 KiB) Not downloaded yet
 

User avatar
TumeniNodes
Member
 
Posts: 2825
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: 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)
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

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

by burli » Thu Aug 04, 2016 17:24

I found my mountains. This screenshot isn't half of that. It is gigantic.

And the magic parameter is lunarity. If I set it to 3 I get this beautiful surface

Image

If you want to visit this place, here is the map_meta.txt

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, decorations
mg_name = v7
mgv7_cave_width = 0.2
mgv7_np_cave1 = {
   flags = defaults
   lacunarity = 2
   octaves = 3
   offset = 0
   persistence = 0.5
   scale = 12
   seed = 52534
   spread = (61,61,61)
}
mgv7_np_cave2 = {
   flags = defaults
   lacunarity = 2
   octaves = 3
   offset = 0
   persistence = 0.5
   scale = 12
   seed = 10325
   spread = (67,67,67)
}
mgv7_np_filler_depth = {
   flags = defaults
   lacunarity = 2
   octaves = 3
   offset = 0
   persistence = 0.7
   scale = 1.2
   seed = 261
   spread = (150,150,150)
}
mgv7_np_height_select = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 1
   persistence = 0.6
   scale = 4
   seed = 7244
   spread = (600,600,600)
}
mgv7_np_mount_height = {
   flags = defaults
   lacunarity = 2
   octaves = 3
   offset = 256
   persistence = 0.6
   scale = 112
   seed = 72449
   spread = (1000,1000,1000)
}
mgv7_np_mountain = {
   flags = eased
   lacunarity = 3
   octaves = 5
   offset = -0.6
   persistence = 0.3
   scale = 1.4
   seed = 5333
   spread = (250,350,250)
}
mgv7_np_ridge = {
   flags = defaults
   lacunarity = 2
   octaves = 4
   offset = 0
   persistence = 0.75
   scale = 1
   seed = 6467
   spread = (100,100,100)
}
mgv7_np_ridge_uwater = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 0
   persistence = 0.6
   scale = 1
   seed = 85039
   spread = (1000,1000,1000)
}
mgv7_np_terrain_alt = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 0
   persistence = 0.6
   scale = 10
   seed = 5934
   spread = (600,600,600)
}
mgv7_np_terrain_base = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 0
   persistence = 0.6
   scale = 10
   seed = 82341
   spread = (600,600,600)
}
mgv7_np_terrain_persist = {
   flags = defaults
   lacunarity = 2
   octaves = 3
   offset = 0.6
   persistence = 0.6
   scale = 0.1
   seed = 539
   spread = (2000,2000,2000)
}
mgv7_spflags = mountains, ridges
seed = 10451164194390179830
water_level = 1
[end_of_params]
Attachments
Bildschirmfoto vom 2016-08-04 19-15-58.jpg
(410.85 KiB) Not downloaded yet
 

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

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

by burli » Fri Aug 05, 2016 08:28

Another question. I want to make realistic lakes/ponds. Any idea how to make them?

Image
Attachments
Bildschirmfoto vom 2016-08-05 08-25-04.jpg
(80.42 KiB) Not downloaded yet
 

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

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

by paramat » Fri Aug 05, 2016 14:22

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

The insane sections are caused by rivers, anything above the river is cut away with 3D noise.

It's lacunarity not lunarity :] this is the ratio of the scales of variation of adjacent octaves.
Standard lacunarity is 2.0, where each additional octave creates variation on a scale 1/2 that of the previous octave (which is why they're called octaves, it's analogous to musical octaves which is a doubling of frequency).

Lacunarity 3.0 means that if the 'spread' (the scale of variation of octave 1) is 900 nodes, then the 2nd octave creates variation on a scale of 300 nodes, the 3rd octave 100 nodes etc. It's a way to get a wider range of detail with the same number of octaves. it also has a different character.
 

ozkur
Member
 
Posts: 180
Joined: Wed Oct 07, 2015 20:59
Location: 6 minutes in the future
In-game: ozkur or XoRoUZ

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

by ozkur » Fri Aug 05, 2016 17:53

where could i get this?
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: 2825
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

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

by TumeniNodes » Sat Aug 06, 2016 03:10

Okay paramat, here are the results of my tinkering so far : )
I'm loving this. I need to tweak the river-bank setting yet.
I still think adding ridges to mgflat would be great... if the ridges used the same simplistic setting for sloping and width, could be ummmmm... mg V8? :P

Anyway, here are some results

Image

Image

Image
just a little fun with this one :D

Code: Select all
mg_flags = notrees, nocaves, nodungeons, noflat, light, nodecorations

mgv7_np_height_select = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 1
   persistence = 0.6
   scale = 4
   seed = 7244
   spread = (600,600,600)
}
mgv7_np_mount_height = {
   flags = defaults
   lacunarity = 1
   octaves = 2
   offset = 120
   persistence = 0.3
   scale = 60
   seed = 72449
   spread = (1000,1000,1000)
}
mgv7_np_mountain = {
   flags = eased
   lacunarity = 2
   octaves = 4
   offset = -0.3
   persistence = 0.4
   scale = 1
   seed = 5333
   spread = (250,350,250)
}
mgv7_np_ridge = {
   flags = defaults
   lacunarity = 2
   octaves = 4
   offset = 0
   persistence = 0.75
   scale = 1
   seed = 6467
   spread = (100,100,100)
}
mgv7_np_ridge_uwater = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 0
   persistence = 0.6
   scale = 1
   seed = 85039
   spread = (1000,1000,1000)
}
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_terrain_base = {
   flags = eased
   lacunarity = 1
   octaves = 2
   offset = 24
   persistence = 0.6
   scale = 0
   seed = 82341
   spread = (600,600,600)
}
mgv7_np_terrain_persist = {
   flags = defaults
   lacunarity = 2
   octaves = 3
   offset = 0.6
   persistence = 0.6
   scale = 0
   seed = 539
   spread = (2000,2000,2000)
}
mgv7_spflags = mountains, ridges
seed = 5623940581441649840
water_level = 1
[end_of_params]
Attachments
V7 flat03.png
(391.42 KiB) Not downloaded yet
V7 flat02.png
(402.55 KiB) Not downloaded yet
V7 flat01.png
(585.24 KiB) Not downloaded yet
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

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

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

by paramat » Mon Aug 08, 2016 03:20

TumeniNodes,

My noise for seabed (terrain alt) may be a little too deep at a centre value (offset) of y = -23.

For less steep coast/beach divide the offset and scale of height_select by the same amount, for example:
Code: Select all
mgv7_np_height_select = {
   flags = defaults
   lacunarity = 2
   octaves = 5
   offset = 0.5
   persistence = 0.6
   scale = 2
   seed = 7244
   spread = (600,600,600)
}

scale must remain 4 * offset though to keep your preferred ration of lakes to land.
Last edited by paramat on Mon Aug 08, 2016 03:23, edited 1 time in total.
 

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

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

by paramat » Mon Aug 08, 2016 03:22

burli,

Realistic in what way? Size, shape or decorations? Remember it's impossible to decide in code if a body of water is part of a large ocean or part of a small pool.
 

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

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

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

by paramat » Mon Aug 08, 2016 03:49

burli,

> Can you briefly explain the parameters so that i can tinker around?

For mgv7:

2D noises:

terrain_base/alt:
These 2D noises define terrain height for everything except mountains.
Each noise defines a smooth rolling surface, it is the 'height select' noise that then selects which terrain is used at a point.
Confusingly, 'base' is the high terrain at the top of cliffs and 'alt' is the typically lower terrain that creates the seabed, beaches and low hills.
If cliff terrain is below lower terrain then low terrain is used. Cliff terrain is the more rare terrain by default and you can see it rising up out of the lower terrain.

height_select:
This switches between terrains as the noise valuse crosses the range 0 to 1. Boosting the 'scale' boosts cliff steepness. 'offset' controls what proportion of terrain is cliff terrain.

terrain_persist:
Controls the persistence value (terrain roughness) of 'terrain_base' and 'terrain_alt'. 0.6 is a medium-rough value, 0.4 is smoother.

ridge_uwater:
This creates the large scale course of the river, 'spread' is the overall scale of the river pattern, 'persist' is the twistyness of the river, 'octaves' the number of levels of detail in the river course structure.

mount_height:
Controls and varies typical mountain height in nodes over large distances.

3D noises:

mountain:
The actual 3D noise creating mountain terrain, can be 'eased' in the flags for smoother noise.
The relation of 'offset' to 'scale' controls what proportion of world is covered by mountain, for example 'offset = 0' means half the world will be mountain.
Boosting 'scale' to high numbers creates insanely tall mountains and many floatlands up to y = 31000.

ridge:
The actual 3D noise creating the rough cliff surfaces either side of rivers, river channels will cut through any terrain above up to world top.
 

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

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

by burli » Mon Aug 08, 2016 05:22

Paramat, thanks for the explanation of the noises. That clarify some things

paramat wrote:burli,

Realistic in what way? Size, shape or decorations? Remember it's impossible to decide in code if a body of water is part of a large ocean or part of a small pool.


It is, if lakes are above sea level. But I know that this isn't easy. I found an article where they place randomly water sources to the map and use A* to search for rivers and lakes
 

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

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

by paramat » Tue Aug 09, 2016 04:43

Here's my attempt at pools filling natural depressions in core mapgens, can sometimes be slow.
https://forum.minetest.net/viewtopic.php?f=11&t=8400
 

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

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

by burli » Tue Aug 09, 2016 05:14

"Remove the trees". Same thing with caves, because mods only run after everything is done.
 

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

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

by burli » Tue Aug 09, 2016 07:41

The VoxelManip is fast. The carve loop for caves, tunnels, the stone biomes and some ore generation only needs ~40ms, but ...

reading the data needs, ~25ms, writing the data takes around 40ms and, most worse, noise generation. I need currently 5 3d noises. They need together 150-160ms. Each chunk needs an average of ~250ms

So 16% is generation, 26% is data read/write and 58% is noise

How can this be improved?
 

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

The heightmap contains sometimes only -31000.

by burli » Tue Aug 09, 2016 15:15

The heightmap is only valid in mapchunks at water level. Mapchunks above may only contain -31000, but not
always.

I overwrite the chunks with heightmap -31000 with obsidian glass. This is the result

Image

Is this a bug or a feature?
Attachments
screenshot_20160809_171150.jpg
(438.01 KiB) Not downloaded yet
 

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

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

by paramat » Wed Aug 10, 2016 09:56

Yes the highlandpools mod needs work.

5 3D noises is heavy usage, heavier than any core mapgen. A 3D noise is roughy 80 times heavier than 2D noise and occupies a lot of Lua memory. An improvement is noise code optimisation wich hmmmm has mentioned might be possible for 3D noise. You can help by using less octaves in 3D noise.

In core mapgen the heightmap is created by searching down each column in a mapchunk for terrain, if no terrain is found in a column the value is -31000. The heightmap works in all mapchunks not just y = -32 to 47.
 

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

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

by burli » Wed Aug 10, 2016 12:15

paramat wrote:5 3D noises is heavy usage, heavier than any core mapgen

Well, 2 noises for tunnels, one noise for caves, one for "stone biomes" and one for ore generation. It is a huge 3d space. And of course it takes 80 times more because in a chunk there are 80 2d noises

paramat wrote:In core mapgen the heightmap is created by searching down each column in a mapchunk for terrain, if no terrain is found in a column the value is -31000. The heightmap works in all mapchunks not just y = -32 to 47.


I will check that again, but in this case on the screenshot there was terrain in a chunk with a heightmap value of -31000.

And mapchunks below -32 always return -33, -114 (I guess) and so on
 

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

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

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

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

by paramat » Thu Aug 11, 2016 14:50

Some of my mods are insanely heavy users of 3D noise, 'riverdev' has 10 which is far too much for a lua mod.

'flat', 'noflat' only affects mgv6, it is now a 'mgv6_spflag' (mgv6 specific) but was left in 'mgflags' for a while for backwards compatibility. However the flat flag has just now been removed from 'mgflags' to clean up the mess.

> I will check that again, but in this case on the screenshot there was terrain in a chunk with a heightmap value of -31000.

Yes some columns in that mapchunk will have -31000 because terrain was not found in those columns. However the heightmap does work because that is where decorations are placed and they are placed correctly.
 

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

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

by burli » Mon Aug 15, 2016 18:26

I have lines of sand at chunk borders. Has this something to do with this mudflow? How can I remove this?


Image
Attachments
screenshot_20160815_202413.jpg
(312.63 KiB) Not downloaded yet
 

PreviousNext

Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 4 guests