Restore mapgen v5 ?

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: Restore mapgen v5 ?

by Gael de Sailly » Post

If your computer is fast, no problem ! But if it's really slow, you should take the mapgen V6, which is extremely fast. Or, if you're sedentary in Minetest (which is not the case for me, at all !), you can use a slower mapgen. It will be slow at the firt time, but once the terrain is generated, it will be faster.
Just realize how bored we would be if the world was perfect.

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

Re: Restore mapgen v5 ?

by paramat » Post

Mgv5 is still using the old slower internal 3D noise code, i need to change this to the new faster 3D noise used in mgv7.
Jordach, already tried it to test decorations.


Image
Last edited by paramat on Sun Oct 19, 2014 13:06, 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: Restore mapgen v5 ?

by paramat » Post

I'm stuck ... new noise is in, it runs but is all very low very smooth hills, and the cave threshold isn't acting as expected.
https://github.com/paramat/minetest/blo ... gen_v5.cpp
https://github.com/paramat/minetest/blo ... apgen_v5.h
https://github.com/paramat/minetest/commits/mgv5

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: Restore mapgen v5 ?

by Gael de Sailly » Post

Is it possible to rewrite it in Lua ?
I think I will try it, using my mapgen library (if you want to help me you're welcome).
Just realize how bored we would be if the world was perfect.

MTDad
Member
Posts: 53
Joined: Fri Aug 29, 2014 05:38

Re: Restore mapgen v5 ?

by MTDad » Post

paramat wrote:I'm stuck ... new noise is in, it runs but is all very low very smooth hills, and the cave threshold isn't acting as expected.
When you said you were going to change it to the v7 3d code, the first thing that popped into my head was "nonono, not if it'll make it look like v7", but I admit to having no clue how that stuff works. (Its not that I don't like v7, but I think I like v5 more). My vote if its worth anything is to just roll it back to the old code. On my pc at least, it really didn't generate slow at all. There were some weird small patches that wouldn't render when I used BFD, but paragen made a really nice world.

And Duh I need to add that I for one really appreciate what you're doing. Mapgen is one of the sticky points I never quite seem to be satisfied with, and is one of the few minetest things I'm sure I'll never learn to do.

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

Re: Restore mapgen v5 ?

by paramat » Post

Mgv5 will use the new faster noise code, but will use the original noise parameters and the original mapgen logic. The only difference from the original will be slightly sharper spikes and detail in the terrain, because the original noise code had terrain-blurring/3D noise easing. If you want to use the old noise version it's still in the branch history.

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

Re: Restore mapgen v5 ?

by paramat » Post

Okay latest version works, looks very similar to the original, but much faster.


Image

greydmiyu
Member
Posts: 27
Joined: Thu Sep 18, 2014 12:00

Re: Restore mapgen v5 ?

by greydmiyu » Post

That is just beautiful.

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

Re: Restore mapgen v5 ?

by ExeterDad » Post

paramat wrote:Okay latest version works, looks very similar to the original, but much faster.
I see a duck, a bunny rabbit and a buzzard. :P

Zeno
Member
Posts: 140
Joined: Sun Jun 29, 2014 03:36
GitHub: Zeno-
Location: Australia

Re: Restore mapgen v5 ?

by Zeno » Post

ExeterDad wrote: I see a duck, a bunny rabbit and a buzzard. :P
First two, yep. But that is not a buzzard. It's a dragon.

Also, the big thing on the right is the luck dragon from Neverending Story.

MTDad
Member
Posts: 53
Joined: Fri Aug 29, 2014 05:38

Re: Restore mapgen v5 ?

by MTDad » Post

Great Work Paramat! It does seem a bit different, but still very nice. Just one thing though, saw this happen twice so far.

Image

Good fun to watch the forest burn down.

Vazon
Member
Posts: 191
Joined: Sat Aug 17, 2013 17:20
IRC: Vazon
In-game: Vazon
Location: Tennessee, U.S

Re: Restore mapgen v5 ?

by Vazon » Post

Paramat: I have no idea how to compile on Windows ( I do on Linux tho ) but this desktop lacks Linux so I am unable to test v5, is there another solution to this?

User avatar
GingerHunter797
Member
Posts: 144
Joined: Sun Oct 13, 2013 15:36
In-game: GingerHunter797
Location: Indiana

Re: Restore mapgen v5 ?

by GingerHunter797 » Post

Map gen V5 looks amazing! Great job! :D
http://i.imgur.com/gqXXUaI.png

3DS Friend Code: 2122-7173-2797
Add me as a friend! :D

Want to play a fun game? http://voxelands.com/

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

Re: Restore mapgen v5 ?

by paramat » Post

MTDad, thanks that's useful you raise the lava issue, mgv5 does seem to add occasional surface lava. I have updated the mgv5 biome code to replace surface lava, whereas before it didn't. The same needs to be done with paragenv7.

Add lines like this at line 110 for default dirt, default dirt with grass, default gravel and default lava souce (default sand is already in there):

Code: Select all

local c_defdirt = minetest.get_content_id("default:dirt")
'def' is added to distinguish from the paragenv7 dirt and grass nodes.

At line 172 add those default nodes into the expression:

Code: Select all

if nodid == c_stone -- if stone
or nodid == c_defdirt
or nodid == c_defdirtwithgrass
or nodid == c_gravel
or nodid == c_lavasource
or nodid == c_stonecopper
or nodid == c_stoneiron
or nodid == c_stonecoal then

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

Re: Restore mapgen v5 ?

by paramat » Post

Vazon, looks like you'll have to wait for 0.4.11, which should be soon, i'll try to get mgv5 merged into 0.4.11 stable so people can use it, i just need to solve the noise scale problem before it's fit for merging.

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

Re: Restore mapgen v5 ?

by paramat » Post

*=/ i just realised the 'dust top nodes' function was missing, now added, any mgv7 biome definitions would have been missing their dust nodes.

Zeno
Member
Posts: 140
Joined: Sun Jun 29, 2014 03:36
GitHub: Zeno-
Location: Australia

Re: Restore mapgen v5 ?

by Zeno » Post

Paramat I know what the problem is with your noise scale.

There are two ways to solve it -- the "proper way" and your current "hacks". IMO your current hacks are the better way than the proper/offical way and if they can be tidied up (put the scale params back into the NoiseParams and then multiply by what's in the params(e.g. noise_filler_depth->np->scale * n_ground * f) ) then that might be the way to go. The reason is that doing it the official way will cause the entire noise array to be iterated over twice when it's not really necessary since you're doing that in your code anyway.

The "proper way" is to call https://github.com/minetest/minetest/bl ... e.cpp#L609 after generating your noise arrays, but as you can see that does the same as your "hack" anyway but requires looping over all the values another time (because you iterate over them in your code anyway). I, personally, think that's a waste of time.

Edit: On second thoughts, it might be needed for Lua... so maybe best to call the official transform function after creating the noise.

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

Re: Restore mapgen v5 ?

by paramat » Post

You got it! thanks so much! =D Comparing mapgen_v5.cpp and mapgen_v7.cpp i have so obviously left out the 'transform noisemaps' ... i have such a random head. I will do this the official way, assuming there is good reason, and to be consistent with other mapgens.

MTDad
Member
Posts: 53
Joined: Fri Aug 29, 2014 05:38

Re: Restore mapgen v5 ?

by MTDad » Post

The Majesty and Wonder That is MGv5

Image

And yes I'm afraid to report that even after your fix to the engine, and me adding in the new lines to Paragenv7, I'm still seeing lava. When it does no harm like this its very neat to see.

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

Re: Restore mapgen v5 ?

by paramat » Post

I suspect using the newer un-eased 3D noise has changed the maximum y of lava, i can't remember seeing surface lava when using he old noise code. perhaps i will adjust this to make it below 1.

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

Re: Restore mapgen v5 ?

by paramat » Post

Image


Very new eased 3D noise code is now working in my branch https://github.com/paramat/minetest/commits/mgv5
I need to adjust that lava maximum y and try to remove the biome discontinuities at y = 47.
For speed reasons only the primary terrain noise has been eased, the original used easing for all 5 3D noises, this means the caves and the shape of dirt/sand/gravel/lava blobs are a little different.
There is a small but significant difference from uneased 3D noise:


Image

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: Restore mapgen v5 ?

by Inocudom » Post

How close is this to being added to Minetest?

Zeno
Member
Posts: 140
Joined: Sun Jun 29, 2014 03:36
GitHub: Zeno-
Location: Australia

Re: Restore mapgen v5 ?

by Zeno » Post

Great work paramat

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

Re: Restore mapgen v5 ?

by paramat » Post

Image


I rebased and squashed my commits into one, ready for review https://github.com/paramat/minetest/commits/mgv5 A commit like this is good for seeing what goes into making a core mapgen.
Lava is tuned to be below sea level like the original. Now 3 of the 5 3D noises are eased (cave1, cave2 and terrain) so cave shape is more faithful to the original. The new eased 3D noise seems to differ from the original easing, it made the caves narrower so that roughly 1/4 were impassable, i re-tuned the cave width by returning to a cave noise scale parameter previously used by celeron55 that was commented in the code.

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: Restore mapgen v5 ?

by Calinou » Post

paramat wrote:Image


I rebased and squashed my commits into one, ready for review https://github.com/paramat/minetest/commits/mgv5 A commit like this is good for seeing what goes into making a core mapgen.
Lava is tuned to be below sea level like the original. Now 3 of the 5 3D noises are eased (cave1, cave2 and terrain) so cave shape is more faithful to the original. The new eased 3D noise seems to differ from the original easing, it made the caves narrower so that roughly 1/4 were impassable, i re-tuned the cave width by returning to a cave noise scale parameter previously used by celeron55 that was commented in the code.
Where do you get the v6-like biomes?

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests