Post your mapgen questions here (modding or engine)

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 Sep 06, 2016 04:14

mgv7_np_mountain = -0.6, 1, (850, 1450, 850), 5333, 5, 0.68, 2.0

Mountain noise is a 3D noise, the scale of the structures is controlled and stretched by the 'spread' numbers:
(850, 1450, 850)
You can see that the y scale is much larger than the x, z scales, so the shapes are stretched upwards, this is intentional in mgv7 but you should try increasing the x and z spreads.
(1450, 1450, 1450) Will create wider unstretched shapes.
For fewer floaty bits reduce 'persistence' (0.68) to around 0.6 or 0.5.
 

User avatar
BrandonReese
Member
 
Posts: 839
Joined: Wed Sep 12, 2012 00:44
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese
 

User avatar
demon_boy
Member
 
Posts: 48
Joined: Thu Apr 09, 2015 10:53
Location: Melbourne, Australia
GitHub: vlapsley
In-game: demon_boy

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

by demon_boy » Tue Sep 13, 2016 11:51

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

Image


I've spent a few months refactoring my Australia mod and I'm not far from completion.

I've used a combination of some plantlife mods, Valleys Mapgen plants API and some of DuaneR code to get something close to what you are might call realistic.

What I have managed to achieve is a riparian zone. I have trees and plants following rivers. Some only spawn by rivers. Note the bare landscape away from the river.
Image


Also, I've got green grass growing near rivers, reeds and juncus on the banks. A few lillies nearby.
Image
 

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 » Tue Sep 13, 2016 17:17

Really nice work demon_boy. Much attention to details
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 » Tue Sep 13, 2016 18:39

Looks really nice. But I also mean lakes/ponds with an more or less natural shape. But I think with the current mapgens it is impossible
 

User avatar
Serh Arien
Member
 
Posts: 68
Joined: Tue Nov 03, 2015 19:53

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

by Serh Arien » Thu Oct 06, 2016 19:17

burli wrote:Maybe someone find this useful. This is the most simple Lua mapgen. Just generates stone and water

And maybe someone can replace the example in the get_perlin_map Wiki page. It does not work. I need a while until I found that get2dMap_flat doesn't want 3d coordinates

Code: Select all
minetest.set_mapgen_params({mgname="singlenode"})

minetest.register_on_generated(function(minp, maxp, seed)

   local c_stone = minetest.get_content_id("default:stone")
   local c_water = minetest.get_content_id("default:water_source")
   local c_air = minetest.get_content_id("air")
   local c_ignore = minetest.get_content_id("ignore")

   local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
   local data = vm:get_data()
   local a = VoxelArea:new({MinEdge = emin, MaxEdge = emax})
   local csize = vector.add(vector.subtract(maxp, minp), 1)

   local write = false

   local noise_1 = minetest.get_perlin_map({offset = 5,
                                      scale = 15,
                                      seed = 1234,
                                      spread = {x = 250, y = 250, z = 250},
                                      octaves = 5,
                                      persist = 0.6,
                                      lacunarity = 2,
                                      flags = "defaults"},
                                      csize):get2dMap_flat({x=minp.x, y=minp.z})   
   local index2d = 0
   for z = minp.z, maxp.z do
   for y = minp.y, maxp.y do
   for x = minp.x, maxp.x do
         
      index2d = (z - minp.z) * csize.x + (x - minp.x) + 1   
      local ivm = a:index(x, y, z)

      if y < noise_1[index2d] then
         data[ivm] = c_stone
         write = true
      elseif y > noise_1[index2d] and y < 1 then
         data[ivm] = c_water
         write = true
      end
   end
   end
   end

   if write then
      vm:set_data(data)
      vm:set_lighting({day = 0, night = 0})
      vm:calc_lighting()
      vm:update_liquids()
      vm:write_to_map()
   end

end


Image


Hi i need to make a big ocean as burly made but without stone above the water (sand would be better )
How am i suppose to do?
Or do anyone know a mod to get the all map a ocean?
Thx
 

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 Oct 07, 2016 19:12

Mgv7 can do that, disable mountains and 'ridges' (rivers), and use custom noise parameters to lower the 2 smooth terrains below water_level. See an earlier post in this thread explaining the mgv7 noise parameters.
 

User avatar
Fixer
Member
 
Posts: 890
Joined: Sun Jul 31, 2011 11:23
Location: Ukraine
IRC: Fixer
In-game: Fixer

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

by Fixer » Sun Oct 09, 2016 23:52

I would like to see some kind of FAQ topic about at least v7 mapgen, about basic stuff with basic questions, like:
+ how to shift terrain down/up? (changing water level)
+ how to stretch terrain horizontally/vertically?
+ how to make single biome world?
+ how to make biomes bigger/smaller?
+ how to shift general climate to colder/hotter?
+ how to shift humidity to arid/humid?
+ how to make ocean world?
+ how to make desert world?
+ how to turn off caves/rivers/hills
+ how to make hills bigger and oceans deeper?
+ how to make big hills with low slopes?
+ how to make slightly hilly world?
 

User avatar
BirgitLachner
Member
 
Posts: 379
Joined: Thu May 05, 2016 10:18
In-game: Bibs

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

by BirgitLachner » Mon Oct 10, 2016 05:55

demon_boy wrote:
I've spent a few months refactoring my Australia mod and I'm not far from completion.

I've used a combination of some plantlife mods, Valleys Mapgen plants API and some of DuaneR code to get something close to what you are might call realistic.

What I have managed to achieve is a riparian zone. I have trees and plants following rivers. Some only spawn by rivers. Note the bare landscape away from the river.
Image

Also, I've got green grass growing near rivers, reeds and juncus on the banks. A few lillies nearby.
Image


This looks nice ... it is in my opinion a good idea to have changes for the water in some of the biomes. And specially for the dry bioms there should be green plants close to the water like on your second picture. There should be an oasis if there is a bigger amount of water in the dessert.

The problem will be of cause that in dry areas there should be less water. But therefore you need to have smaller rivers oder a lower water level. But changing/deleting the blocks is a Problem, isn't it?
 

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 Oct 20, 2016 06:52

To save you some frustration, here is how to use the new 'minetest.set_mapgen_setting_noiseparams()' to set noise params in a mod. Hmmmm's intention is to move the setting of noise params out of .conf and into lua mods.
The documentation on this is confusing as it suggests the use of 'override_meta = true' as the 3rd argument, whereas it is simply 'true' or 'false'.

Code: Select all
minetest.set_mapgen_setting_noiseparams(
   "mg_biome_np_heat",
   {
      offset = 50,
      scale = 50,
      spread = {x = 1000, y = 1000, z = 1000},
      seed = 5349,
      octaves = 3,
      persistence = 0.5,
      lacunarity = 2.0,
      flags = "defaults"
   },
   true
)
 

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 Oct 21, 2016 00:54

Update on the use of the 'override_meta' bool.

The biome heat / humidity noise parameters are written to map_meta.txt on new world creation in main menu, but the noise parameters for the individual mapgens (mgv5, v6. v7, valleys etc.) are written when leaving a newly-generated world.
So, 'override meta' must be true when setting biome heat / humidity noise parameters for a newly created world.
'Override_meta' can be left as the default of false when setting individual mapgen noise parameters for a newly created world.

Also of course overriding meta allows you to change any noise parameters for an existing world.
 

User avatar
duane
Member
 
Posts: 1582
Joined: Wed Aug 19, 2015 19:11
Location: Oklahoma City
GitHub: duane-r

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

by duane » Fri Oct 21, 2016 03:03

paramat wrote:To save you some frustration, here is how to use the new 'minetest.set_mapgen_setting_noiseparams()' to set noise params in a mod. Hmmmm's intention is to move the setting of noise params out of .conf and into lua mods.
The documentation on this is confusing as it suggests the use of 'override_meta = true' as the 3rd argument, whereas it is simply 'true' or 'false'.

Code: Select all
minetest.set_mapgen_setting_noiseparams(
   "mg_biome_np_heat",
   {
      offset = 50,
      scale = 50,
      spread = {x = 1000, y = 1000, z = 1000},
      seed = 5349,
      octaves = 3,
      persistence = 0.5,
      lacunarity = 2.0,
      flags = "defaults"
   },
   true
)


Is this going to be the only way to change noises? It's hard enough explaining how to modify them in minetest.conf. A lot of people won't bother if they have to write a mod just to make mountains higher.
Believe in people and you don't need to believe anything else.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

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 » Sat Oct 22, 2016 23:43

No, one of three ways, sorry my use of 'move' was unclear, i mean hmmmm prefers noises to be set in mods since .conf is so cluttered. There is also .conf and advanced settings, no plans to deprecate setting noise in those.

However, advanced settings and single-line noise parameters in .conf cannot set noise flags (eaeed noise, absolute-octave noise). To set noise flags in .conf requires a noise table like the above to be added, so putting the noise table in a mod is barely any more complex. It's more convenient to do this in a mod than in .conf, you can just enable / disable the mod instead of adding / deleting lines in .conf. Also mods can be published and shared.
 

User avatar
pithy
Member
 
Posts: 251
Joined: Wed Apr 13, 2016 17:34
GitHub: pithydon

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

by pithy » Mon Nov 21, 2016 17:49

How does yslice_prob work?
If I want to make a trunk have a 50% chance of being 2 nodes 25% being 3 nodes and 25% being 1 node what would I do?
 

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 Nov 21, 2016 23:26

Yslice is counted from 0 from schematic base to top.
The schematic is added to the world in y slices from base to top, the yslice_prob decides whether each slice is included or skipped. The lowest slice is always at ground level so is like a 1 node 'root'.
I think that yslices 2 and 3 with prob 127 (50% chance) would do it, as you have 4 possibilities, 2 of which result in a 2 node high trunk.
 

User avatar
pithy
Member
 
Posts: 251
Joined: Wed Apr 13, 2016 17:34
GitHub: pithydon

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

by pithy » Tue Nov 22, 2016 01:08

Maybe I'm thick headed.
I still don't understand how the odds work.
I read the manual to.
What odds would the following code give me?
Code: Select all
yslice_prob = {
    {ypos = 1, prob = 127},
    {ypos = 2, prob = 63}
}
 

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

User avatar
pithy
Member
 
Posts: 251
Joined: Wed Apr 13, 2016 17:34
GitHub: pithydon

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

by pithy » Tue Nov 22, 2016 15:45

What would happen if I did...
Code: Select all
yslice_prob = {
    {ypos = 1, prob = 255},
    {ypos = 2, prob = 255}
}
 

User avatar
pithy
Member
 
Posts: 251
Joined: Wed Apr 13, 2016 17:34
GitHub: pithydon
 

User avatar
firefox
Member
 
Posts: 1489
Joined: Wed Jan 14, 2015 07:34
Location: Xanadu
In-game: Red_Fox

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

by firefox » Tue Nov 22, 2016 19:35

pithy wrote:And how do I make a biome rare?

by giving it very low or high parameters.
heat=50 is much more common than 0 or 100 ;)

a 50-50 biome will probably be the most common, with 100-50, 0-50, 50-100 and 50-0 in second.
putting values like 100-100, 0-0, 100-0 and 0-100 will make it rarer than the others.

how rare it is exactly will also depend on it's "size", which is determined by the relative positions of the other biomes.
so a biome with a 0 parameter and another one with a 50 will collide at 25, so any place with a value below 25 will feature the biome with the 0. if you move the other biome to 30 or add yet another biome in between 0 and 50, then the 0 biome will become more rare.
building inspiration: viewtopic.php?f=3&t=15550 --- my game: viewtopic.php?f=49&t=15860 --- =(^.^)= nyan~
 

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 Nov 22, 2016 21:29

prob = 255 is 100% chance so no point in defining a y_slice.

To make biome rare its voronoi cell needs to be small on the heat-humidity voronoi diagram.
See https://forum.minetest.net/viewtopic.php?f=47&t=11603
and this is the diagram for ethereal mapgen https://www.geogebra.org/m/u2ngcd5F

You would 'clear registered biomes' then re-register them with new 'biome points' (heat and humidity parameters).
GeoGebra is very useful for designing a new voronoi diagram, see https://forum.minetest.net/viewtopic.php?p=230857#p230857
 

User avatar
TenPlus1
Member
 
Posts: 2610
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Wed Nov 23, 2016 09:42

@paramat - I'm still thinking of re-doing ethereal biomes to spread them out more instead of realistic temps.
 

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 Dec 15, 2016 04:53

This thread has useful information about the Biome API, heat and humidity points, and how biome is chosen for a particular point in the world https://forum.minetest.net/viewtopic.php?f=47&t=11603
 

User avatar
nomohakon
Member
 
Posts: 219
Joined: Fri Aug 10, 2012 16:34
Location: VanessaE's servers
IRC: nomohakon
In-game: nomohakon

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

by nomohakon » Thu Dec 22, 2016 19:35

Where can i find some examples of singlenode mapgen? So far i seen it only mentioned, also how do i set different node than air to be generated by it? Simple but complete file would be great.
 

PreviousNext

Return to Modding Discussion



Who is online

Users browsing this forum: MSN [Bot] and 4 guests