[Mod][Merged] Valleys Mapgen [valleys_mapgen]

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

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

by duane » Thu Sep 24, 2015 14:49

After a spate of fixes and adjustments, here's another screenshot.

+ Spoiler
Believe in people and you don't need to believe anything else.
 

Dragonop
Member
 
Posts: 1178
Joined: Tue Oct 23, 2012 12:59
Location: Argentina
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop

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

by Dragonop » Thu Sep 24, 2015 19:45

I think the plains/hills need more grass or some other decoration, like small rocks and stuff.
 

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

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

by duane » Fri Sep 25, 2015 08:09

Dragonop wrote:I think the plains/hills need more grass or some other decoration, like small rocks and stuff.


I think you're right. I've just started on the lua portion, so there's a lot of room for improvement. It looks really good with Plantlife, especially the ferns.

Speaking of which, VanessaE has outdone herself with textures to support vmg in her HDX high-resolution packs. They look amazing. Now we need higher resolution textures for the new flowers and trees.

https://forum.minetest.net/viewtopic.php?pid=19702

+ Spoiler

+ Spoiler

+ Spoiler
Believe in people and you don't need to believe anything else.
 

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

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

by duane » Fri Sep 25, 2015 15:07

This looks better. A little color, to keep them from merging into a dull mass.

+ Spoiler


+ Spoiler


+ Spoiler
Last edited by duane on Sun Sep 27, 2015 03:13, edited 1 time in total.
Believe in people and you don't need to believe anything else.
 

User avatar
Gael de Sailly
Member
 
Posts: 733
Joined: Sun Jan 26, 2014 17:01
Location: Lyon, France
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly Ginkgoo

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

by Gael de Sailly » Fri Sep 25, 2015 19:55

I'll release version 2.2 this weekend.

EDIT : done.
Just realize how bored we would be if the world was perfect.
 

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

Speed

by duane » Mon Sep 28, 2015 03:42

The latest github version of lua vmg has a new option, vmg_caves, that lets you turn off cave creation. It would be a lot for me to give up, since I like caves, but the trade-off is that the mapgen runs about twice as fast as normal (up to four times as fast on my old linux laptop). This could be worthwhile for those who aren't as concerned about the underworld. (And you won't have to worry about falling into a hole while you're mining.)

Edit: This is the original, lua vmg, not the C++ version.
Last edited by duane on Mon Sep 28, 2015 11:23, edited 1 time in total.
Believe in people and you don't need to believe anything else.
 

Ivà
Member
 
Posts: 115
Joined: Sun Feb 22, 2015 07:11
Location: Catalonia
GitHub: melzua
IRC: melzua
In-game: melzua

Re: Speed

by Ivà » Mon Sep 28, 2015 10:34

duane wrote:The latest github version of lua vmg has a new option, vmg_caves, that lets you turn off cave creation. It would be a lot for me to give up, since I like caves, but the trade-off is that the mapgen runs about twice as fast as normal (up to four times as fast on my old linux laptop). This could be worthwhile for those who aren't as concerned about the underworld. (And you won't have to worry about falling into a hole while you're mining.)


But this option turns off v7cavegen too or only the vmg cavegen?
 

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

Re: Speed

by duane » Mon Sep 28, 2015 11:19

Ivà wrote:But this option turns off v7cavegen too or only the vmg cavegen?


This time, I'm referring to the original, lua version of Valleys. The v7 caves option only applies to the C++ version.

The original Valleys Mapgen's cave creation algorithm (which I also ported to C++) uses several 3D noise maps, which can take a lot of CPU time to create. Both the lua and C++ versions have this issue, but in the latter case, the v7 mapgen's cave generation is available. We don't have a more efficient option for the lua version of Valleys, but now you can at least turn caves off to speed everything else up.

It makes a huge difference in speed.
Believe in people and you don't need to believe anything else.
 

Sokomine
Member
 
Posts: 3886
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

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

by Sokomine » Mon Sep 28, 2015 15:44

Ivà wrote:This mapgen should be merged into the main engine as the fifth option, really. It provides a realistic terrain that is a lot more interesting than v6 and less fantasious than v5 or v7, for those who prefer that style of land.

Yes, that's an issue for me as well. I don't like the fancy, unrealistic terrain of v5 or v7 much. It's good for some special situations and sometimes looks great - but it's not a place where it's likely that people would choose to live.

duane wrote:Whoops. That's my autorun code, ala world of warcraft. I hate having to hold the forward key all the time. I'll have to fix that since it's causing problems.

Edit: Done. It has a default now -- the F key.

