Page 1 of 2

[0.4.12-dev] Mapgen news

Posted: Sat Mar 07, 2015 04:37
by paramat
Mapgen news for 0.4.12dev


Decorations can now be placed on water but only at the defined mapgen 'water_level' (usually y=1), useful for lilypads, small boats etc.


Schematic decorations can now use a 'force_placement' flag to replace pre-existing nodes, useful for tree roots, boulders, houses, boats in water or anything that should penetrate the ground or sea.
"air" nodes will be force placed, so to prevent a schematic's node being force placed the node must be "ignore" or be any node with a probability of 0.
So for a schematic boat in the water, the air within the hull must be (and is) force placed, the nodes outside the hull must be "ignore" or any node (usually "air") with probability 0.
In your schematic decoration definition add 'force_placement' to the flags:

Code: Select all

flags = "place_center_x, place_center_y, place_center_z, force_placement",
You may need to use the 'place_centre_y' flag to place the schematic's centre at ground (or sea) level.


Floating dungeons and floating dungeon slices can now be disabled with this line in minetest.conf:

Code: Select all

enable_floating_dungeons = false
The default is true to match previous behaviour.
Disabling floating dungeons will also disable the unbroken dungeons that sit on the terrain and project out of it, as on the left side here:


Image

Re: Mapgen news

Posted: Thu Mar 19, 2015 15:14
by paramat
Image


Mapgen news for 0.4.12dev

My in-progress development work on biomes for mgv5/mv7 is here as a mod https://github.com/paramat/biomesdev
For use with latest 0.4.12dev. Useful as an example of how to use the latest version of the biome API.

Re: Mapgen news

Posted: Thu Mar 19, 2015 15:39
by 12Me21
Is there any way of finding out which biome you're in (like in the F5 menu or something)?This would be very useful; for example, if you were adding a new biome, it would make it easier to test.

Re: Mapgen news

Posted: Thu Mar 19, 2015 18:13
by Krock
12Me21 wrote:Is there any way of finding out which biome you're in (like in the F5 menu or something)?This would be very useful; for example, if you were adding a new biome, it would make it easier to test.
Upon a time, it was possible to get the temperature and humidity of the current postition.
I doupt there is a way except reading the node you're standing on.

Re: Mapgen news

Posted: Thu Mar 19, 2015 18:15
by Echoes91
paramat wrote: My in-progress development work on biomes for mgv5/mv7 is here as a mod https://github.com/paramat/biomesdev
For use with latest 0.4.12dev. Useful as an example of how to use the latest version of the biome API.
Nice! I was about to release a first attempt to define biomes with the newest API and decorations (trees) with inline schematic definition, right yesterday. I wasn't anything else more than an experiment, since the new API is not exactly well described into the wiki, so thanks for saving me from a lot of trial and error :)

Re: Mapgen news

Posted: Fri Mar 20, 2015 02:14
by Don
Awesome

Re: Mapgen news

Posted: Thu Apr 23, 2015 06:44
by paramat
Mapgen news for 0.4.12dev
Texts copied from Github so please excuse the use of tenses.


Biome API: Re-calculate biome at every upper surface detected while working down a mapchunk column.
Removes 'node shore top', 'node shore filler', 'node underwater', 'height shore'.
Enables an unlimited number of biome layers within a mapchunk.
See https://github.com/paramat/biomesdev as an example of how to use this new biome API.


Mgv6: Add heightmap. Do not make large caves that are entirely above ground.
This fixes the common shadow bugs in mgv6.
Adds a heightmap to mgv6, which is needed by decorations if they are used in future in mgv6.
Mgv5 and mgv7 already have heightmaps, the heightmap is available for use in an 'on generated' function as the 'mapgen object heightmap'.
Checks startpoint and endpoint of large caves, if both are above ground aborts cave generation, if one is above and one below the cave passes through the surface and therefore is needed to shape terrain as currently.
Tested by flying around for 5 minutes, could not find a single shadow bug.
I also tested the code by making large caves formed from water nodes to confirm they are still often formed intersecting (and therefore shaping) the terrain surface, while also not being formed high above terrain as noticed before.
This may occasionally slightly change mgv6 terrain from how it has been before, but this will be very rare and i feel is justified by the bugfix.
For details of the cause and the fix see https://github.com/minetest/minetest/issues/1190


Mgv7: Lava caves only below -256
Only flood large caves with lava below -256, to match mgv5 which only has large caves, and therefore lava, below -256. Gold appears at -64 and diamond at -128, makes good sense to have lava below these not above. Also to create more of a challenging destination, instead of having lava just below surface as in mgv6.


Mgv5/mgv7: Add desert temples if desert stone detected in mapchunk.
'Desert temples' are the desert dungeons, currently not found in mgv5 or mgv7.


Mgv6: Desert stone above y = -32 not water_level.


Mgv7: 1 up , 1 down overgeneration for chunk border continuity.
Adds mgv5 type overgeneration to mgv7. Each mapchunk's generation is extended vertically by 1 node up and 1 node down, the overlap solves some mapchunk border glitches.
Fixes stone layer in base/alt terrain at y = 47 when base/alt terrain exceeds y = 47.
Also fixes missing dust and missing biome node glitch at y = 47 in mountain terrain.

Re: Mapgen news

Posted: Thu Apr 23, 2015 11:13
by twoelk
not diving into the code, I wonder wether there allready are functions present to merge newly generated terrain to allready existing. This could be usefull to avoid hard borders such as huge orthographic cliffs when the mapgen is changed on an existing world or something is copied from outside the current active mapgen into the map.

For example if I merge two large large previously independent maps or I insert some large prebuild object by inserting it with some tool other than minetest into the database.

It could also be interesting to generate different regions of a map using different mapgens at different times and have some current default mapgen to soften the border regions.

I could imagin a server owner to use a flat mapgen while creating the spawn area. After having generated a big enough area he could restart using mg6. The new mapgen notices the existing flatland and blends the newly created terrain at the borders accordingly until at some distance it can do it's job as designed. Some time later the server owner wants to add something different and teleports to say 10000, 10000 after having activated mg5. There without any connection to existing terrain he generates an area with this mapgen. He then leaves the area and switches the mapgen back to mg6. After some while some player ventures far enough to reach the pregenerated area and the activated mapgen now notices the allready present terrain and adjusts the terrain it is just generating to merge to the old borders in a convincing way.

The idea is not to have to install mods for this but to be able to switch between the default mapgens or switch between mapgen configurations without generating hard borders.
If at some time this could also work to integrate some terrain generated with lua mapgens all the better.

Re: Mapgen news

Posted: Tue Apr 28, 2015 19:07
by paramat
No code is present that can help with this.
It's an interesting idea that occurred to me too recently, because i am always uncomfortable with the core mapgen expectation that at some point it is considered 'finished' and then must not be changed to preserve worlds. Mapgen is never finished for me, but then i end up breaking player's worlds. This is why i left watershed as it is and started riverdev (watershed2) to continue development.

Re: Mapgen news

Posted: Tue Apr 28, 2015 19:13
by paramat
Mapgen news for 0.4.12dev.

Here is my mod that is a useful example of how to use the recently added 'minetest.serialize_schematic()' function to convert a lua-table defined schematic into a .mts file saved in a schems folder in the mod https://github.com/paramat/saveschems
Here it is being used to convert my trees into .mts files for use in mgv5/v7 biomes.
Add in your own lua-table schematic, change the names present in the code, clear the schems folder, then just run the mod in-game, the schematics are converted on mod startup.
Creating a schematic by a lua table is often the best way especially for smaller or symmetrical structures such as trees. Using worldedit does not allow you to place "air" nodes with probability zero, which are essential for force-placed schematics.

Re: Mapgen news

Posted: Tue Apr 28, 2015 19:26
by Sokomine
As mapchunks overlap with other mapchunks by 16 nodes, a new mapchunk sandwiched between mapchunks generated by two diffrent worlds would at least have something to work on - namely the terrain at its borders. That is, if they have been generated. If not, it'd have to force generation of its neighbours on up to four sides (top and bottom are less intresting in that regard). Could be time consuming.

Adjusting height could be done more or less the same way as it's done with the villages. Paramat wrote some nice terrain blending function for such situations. The intermediate mapgen might have its own generation function and translante between that and its neighbours - thus not having to translate between them direclty. Biomes are a diffrent matter. Another method might be to run all sourrounding mapgens on the current mapchunk and mix their results using some internal noise function.

All that would still require some way to determine which mapgen ought to be applied to which place. And if they use diffrent chunk sizes, it won't work at all anymore.
paramat wrote: Here is my mod that is a useful example of how to use the recently added 'minetest.serialize_schematic()' function to convert a lua-table defined schematic into a .mts file saved in a schems folder in the mod https://github.com/paramat/saveschems
I've never used those tables so far. Instead, mg_villages contains code to convert WorldEdit .we files into .mts format.

Re: Mapgen news

