Page 1 of 18

[Mod][Merged] Valleys Mapgen [valleys_mapgen]

PostPosted: Sat Mar 07, 2015 09:44
by Gael de Sailly
Hello !
This is my second mapgen. It aims to create various but realistic landscapes.
It's now also developed by duane and vlapsley.

This mapgen is now added in MT's core since January 14th 2016. It has been slightly modified, to be adapted to the core API and Minetest Game. Here this is the original Lua version.
Image

Some features :
  • Rivers : placed by a 2D noise (it may change), they have around 5 blocks width and 3 blocks depth. By default you can find rivers from height 0 to 120.
  • Mountains : modeled by 5 2D noises and a 3D noise. They are sometimes smooth and sometimes sharp and they can go up to y=200. My personal record : 278 with seed 9053682054377397076, at (239 ; 0).
  • Biomes : there are not formerly defined. That one of the principles of this mod. In fact, the terrain has various proportions of clay, silt and sand, various dirt thickness, humidity and heat. Every plant/tree has its own biome definition, resulting in very various biomes. So that's the plants themselves that define the biomes.
  • Vegetation : Valleys Mapgen generates 27 different plants:
    • 7 trees:
      • Default apple tree
      • Jungle tree
      • Pine tree
      • Fir tree
      • Banana tree
      • Birch tree
      • Cherry blossom tree
    • 12 flowers:
      • The 6 flowers from default
      • Gerbera
      • Arrow Arum
      • Bird of Paradise
      • Hibiscus
      • Orchid
      • Calla Lily
    • 2 mushrooms from default
    • Giant mushrooms (with setting "cave_stuff = true" in vmg.conf or "vmg_cave_stuff = true" in minetest.conf)
    • Cactus
    • Papyrus
    • Grass
    • Jungle grass
    • Dry Shrub
  • Trees generation : Valleys Mapgen has a somewhat strange way to generate trees, but it seems to work pretty well and results in very various shapes of trees. I use 3D Perlin Noises, with a spread parameter around 8, to place a sphere of leaves, distorted by the noise. I call it "leavesblobs". Trees are not all perfect, that the wanted effect. Some trees have very few leaves, that's why happen in the real world.
  • Altitude effects : the temperature parameter is decreased by climbing up. Snow begins to appear at 100 blocks height in average (you can change it in settings). The dirt thickness is also decreased by the altitude : no more dirt at 150 blocks in average, by default.
  • Ores : Valleys Mapgen supports all ores defined by minetest.register_ores, thanks to the new function minetest.generate_ores(vm, minp, maxp), and all of the ores from darkage.
  • Mapgen versions compatibility : if you download the mod and then I make a new version, and you update the mod, the mapgen will not change in old worlds, to avoid mapchunks gaps. It only supports the released versions.
  • Player spawner : You appear ON the ground, not IN, and not on an ocean either.
  • Settings : noises and many other features can be set in minetest.conf. See vmg.conf.example.

+ More screenshots
Video with 1.3 (French)
Video with 2.0 (French)
Mod review in English by NathanS

Download (rename to "valleys_mapgen") :
Latest (Code on Github)
Version 2.2 (Code on Github)
(I don't know why I've named the first version 1.0 and not 0.0)

Depends : default, minetest 0.4.12+ (or 0.4.11-dev after January 5). Prefer Minetest 0.4.12-dev after March 11th.
License : GNU General Public License

High-resolution textures added in HDX

Feel free to propose improvements :-)

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sat Mar 07, 2015 10:57
by Krock
I looked into the codes and I'm surprised how well coded it is.
Adding trees to make the landscape even more beautiful would be a good idea.
Also, you could increase the minimal dirt depth, it doesn't look nice on some places because there's just stone.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sat Mar 07, 2015 11:18
by Gael de Sailly
Krock wrote:Also, you could increase the minimal dirt depth, it doesn't look nice on some places because there's just stone.

I wanted places with only stone, but it happens too often and on too large areas. I will tweak the parameters of noise 7, by reducing scale and adding octaves.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sat Mar 07, 2015 12:26
by twoelk
Looks very promising.
Having a "reward" on top of a mountain doesn't sound that bad but I havn't tried your mapgen yet so I don't know how much is too much. :-)

I am all for large mountains as long as they look at least a bit naturall and not like some needles about to topple over. I wonder if some really large scale noise would be possible. I dream of mountains that may be 500 nodes high but also have a basis that is twice as wide giving an average slope of 45 degrees or even less. Or large diverse highland areas with highland water. Not just the generall 20 nodes high plateaus and mesas we now have so often. Just imagine having something like the Ngorongoro crater in the Serengeti of east Africa in Minetest -
+ a world appart hidden in an old caldera/crate

I don't know if Paramat ever got the rivers flowing in riverbeds really functional but that is a problem I would love to be solved in Minetest and that would surely put Minetest above all competitors.

As for the diversity, I would assume having biomes of different scales would also help. Like we allready have for the beach for example. Just as with terrain hight. I would imagine a relative large scale pattern of biomes according to temperatur, humidity, hight and light that is dotted with micro biomes at terrain edges and special places. If for some reason there is a small pond in a desert then a tiny oasis should be generated. Similar things could happen at all water edges, not just beaches and swamps.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sat Mar 07, 2015 16:04
by Gael de Sailly
twoelk wrote:I dream of mountains that may be 500 nodes high but also have a basis that is twice as wide giving an average slope of 45 degrees or even less.

We have not the same opinion about it. So I have an idea : implementing a way to change mapgen parameters before world creation, in minetest.conf.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sat Mar 07, 2015 16:22
by Don
Looks nice. I live in the mountains and you do see lots of stone. At high elevation all you see is stone.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sat Mar 07, 2015 21:11
by Gael de Sailly
Yes, so… it woud be good to include height in dirt thickness calculation.

Caves will come soon. I've already coded it, it works but it's not optimal IMO.
And also, there are really too many ores, at least 2 or 3 times more than in v6 (I will try to calculate it precisely). I can't do anything for my part because I use the function minetest.generate_ores(vm), and it may be this function which has problems.

EDIT : There are 3.05 times more ores than in mapgen v6 (calculated by running a #minetest.find_nodes_in_area in v6 without caves and in valleys_mapgen). How is it possible ? minetest.generate_ores shouldn't generate the ores exactely the same way than in v6 ?

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sun Mar 08, 2015 00:17
by paramat
This looks awesome! Will try it later.
twoelk, rivers now flow in my mapgens, by using 'update_liquids()' in the LVM stuff at the end. Also, it's recommended river water is non-renewable to avoid a huge mess, and has a range of 2 to 4 to hold it's shape on steep slopes.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sun Mar 08, 2015 04:15
by philipbenr
Only complaint : No trees. Other than that, this looks amazing, and would be by far my favorite of all magpens.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sun Mar 08, 2015 06:49
by Gael de Sailly
philipbenr wrote:Only complaint : No trees.

Not finished. There will be trees in the future, maybe not in the mapgen itself, since my project is to make a subgame including this mod. I'll even try to make trees that dies and regrow naturally.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sun Mar 08, 2015 13:51
by Gael de Sailly
Update : there are now caves !
The problem about ores is temporarily solved : I've used a second LVM to generate ores, which I think is unclean coding, see #2464. But it works.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Fri Mar 13, 2015 20:03
by Gael de Sailly
The mapgen has now some compatibility problems, because of some features that I use that are changing, especially minetest.generate_ores. It will stay compatible with 0.4.12-stable.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Tue Mar 17, 2015 19:52
by Gael de Sailly
NEW : Lava.

I wrote:The mapgen has now some compatibility problems, because of some features that I use that are changing, especially minetest.generate_ores. It will stay compatible with 0.4.12-stable.

Finally I've chosen to use the new API to rewrite it properly. Please update MT to a (very) recent build.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sun Mar 29, 2015 21:32
by Gael de Sailly
Trying to make biomes and to improve rivers. Wait… some time.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Wed Apr 08, 2015 15:55
by Gael de Sailly
1.3 released.
New : more dirts (clayey, silty, sandy). It's the beginning of the biomes.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Wed Apr 08, 2015 20:06
by philipbenr
Sounds great. I'll look at it later.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Fri Apr 10, 2015 16:46
by srifqi
*speechless, awake

We're waiting for biomes!

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sat May 09, 2015 10:57
by Gael de Sailly
Trees are coming…

For now, 2 trees : apple tree and jungle tree.
There will be more trees in the future.

Experimental code for trees : the leaves are generated from 3D perlin maps.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sat May 09, 2015 15:00
by Ivà
Oh! Wow...
+1

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Mon May 25, 2015 14:03
by Gael de Sailly
New : pine tree (you can call it "fir tree", in fact I've made fir trees from the nodes called default:pinetree and default:pine_needles).

This tree grows on high valleys, in the mountains, generally not on the top. I will probably change it.

I will release 2.0 when it will be playable in survival mode. Wait a little : I've not a lot of free time to spend on it. I will have more time after June 24th.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sun May 31, 2015 12:08
by Gael de Sailly

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sun May 31, 2015 13:01
by Don
Wow! That looks really nice.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sun May 31, 2015 16:48
by srifqi
Good work Gael de Sailly!

Just checked the diff and watch many differences. Yes, a little bit longer while generating. Otherwise, wonderful!

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sun May 31, 2015 19:20
by Gael de Sailly
srifqi wrote:Yes, a little bit longer while generating

That's normal since I've added some features. But it's not enormous. To compare, for my Forest mapgen, created more than 1 year ago, the average mapgen time was around 3-5 seconds ! And for valleys mapgen, I've 400-750 ms with the same computer. I liked the Forest mapgen but the code was awful, I was a beginner and I did not have the notion of computer calculation time. The code was completely messed up, all variables were global, etc. In summer 2014 I wanted to continue this mod, but I didn't have the courage to understand and improve my own code.
So on February 8th I've decided to start a new project. I want a very clean code, to avoid what happened to Forest.
Since there are some “fans” of Forest, I will add Forest's trees (slightly modified) in VMG.

I will probably have a break. Don't worry if you don't see me some weeks.

Re: [Mapgen][WIP] Valleys Mapgen [valleys_mapgen]

PostPosted: Sun May 31, 2015 20:38
by Sokomine
Gael de Sailly wrote:Since there are some “fans” of Forest, I will add Forest's trees (slightly modified) in VMG.

That's good to hear! The trees in forrests are conveniently shaped and sized. If mg_villages finds your forest mod installed, it does make use of its tree and wood types:
Image
Those high hills in the valleys mod are more tricky for the villages. They can only spawn up to a certain height and do not handle the mapblock above. Maybe I ought to avoid spawning in such situations as it doesn't look good. The valleys are much more convenient places.