rnd_trees

Post Reply
User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

rnd_trees

by rnd » Post

Growing trees using natural growth process. Growth proces only occurs through air/leaves, the trunk shell can grow into other things too

GITHUB: https://github.com/ac-minetest/rnd_trees/wiki

LICENSE: LGPL

Image

Image

Image

Usage: place rnd_trees:tree on ground.

Algorithm sketch:

Start with one piece of living wood. Assign it life energy and let it grow. With each growth energy decreases. Depending on energy it can randomly branch in random direction with length of branch depending on energy; living wood remembers the branching stage. Randomly add leaves above trunk height with random sizes depending on if we are in end growth stage or not.

If not in branch thicken the living wood a bit to make thicker main tree trunk. The growth stops when living wood is out of life energy.
Attachments
tree4.jpg
tree4.jpg (345.14 KiB) Viewed 1484 times
tree3.jpg
tree3.jpg (274.2 KiB) Viewed 1484 times
Last edited by rnd on Sun Feb 07, 2016 22:06, edited 5 times in total.
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

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

Re: rnd_trees

by Don » Post

Cool!
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
MineYoshi
Member
Posts: 5373
Joined: Wed Jul 08, 2015 13:20
Contact:

Re: rnd_trees

by MineYoshi » Post

Looks good!
Have a nice day! :D

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: rnd_trees

by rnd » Post

here is what happens if no growth limit or bad settings

Image

Image
Attachments
fail_2.jpg
fail_2.jpg (102.67 KiB) Viewed 1484 times
fail_1.jpg
fail_1.jpg (109.32 KiB) Viewed 1484 times
Last edited by rnd on Fri Oct 23, 2015 09:14, edited 1 time in total.
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
MineYoshi
Member
Posts: 5373
Joined: Wed Jul 08, 2015 13:20
Contact:

Re: rnd_trees

by MineYoshi » Post

going to happend this!

Image
Have a nice day! :D

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: rnd_trees

by rnd » Post

more complex branching process for better looking trees (open image in new tab)

Image
Attachments
tree0.jpg
tree0.jpg (391.92 KiB) Viewed 1484 times
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

Re: rnd_trees

by Minetestforfun » Post

This is beautiful and soo real, really great work, i like it so much !

Can't wait to see this for all trees in a mapgenV7 :)

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: rnd_trees

by rnd » Post

large trees
Spoiler
local TREE_SIZE = 30;
local TRUNK_SIZE = 10;
local BRANCH_LENGTH = 30.;
Image

what remains to be done:
-rewrite code so that it uses http://dev.minetest.net/VoxelManip,
-save "DNA" into each tree seedling so that we can have different types of trees
-few fine tweaks
Attachments
tree_large.jpg
tree_large.jpg (127.79 KiB) Viewed 1484 times
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
Prot
Member
Posts: 36
Joined: Thu Apr 02, 2015 13:20
GitHub: EuPhobos
In-game: EuPhobos
Location: SaratOFF

Re: rnd_trees

by Prot » Post

Wow! This is amazing idea! And looks very impressive!
You can do some new biomes with this trees.. Like getting settings from mapgen, and plant somewhere big trees, or somewhere little..
I like it!

User avatar
MirceaKitsune
Member
Posts: 924
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

Re: rnd_trees

by MirceaKitsune » Post

Took a quick look at the screenshots and code. I like both the idea, and how simplistically it seems to be implemented! I might use this for the trees of a Minetest game I'll be making, but need to test it a bit first.

Can you please specify what license the script is under? May I include it as LGPL like most mods are?

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: rnd_trees

by Hybrid Dog » Post

You want to make it use vmanip, do you want a whole tree to appear immediately (faster) or the current way (being able to see it growing, vmanip may decrease speed because of low nodes count)?

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
rnd
Member
Posts: 220
Joined: Sun Dec 28, 2014 12:24
GitHub: ac-minetest
IRC: ac_minetest
In-game: rnd

Re: rnd_trees

by rnd » Post

MirceaKitsune wrote:Took a quick look at the screenshots and code. I like both the idea, and how simplistically it seems to be implemented! I might use this for the trees of a Minetest game I'll be making, but need to test it a bit first.

Can you please specify what license the script is under? May I include it as LGPL like most mods are?
ok, LGPL
1EvCmxbzl5KDu6XAunE1K853Lq6VVOsT

User avatar
MirceaKitsune
Member
Posts: 924
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune
Location: Romania, Bucharest

Re: rnd_trees

by MirceaKitsune » Post

rnd wrote:ok, LGPL
Thanks. I actually wrote my own tree growth function from scratch, since this mod wasn't working well for me. But it was inspired by its idea, and uses the same life-based mechanism. I'm not sure if I'll publish it as an individual mod, but it will be featured in my game.

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: rnd_trees

by ManElevation » Post

This gives a complete different look to minetest trees, this is awesome!
My Public Mods! Discord: Rottweiler Games#3368

Astrobe
Member
Posts: 570
Joined: Sun Apr 01, 2018 10:46

Re: rnd_trees

by Astrobe » Post

This mod has always been on my mind since I stumbled upon it.

Here is "Aberrant trees", a refinement (or rather, a degeneration) of RND's original mod.

I have centralized the tree parameters into a tree structure, which allows to define different tree "models". One can change the trunk and leaves materials, the height of the trunk, the global size of the tree, etc.

The mod still does not check for protections, but at least it will not replace non-air nodes.

The ABM has been replaced by node timers.

I plan to add an API function to let other mods register their own models and to add a "fruit" slot. Also the "growth heads" will probably be made invisible (or maybe "glowing air").

Attached is my "preview" version. No crafting recipe, give yourself a "a_trees:sapling" and plant it. The tree you will get is of random type. It can be a "regular" tree or... a stone tree with coal leaves, an obsidian tree with obsidian glass leaves, an ice tree, or a brick tree with mese lamp leaves. That kind of mildly crazy stuff.

For anyone who wonders, I think it won't work as-is if you try to place those saplings at mapgen time because their growth timers won't be started. One would need to use a LBM to start them.

Of course, do not use it in any "serious" world.
Attachments
a_trees.zip
Aberrant trees, alpha version.
(1.71 KiB) Downloaded 66 times

User avatar
j0j0n4th4n
Member
Posts: 249
Joined: Tue Jan 26, 2021 06:45

Re: rnd_trees

by j0j0n4th4n » Post

Code: Select all

	{trunk="default:stone"	, leaves="default:stone_with_coal"	, size=20, height=5, width=20, pace=10},
	{trunk="default:cobble"	, leaves="default:glass"			, size=40, height=5, width=10, pace=10},
	{trunk="default:ice"		, leaves="default:snowblock"		, size=12, height=20, width=5, pace=5},
	{trunk="default:obsidian"	, leaves="default:obsidian_glass"	, size=12, height=20, width=5, pace=5},
	{trunk="default:brick"	, leaves="default:meselamp"	        , size=30, height=10, width=20, pace=5},
These are some strange trees you got there lol
cdb_894a100ddd76

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests