[Mod] Forest

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Post

It's just you :)
Wanna hear a secret? I'm 25. So only my boss can impose smth on me. Boy, how I'm glad his work starts right when my is finished and the only evidence of his existence I can see anytime are his notes.

User avatar
lightonflux
Member
Posts: 384
Joined: Mon Nov 11, 2013 07:22
In-game: lof
Location: Germany

by lightonflux » Post

Is it just me or is world generation with the mods extremely slow?

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Post

If those are mods which are using LVM then it's just you. Otherwise it's everyone :)

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

by Gael de Sailly » Post

Yes, I know map generation is very slow. But I will work on it. It is slow because ores and trees are generated by minetest.set_node. Using the voxelmanip is very faster, but it will force me to rewrite an important part of the code.
But you can contribute, this mod is free, if someone rewrite partially my code I will accept it.

And I suggest to stop talking about parental authority, it is not the topic at all.
Just realize how bored we would be if the world was perfect.

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Post

Don't be so angry ;)
It IS related after all. Besides, we all have a "Report" links under every post and while you telling us to stop talking about parental authority you actually CONTINUE to talk about it ;)
So, ignore us, please. We'll stop eventually ;)

As for set_node - maybe you should look at L-system trees? They should be faster.

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

by paramat » Post

Gael de Sailly, my 'noise23' example mapgen mod shows how to use the fast 2D perlin noise maps, i have managed to get my head around perlin maps now so if you get stuck i can help out.

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

by paramat » Post

... but then, seeing as your computer time is limited i might convert this to perlin maps myself.

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

by Inocudom » Post

paramat wrote:... but then, seeing as your computer time is limited i might convert this to perlin maps myself.
I think he would very much appreciate that, paramat.

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

by Gael de Sailly » Post

I've tried to convert the ores and trees from set_node() to voxelmanip, but it was not faster. I use the function find_nodes_in_area() to find the places in which ores can be placed, and also for the third step of the mapgen (trees) to find the grass blocks on which trees can grow. And for the grass blocks which are selected to support a tree, it chooses the tree which grows on it according to numerous criteria, including water proximity, for which I use minetest.find_node_near().
So I have to write voxelmanip to the map 3 times :
  • After the base map generation, because ores uses find_nodes_in_area()
  • After the ore generation, because for the water proximity trees uses find_node_near() to detect the sea, and also the mud or water holes, which are generated as ores.
  • And finally after the trees.
I have not thought about perlin maps yet. I use 17 noises in my mapgen. 8 in the function get_elevation() and 9 in the register_on_generated(). I think the slowers are N1 to N4 of the register_on_generated(). They are calculated for each node in 3D to define caves contrary to the others which are calculated for each node in 2D. I will think about minimizing the number of noises and rework the mapgen and especially the function get_elevation().
Just realize how bored we would be if the world was perfect.

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

by Inocudom » Post

You could present this mod to Freeminer too, a fork of Minetest:
http://freeminer.org/

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

by paramat » Post

Okay so i converted the main mapgen loop to use perlin maps, much faster now, but still slow, i'll see what i can do about the get elevation function, im going to try a few other improvements.
Last edited by paramat on Tue Mar 18, 2014 20:59, edited 1 time in total.

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

by paramat » Post

Image
Last edited by paramat on Tue Mar 18, 2014 03:09, edited 1 time in total.

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

by paramat » Post

http://www.mediafire.com/download/lyyiw ... estpm2.zip
Converted everything i could to use perlin maps, so the initial mapgen loop only takes 2-3 seconds per chunk, but the oregen and treegen is still slow, perhaps due to number of trees and complexity of the code, so in total 10 seconds to a minute per chunk.
Last edited by paramat on Tue Mar 18, 2014 21:00, edited 1 time in total.

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

by Krock » Post

paramat wrote:Converted everything i could to use perlin maps, so the initial mapgen loop only takes 2-3 seconds per chunk, but the oregen and treegen is still slow, perhaps due to number of trees and complexity of the code, so in total 10 seconds to a minute per chunk.
Yes, your generation made it faster, but the speed is still at 30s per chunk.
I hope this can get even faster because I like this mod :)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

by paramat » Post

