Minetest_game: Tree size variation

Created on 23 Jan 2018  路  31Comments  路  Source: minetest/minetest_game

Many of the forests in minetest can start to get a little repetitive sometimes. The forests (of all types) would be much more exciting with a larger tree size variety, height, width and so on.

Engine change needed Feature request Low priority Mapgen Supported by core dev

Most helpful comment

all forests now have a variety of trees

I think apple forests look very homogeneous and repetitive, they need more variation, aka number 1 problem with forests imo.

All 31 comments

Hmm, also see #1750, which is this, but for a specific tree type.

All trees do have varying height. For a single schematic width cannot be varied.
It would be good to add extra schematics for more variation, i am keen to reduce the desire for servers to add unsuitable tree mods, especially the intensive 'moretrees'.
I would like each forest to have at least 2 different trees, even if of the same species.

Apple trees could have a second size that has a width of 7 nodes and slightly taller.
Small pines of width 3 could be added.
I am working on a larger (emergent) jungletree with a 3x3 trunk, ideal for treehouses.

Remember any new species adds a new wood and therefore many new items, so different shapes of existing species is a good idea.
Since i designed our trees i'll assign this to myself for design consistency.

I think I've posted another issue about that, basicly minetest game needs more trees schematics, used randomly at mapgen time.
No need to make more species, just add few (say 5) schematics for each type of tree with random variations.

Yes there's a request for random chosen schematic decorations https://github.com/minetest/minetest/issues/4485
I'll need help with that, i would have coded that by now if i could.

consider also making the lowest default_tree (or apple tree, whatever) at least one node higher.
They cause issues where the is snowfall, as well as just a pain when traveling uphill.

I agree with fixer but, even just 3 schematic variants per tree would suffice. They could be labeled "young", "mature", and "old"?
The young trees could be what currently exists, the mature a taller variety, and the old is when the width kicks in
This will make it easy to keep the current trees assigned at higher elevations because IIRC going much taller can create a cutoff at certain elevations? (I may be mistaken)
(just some suggestions)

Trees can be up to 16 nodes tall before they need to be restricted in altitude.

Since we have L-system trees do we even need schematics?

L trees are still buggy and slower than schematics

L system trees are not yet designed to be added during mapgen, as each one has a separate light update. Even if that is fixed, as is intended, they are intensive and slow due to the generation method.
Schematics are essentially a small volume of world database, just mapnodes with nodename, params 1 and 2, so load in almost as fast as world does.

I was thinking about all of this last night, and a thought popped into my head.

What is the possibility of looking at sapiers old "growing_trees" mod (I think addi has modified it some)

But, just looking at the code, and seeing if the normal "tree" nodes could be used rather than the current nodeboxes it uses (though I have to say I do prefer the nice branches etc) but, even those could be reworked to use cubic style, opposed to the current round.

That mod produces a variety of tree sizes
(Just a thought to pass by here) it could be a profitable venture (not in terms of monetary)

link: https://forum.minetest.net/viewtopic.php?f=13&t=978&hilit=growing_trees

[edit] I should mention I do not mean to use the "growing" aspect, as this would be extremely hard on resources. Just the layout/schematic style of the trees

It uses a sequence of node additions to create a tree, the initial tree is placed as a small 2-node structure and the ABMs then grow it step by step. So to create complete trees on mapgen each tree would need to progress through many growth steps, this makes it similar to L-system and no less intensive, too slow for mapgen.

This is why I mentioned modifying the growth system to more match what is used now, and other tweaks. Not focusing purely on how the mod itself is written, but looking beyond that to figure a way to make it integrate with the current trees.lua

I was looking more about the full tree results

I have to look at it more thoroughly

For small variations, can't we randomise the height the schematic is placed at relative to ground level? I know this wouldn't give us big variations, but it could help.