Posted: Wed May 20, 2015 03:53
by paramat
The default biome API heat and humidity noise parameters will be changing soon, as will the terrain noises for mgv7.
Details of changes are here https://github.com/minetest/minetest/pull/2706
These changes will not affect your existing worlds or servers, only new worlds.

Re: Mapgen news

Posted: Wed May 20, 2015 18:40
by Smitje
Sorry for bumping an old thread,

I'm a builder I like a basic set of biomes like this, as long as nothing better is there this should be the default for mgv7 imho.
This mod looks good for v5 and v7 (I love the frozen oceans etc.) but I am not getting any trees. I'm using minetest 0.4.12
Is there a setting I need to change in .conf or do I need a newer version?

Thanks, Smitje

Re: Mapgen news

Posted: Wed May 20, 2015 19:28
by paramat
No trees in biomesdev mod? it has been updated to use the latest schematic format, you need the very latest 0.4.12dev.

About my post above, i made a silly mistake *=/ You won't need to add noise parameters to minetest.conf because of course they are stored in map-meta.txt. The noise parameter changes will not affect your existing worlds or servers, only new worlds.

Re: Mapgen news

Posted: Tue May 26, 2015 19:21
by Smitje
Thanks,
Just downloaded and it works now.

That's beautiful! I love the noise settings the biomes are vast! finally a jungle you could actually get lost in.
Only the edges are very straight, I might try adding some blend biomes to ease the transitions later as an exercise.

Cheers Smitje

Re: Mapgen news

Posted: Tue May 26, 2015 22:32
by paramat
Yes there's no biome blend in the biome API, hmmmm dislikes it. I prefer straight-edged now as blend can sometimes create large messy areas.

Re: Mapgen news

Posted: Tue May 26, 2015 22:37
by Kenney
paramat wrote:Yes there's no biome blend in the biome API, hmmmm dislikes it. I prefer straight-edged now as blend can sometimes create large messy areas.
I'd love to see biome blending though, maybe it can be done by just adding a jaggy edge that can be specified in the biome registration?

Re: Mapgen news

Posted: Fri May 29, 2015 23:08
by paramat
I think i'll try it and see if i can make it non-messy, i am responsible for the biome API now so i could add this as an option, there could also be vertical blend between stacked biomes.

Re: Mapgen news

Posted: Sat May 30, 2015 00:46
by Don
I love nature. I nature there is no line separating biomes. Nature leaves it messy.
I like the biome blending. I say leave it messy.

Re: Mapgen news

Posted: Sat May 30, 2015 07:15
by IvĂ 
+1 for biome blending too.

Re: Mapgen news

Posted: Sun May 31, 2015 19:00
by Smitje
Hi biomates.

@Paramat, I did not say I didn't like it. It is by far the best yet! Im a big fan.

I tried adding a 'lite rainforest' with identical parameters except humidity 90 and a jungle tree decoration with a density of 0.2 (compared to 100 and 0.8 for the regular rainforest) but it was not working. I think it blocked out the original cause al the rainforest looked less dense. Is there a way to specify a range, or should it be done in a special order?

Is there any documentation on these biome parameters? I couldn't find any, also for the schematics, they show up as .mts but I have no idea how to open those, let alone edit them.

Cheers Smitje

Re: Mapgen news

Posted: Sun May 31, 2015 23:47
by paramat
When adding a biome, you need to move all the 'biome points' around on a 2D map of heat against humidity, and make sure the points are roughly equally spaced, if 2 points are too close (humidity 90 and 100) then one of those biomes might become rare. So for your lite rainforest or a savanna you could try a humidity of 50-70.

This mod viewtopic.php?f=9&t=12011 will convert a (easily editable) lua table schematic definition to a .mts file you can use in the biome API.

No documentation yet for the biome API as it's not quite stable.

Re: Mapgen news

Posted: Sun Jun 28, 2015 14:50
by 4aiman
deleted

Re: Mapgen news

Posted: Thu Jul 30, 2015 01:47
by paramat
Image

Mapgen news for 0.4.12dev

The full biome system for mgv5 and mgv7 has been added. It is very usable but for a few months will continue to be subtly tuned and improved and i will consider feedback and suggestions from users. So for a while there will be no promise of it being in an unchanging state.

There are no ores in the sandstone and desert stone, in those 2 biomes you need to dig to below y = -112 where normal stone is present everywhere and down to world base.

Re: Mapgen news

Posted: Thu Jul 30, 2015 19:42
by TenPlus1
Nice one Paramat :)