Okay so ive looked through the rest of the code, i found an abm on water source with chance 3, i changed that to 64. Other than that there's nothing else i can do to speed it up. As far as i can see it is slow due to the complexity of the code, and the use of 'find nodes in area' and 'find node near', these get very slow with even a medium radius, having each tree check for water proximity is awesome but slow :)
Also, i found an abm on group:tree with interval 10 chance 1, not sure what this did, possibly removing floating trees? That might cause a lot of processing i'm going to try disabling that.

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

by Gael de Sailly » Post

Thank you for your contribution, paramat.
paramat wrote:I found an abm on water source
I had forgotten this one ! My code is very untidy. There are remnents of my old codes, and experimental programs like it I have forgotten to delete. You can remove it. I've deleted most of these stuffs when I published my mod, but I retains the original, with all of these codes, disabled or not. I'm going to clean it.
paramat wrote:I found an abm on group:tree with interval 10 chance 1, not sure what this did, possibly removing floating trees?
Yes, it removes floating trees. But it is not very important.

In the near future, I will publish a new version, in which vegetals change their appearance according to the season.
Last edited by Gael de Sailly on Wed Mar 19, 2014 16:15, edited 1 time in total.
Just realize how bored we would be if the world was perfect.

User avatar
celeron55
Administrator
Posts: 532
Joined: Tue Apr 19, 2011 10:10
GitHub: celeron55
IRC: celeron55

by celeron55 » Post

Gael de Sailly wrote:So I have to write voxelmanip to the map 3 times :
  • After the base map generation, because ores uses find_nodes_in_area()
  • After the ore generation, because for the water proximity trees uses find_node_near() to detect the sea, and also the mud or water holes, which are generated as ores.
  • And finally after the trees.
Hmm... it should be very well possible to implement a fast find_nodes_in_area and find_node_near to VoxelManipulator. If someone can do a prototype and test its performance for eg. this mod, that would be useful.

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

by Gael de Sailly » Post

Yes, it's a good idea. It will make my mod very faster.
Just realize how bored we would be if the world was perfect.

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

by Inocudom » Post

celeron55 wrote:
Gael de Sailly wrote:So I have to write voxelmanip to the map 3 times :
  • After the base map generation, because ores uses find_nodes_in_area()
  • After the ore generation, because for the water proximity trees uses find_node_near() to detect the sea, and also the mud or water holes, which are generated as ores.
  • And finally after the trees.
Hmm... it should be very well possible to implement a fast find_nodes_in_area and find_node_near to VoxelManipulator. If someone can do a prototype and test its performance for eg. this mod, that would be useful.
Celeron55, it is so wonderful to see you giving helpful advice for this mod.

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

by Gael de Sailly » Post

FOREST 1.2 NOW !
The changes are the flowers apportionment and their seasonnal disappearance and appearance.
Just realize how bored we would be if the world was perfect.

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

by Inocudom » Post

I sincerely hope that there is a server out there that will kindly host this mapgen, because it really does deserve it.

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

by Inocudom » Post

I think it might be a good idea to change the name of this mod. People are pretty much ignoring it, considering how much attention the bacon mod is getting.
Last edited by Inocudom on Sat Apr 05, 2014 17:09, edited 1 time in total.

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

by paramat » Post

Don't worry Inocudom, i don't think it is being ignored, it is an impressive mapgen.

Gael de Sailly, i am impressed with your spawn player function that calculates elevation and searches for a good spawn point, this inspired me to do a similar thing in my singlenode version of watershed mapgen, i ended up using the voxelmanip and perlinmaps to generate elevation maps of multiple chunks looking for a good spawnpoint on low land.
Last edited by paramat on Sun Apr 06, 2014 01:05, edited 1 time in total.

User avatar
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

by philipbenr » Post

Inocudom wrote:I think it might be a good idea to change the name of this mod. People are pretty much ignoring it, considering how much attention the bacon mod is getting.
I think that a lot of mods get attention, but the kinda shall I say stupid (not to be offensive, but really) mods get more attention and posts because it is bizarre. These still get attention. Whenever I see a new post, I almost always click on it :P

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

I actually glanced over this mod's title a few times, skipping it. I wish I hadn't, it looks amazing!
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests