[WIP] Undergrowth [GitHub]

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

Mossmanikin wrote:
Neuromancer wrote:it still will not let me sync anything to this project
Very strange. Maybe it's because you use the name Neuromancer1 as well as Neuromancer56?
Added both names to the list of collaborators, hope it works now.

In case it doesn't work I'll gladly add the changes for you.
That is strange. I thought maybe I would need to use the command line. So I went to the command line and entered the command "git push" logged in as Neuromancer56. And the push to your repository worked this time, but it pushed as Neuromancer1. Funny thing, I had forgotten I even had a Neuromancer1 account. I have been using Neuromancer56 for everything for ages. So I'm not sure why it thinks it should be using that account when I'm logged in as Neuromancer56. You might as well leave both accounts as contributors since I'm not sure when it will use either account.

Some random thoughts:
I love the look of the forest soils, but I'm confused as to why you put it near rocks/pebbles instead of just under trees. It's not a bad thing, I kind of like encountering bare earth in random places. Also it looks like there may be a lot of trees where there is no forest soil. Which is ok, because single trees will not always have forest soil, but dense forests should have a lot of forest soil.

Why do we call them pebbles when pebbles are supposed to be the size of a pea? These things look like large rocks to me. I have to admit, I was skeptical about rocks at first, because they were complex node boxes and I thought they would hurt performance, but I love it when I run into them in the game. I get excited for some reason, they just look so cool and like they belong in the Minetest world.
Last edited by Neuromancer on Sat Sep 21, 2013 01:17, edited 1 time in total.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

I took a brief look at the code for the forest soils - the reason plants_lib seems to be too slow is things like this:

https://github.com/Mossmanikin/undergro ... ng.lua#L58

Note here how you set max_count to 6400, but then rarity to 1 and practically no biome controls at all. So basically you're telling plants_lib to execute your dry-leaves-placement function for every single surface node in the chunk, which is probably not what you wanted. :-)

What you need to do, aside from controlling for temperature, humidity, and other biome factors, is control for nearness to trees, using the near-nodes parameters:

near_nodes = {table}, -- what nodes must be in the general vicinity of the object being spawned.
near_nodes_size = num, -- how wide of a search area to look for the nodes in that list.
near_nodes_vertical = num, -- How high/low of an area to search from the target node.
near_nodes_count = num, -- at least this many of those nodes must be in the area.

Use that to check for the presence of tree trunks. You'll probably want near_nodes_size of about 4 or 5, a vertical of 1, and a count of 1. This will reduce it to a few hundred calls per chunk instead of several thousand.

Further, if you were to instead trigger on tree trunks instead of the ground, and set your near node to dirt with grass (with a _size of 1 and a vertical of 1), and then make your code handle the entire zone around the tree, you can execute your code exactly once per tree instead of once per surrounding node.

It's been a while since I've had to read my own API and code ;-) so I'm not 100% sure if this will work, but try it anyway. Do check the API thoroughly - there are a lot of features in there that will, when used properly, help trim down how many nodes (or function calls) have to be processed.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

@MM: I'd like to see more forest soils, especially under trees. Is it possible to do that using Vannessa's suggestions for faster generation?

User avatar
Mossmanikin
Member
Posts: 599
Joined: Sun May 19, 2013 16:26
Location: where we don't speak english.

by Mossmanikin » Post

Neuromancer wrote:I'm confused as to why you put it near rocks/pebbles instead of just under trees.
Actually I wanted it to generate below bushes, didn't work, so I tested how it would look below rocks. Doesn't make a lot of sense, but it adds some depth and variation.
Neuromancer wrote:single trees will not always have forest soil, but dense forests should have a lot of forest soil
Tried to define a dense forest by checking for tree nodes (4) within a radius (used to be 3, now 4). Looks good in a jungle, not really with normal trees.
Trees which use plants_lib are ignored (tiny trees, your bushes...).
Far too often forest soil becomes grass again while a block is generated (don't ask me why).
VanessaE wrote:I took a brief look at the code for the forest soils - the reason plants_lib seems to be too slow is things like this:

https://github.com/Mossmanikin/undergro ... ng.lua#L58

Note here how you set max_count to 6400, but then rarity to 1 and practically no biome controls at all. So basically you're telling plants_lib to execute your dry-leaves-placement function for every single surface node in the chunk, which is probably not what you wanted. :-)

What you need to do, aside from controlling for temperature, humidity, and other biome factors, is control for nearness to trees, using the near-nodes parameters:

near_nodes = {table}, -- what nodes must be in the general vicinity of the object being spawned.
near_nodes_size = num, -- how wide of a search area to look for the nodes in that list.
near_nodes_vertical = num, -- How high/low of an area to search from the target node.
near_nodes_count = num, -- at least this many of those nodes must be in the area.

Use that to check for the presence of tree trunks. You'll probably want near_nodes_size of about 4 or 5, a vertical of 1, and a count of 1. This will reduce it to a few hundred calls per chunk instead of several thousand.

Further, if you were to instead trigger on tree trunks instead of the ground, and set your near node to dirt with grass (with a _size of 1 and a vertical of 1), and then make your code handle the entire zone around the tree, you can execute your code exactly once per tree instead of once per surrounding node.

It's been a while since I've had to read my own API and code ;-) so I'm not 100% sure if this will work, but try it anyway. Do check the API thoroughly - there are a lot of features in there that will, when used properly, help trim down how many nodes (or function calls) have to be processed.
Thanks for looking at the code and giving tips. :)
Yeah I'm working with extremes there... I'm still struggling with the settings to guarantee smooth transition.
Neuromancer wrote:@MM: I'd like to see more forest soils, especially under trees. Is it possible to do that using Vannessa's suggestions for faster generation?
Didn't have a lot of time the last couple of days. I'm not very satisfied with how it works atm. Guess I'll make a backup and try a different way, using Vanessa's suggestions.

Noob 4 life!
My stuff

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

Mossmanikin wrote:
Neuromancer wrote:I'm confused as to why you put it near rocks/pebbles instead of just under trees.
Actually I wanted it to generate below bushes, didn't work, so I tested how it would look below rocks. Doesn't make a lot of sense, but it adds some depth and variation.
Neuromancer wrote:single trees will not always have forest soil, but dense forests should have a lot of forest soil
Tried to define a dense forest by checking for tree nodes (4) within a radius (used to be 3, now 4). Looks good in a jungle, not really with normal trees.
Trees which use plants_lib are ignored (tiny trees, your bushes...).
Far too often forest soil becomes grass again while a block is generated (don't ask me why).
VanessaE wrote:I took a brief look at the code for the forest soils - the reason plants_lib seems to be too slow is things like this:

https://github.com/Mossmanikin/undergro ... ng.lua#L58

Note here how you set max_count to 6400, but then rarity to 1 and practically no biome controls at all. So basically you're telling plants_lib to execute your dry-leaves-placement function for every single surface node in the chunk, which is probably not what you wanted. :-)

What you need to do, aside from controlling for temperature, humidity, and other biome factors, is control for nearness to trees, using the near-nodes parameters:

near_nodes = {table}, -- what nodes must be in the general vicinity of the object being spawned.
near_nodes_size = num, -- how wide of a search area to look for the nodes in that list.
near_nodes_vertical = num, -- How high/low of an area to search from the target node.
near_nodes_count = num, -- at least this many of those nodes must be in the area.

Use that to check for the presence of tree trunks. You'll probably want near_nodes_size of about 4 or 5, a vertical of 1, and a count of 1. This will reduce it to a few hundred calls per chunk instead of several thousand.

Further, if you were to instead trigger on tree trunks instead of the ground, and set your near node to dirt with grass (with a _size of 1 and a vertical of 1), and then make your code handle the entire zone around the tree, you can execute your code exactly once per tree instead of once per surrounding node.

It's been a while since I've had to read my own API and code ;-) so I'm not 100% sure if this will work, but try it anyway. Do check the API thoroughly - there are a lot of features in there that will, when used properly, help trim down how many nodes (or function calls) have to be processed.
Thanks for looking at the code and giving tips. :)
Yeah I'm working with extremes there... I'm still struggling with the settings to guarantee smooth transition.
Neuromancer wrote:@MM: I'd like to see more forest soils, especially under trees. Is it possible to do that using Vannessa's suggestions for faster generation?
Didn't have a lot of time the last couple of days. I'm not very satisfied with how it works atm. Guess I'll make a backup and try a different way, using Vanessa's suggestions.
Another idea I had was a transition between grass and desert sand. I was going to do it, but I was waiting until you optimized your code.
Back from the dead!

User avatar
Mossmanikin
Member
Posts: 599
Joined: Sun May 19, 2013 16:26
Location: where we don't speak english.

by Mossmanikin » Post

Evergreen wrote:Another idea I had was a transition between grass and desert sand. I was going to do it, but I was waiting until you optimized your code.
Sounds like a good idea.
Changed a lot of the code, the result looks better, not sure if it's still too slow.

Noob 4 life!
My stuff

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