I want that code as well, please! It annoys me to always have to press w to run forward, sometimes in combination with e. It's particulary annoying on Android devices, but also on the desktop. Please get it merged into the main branch of MT. My fingers would thank you!

As to the speed gain you encountered: Most of it seems to be related to the noise calculation/handling if I got you right? Of course I'm intrested in any speed gains. The village code runs pretty fast by now, but it can't be as fast as a native mapgen. Importing and exporting the voxelmanip data structure to and from lua takes a significant amount of time. But then there are other manipulations of the terrain needed apart from flattening and placing the actual houses. So perhaps voxelmanip will always be needed for the villages.
A list of my mods can be found here.
 

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

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

by duane » Mon Sep 28, 2015 16:44

Sokomine wrote:I want that code as well, please! It annoys me to always have to press w to run forward, sometimes in combination with e. It's particulary annoying on Android devices, but also on the desktop. Please get it merged into the main branch of MT. My fingers would thank you!


As you know, I posted this earlier as a patch. I haven't looked into what's required for merging into the game. However, I still find it suspicious that all the autorun code is already there, but not tied to a key. I think someone must have decided that it was a bad idea at some point, so I wonder if it would be accepted anyway.

Sokomine wrote:As to the speed gain you encountered: Most of it seems to be related to the noise calculation/handling if I got you right? Of course I'm intrested in any speed gains. The village code runs pretty fast by now, but it can't be as fast as a native mapgen.


The biggest cpu load I found in profiling vmg-c was the generation of 3D noise tables. Everything else together took about a tenth of that time. After that came lighting and liquid handling, and again, everything else together took about a tenth of that time. I was always taught that optimizing for a 10% performance gain (or less) is usually a waste of time.

I wonder if people aren't overstating the speed of C++ mapgens. There's certainly a performance cost for calling to lua and back, but I don't think it's nearly as great as a lot of other aspects of the game. And lua is designed to be very fast for a scripting language. I've heard it's about half as fast as C at number crunching. There are probably a few compiled languages that can't manage that.

The version 7 mapgen code shows a lot of thought about how to avoid wasted time. The terrain (and cave) generation may be a little strange, but it's efficient. That may have more of an impact than the C compiler.

Edit: I put in a pull request. We'll see what happens.

Edit: Since the two ports are now handling about the same features, I did a set of average chunk times on each. I set vmg_caves to false in the lua version, since we already know that's an issue. The times I got on my rickety, old laptop were 745ms for the C++ version (with its lua companion code) and 1482ms for the original, so the C++ is running about twice as fast. Ok, that's fairly significant.
Last edited by duane on Mon Sep 28, 2015 20:55, edited 2 times in total.
Believe in people and you don't need to believe anything else.
 

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

VMG C++

by duane » Mon Sep 28, 2015 17:17

The lua code that I've tinkered together in the valleys_c branch of Valleys Mapgen now adds all of the capabilities from the main branch that weren't included in the C++ code. It features generic trees that replace the default trees (and look much better, for my money), cave decorations, and the flowers we have that are not in the default game. I've also included small and large rocks that can be used to create stone, in case you want to skip wooden tool making (but they're mostly for decoration). I made the rock models myself.

Remember that you must use the C++ vmg to get the full effect (though the lua should work perfectly well with the stock mapgen).

+ Spoiler

+ Spoiler


Edit: What I said about the lua working with earlier mapgens is no longer true. I had to add a lua function for working with the biomemap, so this code will now only work with the C++ version of Valleys Mapgen. However, I now have arrow arum growing in the water, where it belongs.
Last edited by duane on Sun Oct 04, 2015 06:26, edited 3 times in total.
Believe in people and you don't need to believe anything else.
 

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

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

by duane » Wed Sep 30, 2015 07:25

I put together some higher resolution textures for the flowers that aren't in hdx textures, in case anyone wants them.

+ Spoiler
Attachments
high-res-flowers.zip
(155.66 KiB) Downloaded 22 times
Believe in people and you don't need to believe anything else.
 

User avatar
prof-turbo
Member
 
Posts: 518
Joined: Mon May 07, 2012 17:02
Location: MinetestForFun or Teeworlds master server list

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

by prof-turbo » Sat Oct 03, 2015 19:39

Duane : create your repository for your own hdx textures, and post them in the texture packs section of the forum :)
 

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

More Compatibility

by duane » Sat Oct 03, 2015 22:22

