Page 7 of 18

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

Posted: Tue Nov 10, 2015 13:21
by duane
amadin wrote:Thanks for this mod.
- How decrease the amount (quantity) of rives?
You can make rivers occur farther apart by changing noise #2. Put something like the following in your minetest.conf file:

Code: Select all

vmg_noise_2 = 0, 1, (768,768,768), -6050, 5, 0.6, 2
- In README.md: "First, make sure that you've added the `valleys_mapgen` dependancy in your depends.txt (followed by a question mark if optional)" - so i must to add it in all mods?
That's only necessary for other mods that want to use the plants api, so unless you are developing a mod, you can ignore it.
- Does where a way to increase speed of valleys_mapgen? Maybe if turn off some options in settings or something else.
Turning off cave generation will make the mod run up to twice as fast. To do that, put this in your minetest.conf:

Code: Select all

vmg_caves = false
However, you can get a significant improvement and still have caves by using the simple caves switch instead:

Code: Select all

vmg_simple_caves = true

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

Posted: Tue Nov 10, 2015 14:10
by amadin
Only now I noticed the almost complete absence of grass (default_grass_1, default_grass_2 etc) and flowers on many big areas. I see grass near trees only, but on areas without trees - no any grass. I'm not find grass in settingtypes.txt. What can i do to add a grass on areas without trees?

Image

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

Posted: Tue Nov 10, 2015 18:00
by Gael de Sailly
amadin wrote:- I think the better file settingtypes.txt name will be setting_exaple.txt because i tryed to change values in it at first :)
The file settingtypes.txt is used by the game to show the settings if you have a very recent Minetest version, so I can't rename it.
Go to the "Settings" tab, and in mods/valleys_mapgen. All settings are here !
amadin wrote:Only now I noticed the almost complete absence of grass (default_grass_1, default_grass_2 etc) and flowers on many big areas.
We should rework the plants parameters. I'm sorry but I've really not the time to do it.
We should also rewrite the README to put at first the instructions for users, then the instructions for developers, and finally the changelog.

Glowees

Posted: Tue Dec 08, 2015 00:53
by duane
For a lark, I added some glowing plants to ValC. They are decidedly unnatural, and so disabled by default, but I like them. I don't know if you can tell, but the moss on the trees in the background also glows faintly.

Image

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

Posted: Thu Dec 10, 2015 02:12
by sofar
amadin wrote:Only now I noticed the almost complete absence of grass (default_grass_1, default_grass_2 etc) and flowers on many big areas. I see grass near trees only, but on areas without trees - no any grass. I'm not find grass in settingtypes.txt. What can i do to add a grass on areas without trees?

Image
I'm using the lua version, and seeing this too.

The plants.lua defines only a SINGLE setting for all grass nodes, which causes the problems.

Grass is so abundant and should be present in almost all biomes. In some biomes grass should be mostly short, and sparse (grass_1, 10% or less coverage), and in some biomes grass should be abundantly long (grass_4 and 5) and omnipresent (80% coverage)

So what needs to happen is plants.lua needs to have several listings placing different densities and grass lengths in all the biomes. I'd say it'll end up being 20 or so register_plant lines to fix or at least make a decent spread and variation.

Please fix this.

Re: Nerd Poles

Posted: Thu Dec 10, 2015 02:21
by sofar
duane wrote: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.
I'm assuming you are smoothing the landscape here?

If so, it appears you are using a uniform smoothing value. You could create a 2d perlin noise map and smooth each chunk according to the value in the map for each spot/chunk.

That would still create cliffs, which I like a bit. It also differentiates the boring flat and curved surfaces a bit.

Re: Nerd Poles

Posted: Thu Dec 10, 2015 04:33
by duane
sofar wrote:I'm assuming you are smoothing the landscape here?

If so, it appears you are using a uniform smoothing value. You could create a 2d perlin noise map and smooth each chunk according to the value in the map for each spot/chunk.

That would still create cliffs, which I like a bit. It also differentiates the boring flat and curved surfaces a bit.
I'm a bit confused. The post you quoted referred to Valleys C, which has changed quite a bit since then. I've already added cliffs and rougher terrain in the heights.

The original Valleys never had the problem to begin with, and already produces cliffs.

Grasses

Posted: Thu Dec 10, 2015 04:44
by duane
I'm not sure why there's suddenly discontent with the grass in version 2.3. As far as I can reproduce on my machine, both 2.2 and 2.3 produce about the same amount of grass, for the same reason -- both are checking soil types, which greatly restricts its range. I don't think it's possible to have widespread grass given the way we assign soil types without removing grass' dependence on any particular range of types. At least I haven't been able to find any range that works.

I don't see a problem with letting grass grow on any soil; grasses grow pretty much anywhere, but it's a bit of a departure from the spirit of the mod. And we could stunt grass growing on some types, if you like.

Bear in mind that Valleys (lua) doesn't use biomes. Everything is planted by raw temperature, humidity, altitude, and soil type.

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

Posted: Sat Dec 12, 2015 14:06
by Gael de Sailly
duane wrote:I'm not sure why there's suddenly discontent with the grass in version 2.3. As far as I can reproduce on my machine, both 2.2 and 2.3 produce about the same amount of grass, for the same reason -- both are checking soil types, which greatly restricts its range. I don't think it's possible to have widespread grass given the way we assign soil types without removing grass' dependence on any particular range of types. At least I haven't been able to find any range that works.
The grasses spawning conditions have not changed from 2.0. That was already a problem. I'll try to redefine all plants conditions as soon as possible (around December 20th), and release 2.3.

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

Posted: Sun Dec 13, 2015 05:24
by duane
This produces a little more grass without planting it on bare sand or clay. It still leaves big bare patches.

Code: Select all

diff --git a/plants.lua b/plants.lua
index e787412..c87684e 100644
--- a/plants.lua
+++ b/plants.lua
@@ -1,4 +1,8 @@
 if vmg.define("plants", true) then
+	local clay_threshold = vmg.define("clay_threshold", 1)
+	local sand_threshold = vmg.define("sand_threshold", 0.75)
+	local silt_threshold = vmg.define("silt_threshold", 1)
+
 	vmg.register_plant({
 		nodes = {"default:papyrus", n=4},
 		cover = 0.030,
@@ -39,15 +43,17 @@ if vmg.define("plants", true) then
 		end,
 	})
 
-	vmg.register_plant({
-		nodes = {"default:grass_1", "default:grass_2", "default:grass_3", "default:grass_4", "default:grass_5"},
-		cover = 0.60,
-		density = 0.24,
-		priority = 59,
-		check = function(t, pos)
-			return t.v15 < 0.65 and t.temp >= 0.65 and t.temp < 1.5 and t.humidity < 2.6 and t.v16 < 1.5 and t.v13 < 0.8
-		end,
-	})
+	for i = 1, 5 do
+		vmg.register_plant({
+			nodes = { "default:grass_"..i},
+			cover = 0.60,
+			density = 0.24,
+			priority = 59,
+			check = function(t, pos)
+				return t.v15 < sand_threshold - (i - 1) * 0.1 and t.temp >= 1 and t.temp < 1.5 and t.humidity < 2.6 and t.v13 < clay_threshold - (i - 1) * 0.1
+			end,
+		})
+	end
 
 	vmg.register_plant({
 		nodes = {"default:junglegrass"},

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

Posted: Sun Dec 13, 2015 18:37
by paramat
Let me know when you have the C++ version fairly complete then we can review it and perhaps work towards adding as a core mapgen.

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

Posted: Sun Dec 13, 2015 21:31
by sofar
paramat wrote:Let me know when you have the C++ version fairly complete then we can review it and perhaps work towards adding as a core mapgen.
+1!

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

Posted: Mon Dec 14, 2015 09:45
by Ivà
sofar wrote:
paramat wrote:Let me know when you have the C++ version fairly complete then we can review it and perhaps work towards adding as a core mapgen.
+1!
+1 too!

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

Posted: Mon Dec 14, 2015 13:49
by afflatus
+1 and me! :D

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

Posted: Mon Dec 14, 2015 16:44
by kaadmy
+1 for this being a core mapgen!

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

Posted: Mon Dec 14, 2015 19:58
by paramat
.. That is, of course, if the original author agrees to it.

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

Posted: Tue Dec 15, 2015 14:14
by Nathan.S
I would love for this to be a core mapgen as well.

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

Posted: Thu Dec 17, 2015 23:48
by Minetestforfun
It will be a great add to include this mod in a core mapgen :)

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

Posted: Fri Dec 18, 2015 15:07
by Fixer
+1 for inclusion in core minetest, it is amazing mapgen, really amazing.

btw, do I need 64bit minetest for that? I'm testing on 32bit git version and when approaching 1.4 Gb it gives me lua error about "getperlinnoise or possibly no memory error". My view is 240 nodes, even on default mapgens with forests it can break 32 bit limit.

Also, MT-related complaint... we need flowing water sound and very slight wind sound with tree leaves wind sound, that will be so amazing in this environment.

Getting some crashes, info in debug.txt, valleys mapgen 2.2 + krocks build of mt from 15 dec 2015:

Code: Select all

2015-12-18 18:54:47: [Emerge-0]:  >> === FATAL ERROR ===
2015-12-18 18:54:47: [Emerge-0]:  >> Unknown exception (Exception 0xC0000029) at 0x77010B0A
2015-12-18 18:54:47: [Emerge-0]:  >> Failed to save dump

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

Posted: Fri Dec 18, 2015 19:37
by kaadmy
Fixerol wrote:[...]
we need flowing water sound and very slight wind sound with tree leaves wind sound, that will be so amazing in this environment.
[...]
You mean like this: https://github.com/kaadmy/pixture/tree/ ... s/ambiance

No wind sound yet, but could be added in a couple of minutes.
Feel free to make a PR for more ambient sounds :)

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

Posted: Fri Dec 18, 2015 21:23
by Fixer
kaadmy wrote:
Fixerol wrote:[...]
Feel free to make a PR for more ambient sounds :)
I've listened to that sounds, their quality is awful, feels like 8KHz 32kbit/sec mono, please find better sources :} Maybe here, for example: http://www.freesound.org/search/?q=wind , same for birds
Also, I'm sorry for offtopic here.

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

Posted: Fri Dec 18, 2015 22:00
by Gael de Sailly
paramat wrote:.. That is, of course, if the original author agrees to it.
Ok for merging, of course :)
The only problem is that I can't write in C++. I'll continue to code on the Lua. You can write it in the core, but you will manage it yourself.

I have to change the license for that ?

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

Posted: Fri Dec 18, 2015 22:26
by Gael de Sailly
I don't manage to compile valleys_c :

Code: Select all

CMakeFiles/minetest.dir/mapgen_v7.cpp.o: in function « MapgenV7::generateCaves(short) »:
mapgen_v7.cpp:(.text+0x38f3): undefined reference to « CaveV7plus<MapgenV7>::CaveV7plus(MapgenV7*, PseudoRandom*) »
mapgen_v7.cpp:(.text+0x3964): undefined reference to « CaveV7plus<MapgenV7>::makeCave(irr::core::vector3d<short>, irr::core::vector3d<short>, int) »
mapgen_v7.cpp:(.text+0x398e): undefined reference to « CaveV7plus<MapgenV7>::CaveV7plus(MapgenV7*, PseudoRandom*) »
mapgen_v7.cpp:(.text+0x39f5): undefined reference to « CaveV7plus<MapgenV7>::makeCave(irr::core::vector3d<short>, irr::core::vector3d<short>, int) »
mapgen_v7.cpp:(.text+0x3a14): undefined reference to « CaveV7plus<MapgenV7>::CaveV7plus(MapgenV7*, PseudoRandom*) »
mapgen_v7.cpp:(.text+0x3a7c): undefined reference to « CaveV7plus<MapgenV7>::makeCave(irr::core::vector3d<short>, irr::core::vector3d<short>, int) »
mapgen_v7.cpp:(.text+0x3a8e): undefined reference to « CaveV7plus<MapgenV7>::CaveV7plus(MapgenV7*, PseudoRandom*) »
mapgen_v7.cpp:(.text+0x3af6): undefined reference to « CaveV7plus<MapgenV7>::makeCave(irr::core::vector3d<short>, irr::core::vector3d<short>, int) »
collect2: error: ld returned 1 exit status
make[2]: *** [bin/minetest] Erreur 1
make[1]: *** [src/CMakeFiles/minetest.dir/all] Erreur 2
make: *** [all] Erreur 2
The error message was partly in French, I've translated.

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

Posted: Sat Dec 19, 2015 01:49
by duane
Gael de Sailly wrote:I have to change the license for that ?
You would just have to give permission for Valleys C to switch from gpl3 (derived from the original) to lgpl2.1, which matches the minetest game, since your copyright is the only one on a different license.

Edit: The Valleys C support mod (the lua part), which contains all the graphics peculiar to valleys, is still (and can remain) gpl3. The actual mapgen only creates terrain and water and uses the minetest default game for vegetation, etc. unless told otherwise.

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

Posted: Sat Dec 19, 2015 01:57
by duane
Gael de Sailly wrote:I don't manage to compile valleys_c :

Code: Select all

CMakeFiles/minetest.dir/mapgen_v7.cpp.o: in function « MapgenV7::generateCaves(short) »:
mapgen_v7.cpp:(.text+0x38f3): undefined reference to « CaveV7plus<MapgenV7>::CaveV7plus(MapgenV7*, PseudoRandom*) »
mapgen_v7.cpp:(.text+0x3964): undefined reference to « CaveV7plus<MapgenV7>::makeCave(irr::core::vector3d<short>, irr::core::vector3d<short>, int) »
mapgen_v7.cpp:(.text+0x398e): undefined reference to « CaveV7plus<MapgenV7>::CaveV7plus(MapgenV7*, PseudoRandom*) »
mapgen_v7.cpp:(.text+0x39f5): undefined reference to « CaveV7plus<MapgenV7>::makeCave(irr::core::vector3d<short>, irr::core::vector3d<short>, int) »
mapgen_v7.cpp:(.text+0x3a14): undefined reference to « CaveV7plus<MapgenV7>::CaveV7plus(MapgenV7*, PseudoRandom*) »
mapgen_v7.cpp:(.text+0x3a7c): undefined reference to « CaveV7plus<MapgenV7>::makeCave(irr::core::vector3d<short>, irr::core::vector3d<short>, int) »
mapgen_v7.cpp:(.text+0x3a8e): undefined reference to « CaveV7plus<MapgenV7>::CaveV7plus(MapgenV7*, PseudoRandom*) »
mapgen_v7.cpp:(.text+0x3af6): undefined reference to « CaveV7plus<MapgenV7>::makeCave(irr::core::vector3d<short>, irr::core::vector3d<short>, int) »
collect2: error: ld returned 1 exit status
make[2]: *** [bin/minetest] Erreur 1
make[1]: *** [src/CMakeFiles/minetest.dir/all] Erreur 2
make: *** [all] Erreur 2
The error message was partly in French, I've translated.
I don't think you're using the same version that I am, since I commented out the generateCaves function a while ago. [Actually, that's the v7 that's complaining, but it doesn't do so on my system.] The one I'm pushing to is https://github.com/duane-r/minetest/tree/valleys_c (zip from https://github.com/duane-r/minetest/arc ... leys_c.zip).

However, let me download everything fresh and check.

Edit: Ok, after cloning with:

Code: Select all

git clone https://github.com/duane-r/minetest.git
I checkout valleys_c:

Code: Select all

git checkout valleys_c
I configure:

Code: Select all

cmake . -DRUN_IN_PLACE=TRUE
and make:

Code: Select all

make
and after several eons... it compiles with the usual error about the locale directory, but it works.

I modified the cavegen.* files to use a template, so that I could have two versions, for v7 and for valleys, but I may end up striking the v7 caves from valleys altogether. In any case, it's not affecting compile for me.

What system/compiler are you using? Maybe other compilers aren't dealing with templates the same way.