Mossmanikin wrote:
Evergreen wrote:Another idea I had was a transition between grass and desert sand. I was going to do it, but I was waiting until you optimized your code.
Sounds like a good idea.
Changed a lot of the code, the result looks better, not sure if it's still too slow.
You're killing me! I installed the latest version of this mod in the Immersive Fun game. I was stunned by the beauty of it. You could really feel the impact that the trees have on the land, throwing leaves everywhere, choking out the grass, fallen logs. Simply amazing. But then there were real bad performance issues. Even on my best machine falling down to 1 fps and not being able to move. I had to look at the ground to get my fps over 1 so I could start moving again. It's like you have achieved perfection, but I'm not sure what to remove from the game to improve the FPS. I can't get rid of any of it. I love it all. And yet I can't play the game like this. :(

User avatar
Mossmanikin
Member
Posts: 599
Joined: Sun May 19, 2013 16:26
Location: where we don't speak english.

by Mossmanikin » Post

Neuromancer wrote:You're killing me! I installed the latest version of this mod in the Immersive Fun game. I was stunned by the beauty of it. You could really feel the impact that the trees have on the land, throwing leaves everywhere, choking out the grass, fallen logs. Simply amazing. But then there were real bad performance issues. Even on my best machine falling down to 1 fps and not being able to move. I had to look at the ground to get my fps over 1 so I could start moving again. It's like you have achieved perfection, but I'm not sure what to remove from the game to improve the FPS. I can't get rid of any of it. I love it all. And yet I can't play the game like this. :(
Please don't die! :D

Glad you like the look, I'm quite satisfied with it too.
Guess I'll have to check the code (of ferns and dryplants too) if there's something unnecessary.

In the meantime you could already make some changes in SeTTiNGS.txt in ferns mod folder:

Code: Select all

Ferns_near_Ores = true --> false
Ferns_in_Groups = false --> true

Horsetails_Spawning = true --> false -- (doesn't change ongen)
and if you like to experiment in settings.txt in dryplants mod folder:

Code: Select all

*_PER_MAPBLOCK = higher_value --> lower_value
*_RARITY = higher_value --> lower_value

Noob 4 life!
My stuff

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

All of these fallen logs make me think of mosses, mushrooms and the fungus that would consume them. It would be fun to have a mushroom mod with some poisonous and some healthy to eat. I'm looking at this Mod
viewtopic.php?id=2619 But I don't think it fits what I'm looking for.
Last edited by Neuromancer on Thu Sep 26, 2013 03:38, edited 1 time in total.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

I just cloned and tried out the latest code and this is looking really REALLY nice. No performance issues whatsoever for me.

I notice you support moretrees (at least for tree stumps and fallen logs), wonderful!

A suggestion: moretrees spawns special fast-growing saplings at mapgen time by default, all of which have names of the form, moretrees:xxxxx_sapling_ongen. You should match on those also, to get the under-the-tree leaves/grass mixtures that show up elsewhere.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Mossmanikin
Member
Posts: 599
Joined: Sun May 19, 2013 16:26
Location: where we don't speak english.

by Mossmanikin » Post

Neuromancer wrote:All of these fallen logs make me think of mosses, mushrooms and the fungus that would consume them. It would be fun to have a mushroom mod with some poisonous and some healthy to eat. I'm looking at this Mod
viewtopic.php?id=2619 But I don't think it fits what I'm looking for.
Yesterday, while remembering one of your earlier posts and looking at some pictures of forests, I thought mosses would be really nice to have.
Mushrooms would also be cool, yes.
Will take a closer look at mods with mushrooms and mosses the following days to see if a new mod is needed or if support for (an)other mod(s) makes more sense.
Bas080's plants mod has some beautiful textures, unfortunately it's a bit slow on my machine.
VanessaE wrote:I just cloned and tried out the latest code and this is looking really REALLY nice. No performance issues whatsoever for me.

I notice you support moretrees (at least for tree stumps and fallen logs), wonderful!

A suggestion: moretrees spawns special fast-growing saplings at mapgen time by default, all of which have names of the form, moretrees:xxxxx_sapling_ongen. You should match on those also, to get the under-the-tree leaves/grass mixtures that show up elsewhere.
Thanks for your feedback. :)
I'm glad you like it and that it works for you.

Very good idea to trigger on those saplings. Will do that.

Noob 4 life!
My stuff

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

As much as I try to avoid nodeboxes, I'm starting to come around to the idea that that it might be a good idea to use them for the branches of the bushes, and for putting sticks on the ground. When you go into a woods, sure there are a few fallen logs laying around, but there are fallen branches and sticks everywhere laying on the ground. Most of the sticks are just straight simple sticks. If we wrapped them with all the moretrees textures they would look really nice.

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

The following thoughts ran occured to me
We could take your tiny tree trunks from the fern mod and wrapped them in all the moretrees textures to come up with a variety of sapling trunks.
Then we could orient them in the corner of the nodebox, instead of the center. That way if you rotate/orient it horizontal it will lay on the ground like a fallen sapling trunk or a fallen tree branch. Also by having the trunk in the corner, we could create branch node boxes that could branch out in any of 4 directions. These branches could be wrapped by all the moretrees textures as well, and could also serve as branches for bushes or fallen branches if oriented horizontally. Then just re-use all of the leaf styles from more trees.

That would give us a a rich and varied sapling, bush, and fallen branch mod.

User avatar
Mossmanikin
Member
Posts: 599
Joined: Sun May 19, 2013 16:26
Location: where we don't speak english.

by Mossmanikin » Post

@Neuromancer:

Some great ideas. I'm experimenting with small twigs atm.

Noob 4 life!
My stuff

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

Idea: Once I finish the cavestuff, I'll start working on "beach". ;)
Back from the dead!

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

I was watching a documentary on spirituality, and thought it might be a cool idea to create a spirituality mod, but then I realized that this mod, and the other mods that bring natural beauty bring a spirituality to Minetest. I find myself wandering the landscape just reveling in the beauty of it all.

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

Evergreen wrote:Idea: Once I finish the cavestuff, I'll start working on "beach". ;)
Cool! Looking forward to it. Makes me wonder what wonderful ideas you have in mind.
Last edited by Neuromancer on Sat Sep 28, 2013 01:05, edited 1 time in total.

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

What do you guys use to create your nodeboxes? Do you use blender, or something else?

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

Neuromancer wrote:What do you guys use to create your nodeboxes? Do you use blender, or something else?
I use ruben's nodebox editor, you can't use blender to create nodeboxes you know. :P
Back from the dead!

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

@MM: I like what you are doing with the twigs, laying them on top of the ground as a flat texture. I think this would be a great idea for adding moss, fungus and decay to rotting logs. But there is something wrong with the twigs, they are too regular. I think you need at least 1 more variation slightly off the 45 degree angle that the current twig is at, and at a different length. Otherwise the pattern is too predictable and looks fake.

Also: thanks for fixing the allsides optional in the bushes mod!
Last edited by Neuromancer on Sat Sep 28, 2013 02:04, edited 1 time in total.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

Idea: match on apples and on moretrees _ongen apple tree saplings (both at mapgen time). Generate a few "overripe" ones on the ground around/under those trees. Not sure what to DO with them if the player picks one up, maybe they can be cooked or something to make them edible.

Might be a good idea to use the signlike draw type so that the apple appers to be flat on the ground, or do like you're doing with the fallen leaves.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

VanessaE wrote:Idea: match on apples and on moretrees _ongen apple tree saplings (both at mapgen time). Generate a few "overripe" ones on the ground around/under those trees. Not sure what to DO with them if the player picks one up, maybe they can be cooked or something to make them edible.

Might be a good idea to use the signlike draw type so that the apple appers to be flat on the ground, or do like you're doing with the fallen leaves.
Good idea. As far as what to do with the rotten apples, when asked to clean them up, get out your dad's set of golf clubs and hit them into your neighbor's yard. Not that I have ever done anything like that.

The more I think of it the more I like moss. It can grow on the side of fallen logs, trees, natural stone, stone monuments, ruins, etc.
Last edited by Neuromancer on Sat Sep 28, 2013 10:47, edited 1 time in total.

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

I often feel guilty about how I always point out the flaws in MM's creations, or how I come up with an endless supply of ideas for him to implement while I barely have the time to implement anything myself. Then I play the game with all of his mods and I think to myself I'm so glad I have done this! It was worth it! He has achieved something absolutely incredible! I used to look at Minetest as something fun and addictive but fairly clunky looking, but MM has turned it into something that goes beyond anything I have imagined possible. MM, we all owe you a huge debt of gratitude.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

This modpack is now supported by HDX :)

(or at least, it supports what was present as of a few hours ago. :D )
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Neuromancer
Member
Posts: 964
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

I know we're supposed to fork, and I will if you want me to, but I added a moss texture and node to the trunks mod because it seems to make sense that moss would most likely grow on the side of fallen logs. Feel free to rip it out if you want. It probably needs variations on the texture to make it look more realistic. I decided to go with signlike just to see how that looked and worked. Whats cool as you can stick it on top of or on the side of just about anything.
Last edited by Neuromancer on Sat Sep 28, 2013 13:25, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests