Post your mapgen questions here (modding or engine)

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

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

by burli » Post

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 1826 times

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

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

by paramat » Post

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

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

by TumeniNodes » Post

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
A Wonderful World

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

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

by burli » Post

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 1826 times
Bildschirmfoto vom 2016-08-04 18-11-39.jpg
Bildschirmfoto vom 2016-08-04 18-11-39.jpg (343.41 KiB) Viewed 1826 times

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

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

by TumeniNodes » Post

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)
A Wonderful World

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

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

by burli » Post

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
Bildschirmfoto vom 2016-08-04 19-15-58.jpg (410.85 KiB) Viewed 1826 times

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

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

by burli » Post

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
Bildschirmfoto vom 2016-08-05 08-25-04.jpg (80.42 KiB) Viewed 1826 times

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

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

by paramat » Post

> 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
In-game: ozkur or XoRoUZ
Location: 6 minutes in the future

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

by ozkur » Post

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

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

by TumeniNodes » Post

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
V7 flat03.png (391.42 KiB) Viewed 1826 times
V7 flat02.png
V7 flat02.png (402.55 KiB) Viewed 1826 times
V7 flat01.png
V7 flat01.png (585.24 KiB) Viewed 1826 times
A Wonderful World

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

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

by paramat » Post

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: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

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

by paramat » Post

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: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

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

by paramat » Post

ozkur,

Get what?

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

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

by paramat » Post

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: 1643
Joined: Fri Apr 10, 2015 13:18

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

by burli » Post

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: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

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

by paramat » Post

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

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

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

by burli » Post

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

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

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

by burli » Post

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: 1643
Joined: Fri Apr 10, 2015 13:18

The heightmap contains sometimes only -31000.

by burli » Post

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
screenshot_20160809_171150.jpg (438.01 KiB) Viewed 1826 times

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

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

by paramat » Post

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: 1643
Joined: Fri Apr 10, 2015 13:18

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

by burli » Post

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: 1643
Joined: Fri Apr 10, 2015 13:18

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

by burli » Post

5 3d noises is heavy usage? I count 6 ;-)

https://github.com/paramat/intersecting ... r/init.lua

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

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

by burli » Post

What does the option flat/noflat in mg v5 mean?

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

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

by paramat » Post

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: 1643
Joined: Fri Apr 10, 2015 13:18

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

by burli » Post

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
screenshot_20160815_202413.jpg (312.63 KiB) Viewed 1826 times

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 10 guests