(I'm not sure if this is already being done somewhat - because I do see some variations in height, but surely there could be more?)

Tumeninodes, yes that's what i mean, on mapgen each tree would be rapidly progressed through many growth stages to become instantly full-grown. This is exactly what L-system does, so would be much slower and much more intensive than current schematics. A variety of schematics is a much better idea.

For small variations, can't we randomise the height the schematic is placed at relative to ground level?

Random 'y offset'? That would be identical to the already present trunk height variation. Currently each schematic has horizontal slices randomly removed to alter structure and height.

Doesn't seem to do much though; surely more variation could be produced? I am thinking of the way you added roots to emergent jungle trees - part of the schematic can be concealed underground where needed to provide greater possible variation.

I could add a little more variation to some trees.
Appletrees have as much as they can, if the trunk gets any longer they will look out of proportion.
Acacia only has 1 node of height variation, i'll make it more.
You can see the 'y slice probabilities' here https://github.com/minetest-mods/saveschems/blob/master/init.lua
Adding to my TODO list.

I looked through all trees again, many have a fair amount of variation already:

Aspen variation 5. Has a maximum height dictated by needing to be significantly shorter than both jungle tree and pine. Any more variation will make it too low to walk under.

Acacia tree variation 1. PR #2049 increases this to 3.

Apple tree variation 2. Any higher will be unsuitable for it's form. Any more variation will make it too low to walk under.

Jungle variation 4. These are intentionally high without extreme variation to create the canopy. I could add another node of variation.

Pine variation 5. I can make the maximum height 1 node higher and also add another node of height variation.

More height variation in #2049

For randomly selecting schematics we need engine feature https://github.com/minetest/minetest/issues/4485

I looked through all trees again, many have a fair amount of variation already

It is not just height, but also shape and branches of those trees.
default

I still don't get it, can't you have several tree schematics as of now, here is code I found in MTG:

function default.grow_new_apple_tree(pos)
    local path = minetest.get_modpath("default") ..
        "/schematics/apple_tree_from_sapling.mts"
    minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2},
        path, "random", nil, false)
end

and this function:

    minetest.register_decoration({
        deco_type = "schematic",
        place_on = {"default:dirt_with_grass"},
        sidelen = 16,
        noise_params = {
            offset = 0.036,
            scale = 0.022,
            spread = {x = 250, y = 250, z = 250},
            seed = 2,
            octaves = 3,
            persist = 0.66
        },
        biomes = {"deciduous_forest"},
        y_min = 1,
        y_max = 31000,
        schematic = minetest.get_modpath("default") .. "/schematics/apple_tree.mts",
        flags = "place_center_x, place_center_z",
        rotation = "random",
    }) 

And instead of one path, just insert a function that randomly chooses "/schematics/apple_tree_1,2,3,etc" from provided list?

I looked through all trees again, many have a fair amount of variation already:

Here i was referring to height variation.

'grow new apple tree' etc. are sapling growing functions, nothing to do with mapgen.

In the decoration registration if you had a random path that random path would be randomised once only on registration, so only 1 schematic would be used.
Random schematics are high priority will try to code that.

2049 merged but keep open for other requests.

screenshot_20180303_234150

Experimenting with small pines.
I like these, will probably add as a second pine, and use noises to create a varying mix.

screenshot_20180304_162445

Smallest and largest.

screenshot_20180304_163315

These are lovely, can't wait to add them.

2068 merged.

Emergent jungle trees have been added too.
Any more variety will have to come from adding more species, or using multiple schematics for a species. An engine feature for randomly selected schematics within a decoration registration would help.
This request is partially attended to now.

I disagree this should be considered high priority enough to be in the roadmap.
It's also mostly done, all forests now have a variety of trees, each tree already has height and structure variation.
This issue could possibly be closed, even though we could create more variation later.

all forests now have a variety of trees

I think apple forests look very homogeneous and repetitive, they need more variation, aka number 1 problem with forests imo.

Fixer-007, the deciduous forest biome contains apple and aspen trees. All apple trees have per-node and height variation. I disagree. I think you are now over-complaining.

As there has been so much improvement of tree variety i no longer think it is justified to keep this issue open. However, i still support further variation in future.

sorry, better I start a new issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cx384 picture cx384  路  6Comments

Wuzzy2 picture Wuzzy2  路  4Comments

Fixer-007 picture Fixer-007  路  6Comments

benrob0329 picture benrob0329  路  4Comments

paramat picture paramat  路  6Comments