Valleys Mapgen is now using a tweak thought up by Hybrid Dog, which allows it to cooperate with other mods that use voxelmanip. Mods like Caverealms and Intersecting used to have serious issues running with VMG, because the latter builds the world from scratch. When other mods loaded first, they'd look around and find no world to work with. Thanks to a one-line fix, that shouldn't happen anymore.

This solves one of the main problems that started me on the C++ mapgen project. The only catch is, it could get hairy if another mod uses the same trick.
Believe in people and you don't need to believe anything else.
 

User avatar
kaadmy
Member
 
Posts: 706
Joined: Thu Aug 27, 2015 23:07
GitHub: kaadmy
IRC: KaadmY
In-game: KaadmY kaadmy NeD

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

by kaadmy » Sat Oct 03, 2015 22:42

What are the name of the noise param settings in the minetest.conf?
Are mgv7 noise params used?
Never paint white stripes on roads near Zebra crossings.

Pixture
 

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

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

by duane » Sun Oct 04, 2015 04:01

kaadmy wrote:What are the name of the noise param settings in the minetest.conf?
Are mgv7 noise params used?


In the lua version the noise parameters are:

Code: Select all
vmg_noise_1 = -10, 50, (1024,1024,1024), 5202, 6, 0.4, 2
vmg_noise_2 = 0, 1, (256,256,256), -6050, 5, 0.6, 2
vmg_noise_3 = 5, 4, (512,512,512), -1914, 1, 1, 2
vmg_noise_4 = 0.6, 0.5, (512,512,512), 777, 1, 1, 2
vmg_noise_5 = 0.5, 0.5, (128,128,128), 746, 1, 1, 2
vmg_noise_6 = 0, 1, (256,512,256), 1993, 6, 0.8, 2
vmg_noise_7 = 3, 1.75, (256,256,256), 1605, 3, 0.5, 2
vmg_noise_8 = 0, 1, (32,32,32), -4640, 4, 0.5, 2
vmg_noise_9 = 0, 1, (32,32,32), 8804, 4, 0.5, 2
vmg_noise_10 = 0, 1, (32,32,32), -4780, 4, 0.5, 2
vmg_noise_11 = 0, 1, (32,32,32), -9969, 4, 0.5, 2
vmg_noise_12 = 0, 1, (64,64,64), 3314, 4, 0.5, 2
vmg_noise_13 = 0, 1, (256,256,256), 2835, 5, 0.5, 4
vmg_noise_14 = 0, 1, (256,256,256), 6674, 5, 0.5, 4
vmg_noise_15 = 0, 1, (256,256,256), 6940, 5, 0.5, 4
vmg_noise_16 = 2, 8, (256,256,256), 2349, 3, 0.5, 2
vmg_noise_17 = 0, 1, (768,256,768), -1805, 4, 0.5, 4
vmg_noise_18 = 0, 1, (243,243,243), -5787, 4, 0.5, 3


In the C++ version, these are copied from V7:
Code: Select all
mgdjr_np_filler_depth = 0, 1.2, (150, 150, 150), 261, 3, 0.7, 2.0
mgdjr_np_v7_caves_1 = 0, 12, (100, 100, 100), 52534, 4, 0.5, 2.0
mgdjr_np_v7_caves_2 = 0, 12, (100, 100, 100), 10325, 4, 0.5, 2.0
mgdjr_np_biome_heat = 50, 50, (750, 750, 750), 5349, 3, 0.5, 2.0
mgdjr_np_biome_heat_blend = 0, 1.5, (8, 8, 8), 13, 2, 1.0, 2.0
mgdjr_np_biome_humidity = 50, 50, (750, 750, 750), 842, 3, 0.5, 2.0
mgdjr_np_biome_humidity_blend = 0, 1.5, (8, 8, 8), 90003, 2, 1.0, 2.0


These are copied from VMG lua:

Code: Select all
mgdjr_np_terrain_height = -10, 50, (1024, 1024, 1024), 5202, 6, 0.4, 2.0
mgdjr_np_rivers = 0, 1, (256, 256, 256), -6050, 5, 0.6, 2.0
mgdjr_np_valley_depth = 5, 4, (512, 512, 512), -1914, 1, 1.0, 2.0
mgdjr_np_valley_profile = 0.6, 0.5, (512, 512, 512), 777, 1, 1.0, 2.0
mgdjr_np_inter_valley_slope = 0.5, 0.5, (128, 128, 128), 746, 1, 1.0, 2.0
mgdjr_np_inter_valley_fill = 0, 1, (256, 256, 256), 1993, 6, 0.8, 2.0
mgdjr_np_caves_1 = 0, 1, (32, 32, 32), -4640, 4, 0.5, 2.0
mgdjr_np_caves_2 = 0, 1, (32, 32, 32), 8804, 4, 0.5, 2.0
mgdjr_np_caves_3 = 0, 1, (32, 32, 32), -4780, 4, 0.5, 2.0
mgdjr_np_caves_4 = 0, 1, (32, 32, 32), -9969, 4, 0.5, 2.0
mgdjr_np_lava_1 = 0, 1, (32, 32, 32), 75266, 4, 0.5, 2.0
mgdjr_np_lava_2 = 0, 1, (32, 32, 32), -89113, 4, 0.5, 2.0
mgdjr_np_water_1 = 0, 1, (32, 32, 32), 82329, 4, 0.5, 2.0
mgdjr_np_water_2 = 0, 1, (32, 32, 32), -59107, 4, 0.5, 2.0


