Page 2 of 3
Re: Restore mapgen v5 ?
Posted: Sat Oct 18, 2014 18:30
by Gael de Sailly
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.
Re: Restore mapgen v5 ?
Posted: Sat Oct 18, 2014 23:46
by paramat
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.
Re: Restore mapgen v5 ?
Posted: Sun Oct 19, 2014 13:05
by paramat
Re: Restore mapgen v5 ?
Posted: Sun Oct 19, 2014 16:20
by Gael de Sailly
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).
Re: Restore mapgen v5 ?
Posted: Sun Oct 19, 2014 22:04
by MTDad
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.
Re: Restore mapgen v5 ?
Posted: Mon Oct 20, 2014 02:33
by paramat
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.
Re: Restore mapgen v5 ?
Posted: Mon Oct 20, 2014 07:26
by paramat
Okay latest version works, looks very similar to the original, but much faster.
Re: Restore mapgen v5 ?
Posted: Mon Oct 20, 2014 09:10
by greydmiyu
That is just beautiful.
Re: Restore mapgen v5 ?
Posted: Mon Oct 20, 2014 10:25
by ExeterDad
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
Re: Restore mapgen v5 ?
Posted: Mon Oct 20, 2014 16:01
by Zeno
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.
Re: Restore mapgen v5 ?
Posted: Mon Oct 20, 2014 17:23
by MTDad
Great Work Paramat! It does seem a bit different, but still very nice. Just one thing though, saw this happen twice so far.
Good fun to watch the forest burn down.
Re: Restore mapgen v5 ?
Posted: Mon Oct 20, 2014 22:41
by Vazon
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?
Re: Restore mapgen v5 ?
Posted: Mon Oct 20, 2014 23:13
by GingerHunter797
Map gen V5 looks amazing! Great job! :D
Re: Restore mapgen v5 ?
Posted: Tue Oct 21, 2014 12:50
by paramat
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
Re: Restore mapgen v5 ?
Posted: Tue Oct 21, 2014 12:56
by paramat
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.
Re: Restore mapgen v5 ?
Posted: Tue Oct 21, 2014 20:16
by paramat
*=/ i just realised the 'dust top nodes' function was missing, now added, any mgv7 biome definitions would have been missing their dust nodes.
Re: Restore mapgen v5 ?
Posted: Wed Oct 22, 2014 06:09
by Zeno
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.
Re: Restore mapgen v5 ?
Posted: Wed Oct 22, 2014 10:32
by paramat
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.
Re: Restore mapgen v5 ?
Posted: Sat Oct 25, 2014 05:41
by MTDad
The Majesty and Wonder That is MGv5
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.
Re: Restore mapgen v5 ?
Posted: Mon Oct 27, 2014 09:32
by paramat
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.
Re: Restore mapgen v5 ?
Posted: Mon Oct 27, 2014 09:39
by paramat
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:
Re: Restore mapgen v5 ?
Posted: Wed Oct 29, 2014 00:03
by Inocudom
How close is this to being added to Minetest?
Re: Restore mapgen v5 ?
Posted: Wed Oct 29, 2014 03:01
by Zeno
Great work paramat
Re: Restore mapgen v5 ?
Posted: Thu Oct 30, 2014 07:15
by paramat
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.
Re: Restore mapgen v5 ?
Posted: Thu Oct 30, 2014 17:55
by Calinou
paramat wrote:
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?