Post your mapgen questions here (modding or engine)
Re: Post your mapgen questions here (modding or engine)
We should really add simplex noise. The perlin artifacts are clear to see in the minimap
- Attachments
-
- Bildschirmfoto vom 2016-08-04 10-32-13.jpg (518.11 KiB) Viewed 1826 times
- 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)
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:
You can also un-ease 2D noise with 'flags = noeased'.
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)
}
- 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)
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...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) }
^ Nice natural bridge over the river
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
Re: Post your mapgen questions here (modding or engine)
thx paramat, but v7 mapgen is a bitch ;-)
Now most mountains have a gentle smoothed side an a totally insane side
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
Now most mountains have a gentle smoothed side an a totally insane side
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
- Attachments
-
- Bildschirmfoto vom 2016-08-04 18-23-23.jpg (220.79 KiB) Viewed 1826 times
-
- Bildschirmfoto vom 2016-08-04 18-11-39.jpg (343.41 KiB) Viewed 1826 times
- 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)
Hey, you got your nice beach though... :P (bottom screen)burli wrote:thx paramat, but v7 mapgen is a bitch ;-)
Now most mountains have a gentle smoothed side an a totally insane side
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
A Wonderful World
Re: Post your mapgen questions here (modding or engine)
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
If you want to visit this place, here is the map_meta.txt
And the magic parameter is lunarity. If I set it to 3 I get this beautiful surface
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) Viewed 1826 times
Re: Post your mapgen questions here (modding or engine)
Another question. I want to make realistic lakes/ponds. Any idea how to make them?
- Attachments
-
- Bildschirmfoto vom 2016-08-05 08-25-04.jpg (80.42 KiB) Viewed 1826 times
- 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)
> 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.
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.
-
- 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)
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.
I am a native English speaker, Ich spreche kein Deuscht, mais je parle un pue français.
- 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)
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
just a little fun with this one :D
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
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) Viewed 1826 times
-
- V7 flat02.png (402.55 KiB) Viewed 1826 times
-
- V7 flat01.png (585.24 KiB) Viewed 1826 times
A Wonderful World
- 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)
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:
scale must remain 4 * offset though to keep your preferred ration of lakes to land.
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)
}
Last edited by paramat on Mon Aug 08, 2016 03:23, edited 1 time in total.
- 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)
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.
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.
- 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)
ozkur,
Get what?
Get what?
- 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)
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.
> 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.
Re: Post your mapgen questions here (modding or engine)
Paramat, thanks for the explanation of the noises. That clarify some things
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 lakesparamat 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.
- 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)
Here's my attempt at pools filling natural depressions in core mapgens, can sometimes be slow.
viewtopic.php?f=11&t=8400
viewtopic.php?f=11&t=8400
Re: Post your mapgen questions here (modding or engine)
"Remove the trees". Same thing with caves, because mods only run after everything is done.
Re: Post your mapgen questions here (modding or engine)
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?
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?
The heightmap contains sometimes only -31000.
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
Is this a bug or a feature?
always.
I overwrite the chunks with heightmap -31000 with obsidian glass. This is the result
Is this a bug or a feature?
- Attachments
-
- screenshot_20160809_171150.jpg (438.01 KiB) Viewed 1826 times
- 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)
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.
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.
Re: Post your mapgen questions here (modding or engine)
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 noisesparamat wrote:5 3D noises is heavy usage, heavier than any core mapgen
I will check that again, but in this case on the screenshot there was terrain in a chunk with a heightmap value of -31000.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.
And mapchunks below -32 always return -33, -114 (I guess) and so on
Re: Post your mapgen questions here (modding or engine)
What does the option flat/noflat in mg v5 mean?
- 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)
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.
'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.
Re: Post your mapgen questions here (modding or engine)
I have lines of sand at chunk borders. Has this something to do with this mudflow? How can I remove this?
- Attachments
-
- screenshot_20160815_202413.jpg (312.63 KiB) Viewed 1826 times
Who is online
Users browsing this forum: Bing [Bot] and 10 guests