Edit: I've moved the Valleys C++ code to a branch of the fork I'm using, to make coordinating pulls easier. In the process, I changed all occurrences of "djr" to "valleys", so the "mgdjr" entries above will be "mg_valleys" the next time you pull from github. Sorry for any confusion.
Believe in people and you don't need to believe anything else.
 

User avatar
kaadmy
Member
 
Posts: 706
Joined: Thu Aug 27, 2015 23:07
GitHub: kaadmy
IRC: KaadmY
In-game: KaadmY kaadmy NeD

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

by kaadmy » Mon Oct 05, 2015 19:20

All right, because terrain looked much more spread out with djr mapgen.
Just wanted to see why :)

Edit: Maybe it would be a good idea to put the parameters and the defaults in the minetest.conf.example?
Never paint white stripes on roads near Zebra crossings.

Pixture
 

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

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

by duane » Tue Oct 06, 2015 00:39

kaadmy wrote:All right, because terrain looked much more spread out with djr mapgen.
Just wanted to see why :)

Edit: Maybe it would be a good idea to put the parameters and the defaults in the minetest.conf.example?


Yep, that's on my todo list.

I should note that if you're using the "fast" flag, the terrain is going to be flatter, since the mapgen is skipping the last step of generation. There are a lot more sharp peaks without it. (Too many for my taste. I'd like to find a setting somewhere between the two, at some point.)

Edit: I've pushed the changes to minetest.conf.example and a better-commented version in doc/valleys_c_minetest.conf.example.
Believe in people and you don't need to believe anything else.
 

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

Nerd Poles

by duane » Wed Oct 07, 2015 09:34

I think I've eliminated the nerd poles spawning in the mountains. Here's two shots of the same spot in the same game, before...

+ Spoiler


and after.

+ Spoiler


I can do the same with the lua mapgen, if anyone's interested. Does the broken terrain bother anyone?

Edit: It turns out that this isn't a problem with the lua after all.
Last edited by duane on Sun Oct 11, 2015 10:53, edited 1 time in total.
Believe in people and you don't need to believe anything else.
 

User avatar
Don
Member
 
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Wed Oct 07, 2015 15:21

Is there still cliffs?
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
mahmutelmas06
Member
 
Posts: 367
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: Nerd Poles

by mahmutelmas06 » Wed Oct 07, 2015 20:42

duane wrote:I can do the same with the lua mapgen, if anyone's interested. Does the broken terrain bother anyone?


What do u do for c make it for main version too please :)

And where is thoose updated versions ? I see that it was updated 5 days ago
My Mods:

Beverage
 

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

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

by duane » Thu Oct 08, 2015 00:58

Don wrote:Is there still cliffs?


There are no sharp edges, though there are some nasty drops. I haven't been able to find a way to put in sharp edges without artifacts showing up, so I'd rather do without.

Maybe something like the cave intersection, but with a square waveform... Although that still doesn't match the look of a rugged mountain face. I haven't seen anything yet that does that.
Believe in people and you don't need to believe anything else.
 

User avatar
Don
Member
 
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Thu Oct 08, 2015 01:15

I agree that the lack of sharp edges is better then the floating things. I was wondering if you actually fixed the problem. I am glad that the nerd poles are gone. Keep up the great work!
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

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

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

by duane » Thu Oct 08, 2015 03:18

Don wrote:Is there still cliffs?


I can do this.

+ Spoiler


+ Spoiler


They don't show up very often, and only in the heights. No weird artifacts yet though.
Believe in people and you don't need to believe anything else.
 

User avatar
Don
Member
 
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

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

by Don » Thu Oct 08, 2015 16:20

I was just asking. I didn't expect you to change it. I do like cliff though. They make it more of a challenge.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

PreviousNext

Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 11 guests