minetest.register_decoration -> function

Post Reply
LNJ
Member
Posts: 252
Joined: Tue Sep 23, 2014 16:02
GitHub: lnjX
IRC: LNJ
In-game: LNJ
Location: Europe/Berlin

minetest.register_decoration -> function

by LNJ » Post

If you could tell minetest.register_decoration a function (with position) that will be executed for every for every decoration.
Like this:

Code: Select all

minetest.register_decoration({
	deco_type = "function",
	place_on = {"default:dirt_with_grass"},
	sidelen = 16,
	noise_params = {
		offset = -0.02,
		scale = 0.03,
		spread = {x=200, y=200, z=200},
		seed = 19822,
		octaves = 3,
		persist = 0.6
	},
	biomes = {"grassland"},
	y_min = 6,
	y_max = 31000,
	decoration = function(pos)
		default.grow_tree(pos)
	end
})
When you use schematics every tree looks like the other!

EDIT:
I need this for trees!
Storage Drawers - The simplest item storage in Minetest

Glünggi
Member
Posts: 128
Joined: Wed Apr 16, 2014 08:13
Location: Switzerland

Re: minetest.register_decoration -> function

by Glünggi » Post

Use bit asymmetric treemodels (but not too asymmetric) and add

Code: Select all

rotation = "random",
in register.decoration.. then it looks not so strange similar.
More than one single treemodel for a biom can help too
Its not the solution.. but maybe helpful ;)
Image

User avatar
Clouds
Member
Posts: 102
Joined: Sat Aug 01, 2015 01:58
In-game: Cloud

Re: minetest.register_decoration -> function

by Clouds » Post

That looks really nice, a big pain to navigate but nice.

Glünggi
Member
Posts: 128
Joined: Wed Apr 16, 2014 08:13
Location: Switzerland

Re: minetest.register_decoration -> function

by Glünggi » Post

hehe...
but its also a benefit, if you want clime some mountains... or at the nigth you can walk over the trees and the mobs on the ground looks stupid from the laundry
It should just show wath is posible with schematictrees...
Is it also mutch faster then L system also lesser shadowfailures (on generate).
The disadvantage its thats the trees al have the same Model.... but that can be counteracted.. a little bit.

User avatar
Clouds
Member
Posts: 102
Joined: Sat Aug 01, 2015 01:58
In-game: Cloud

Re: minetest.register_decoration -> function

by Clouds » Post

With that many trees i really dont think people will notice the same tree issue

Glünggi
Member
Posts: 128
Joined: Wed Apr 16, 2014 08:13
Location: Switzerland

Re: minetest.register_decoration -> function

by Glünggi » Post

Thats are 3 different giant jungletrees with random rotation placed.
There are also 3 smal trees addet but they dont attract attention.
I think 3 different trees for a biom and random rotation on generate is ideal to bring some variety to the Landscape.
But i fear that is not the solution, cause i think LNJ wants really different trees and not a fake :)

edit:
you can also make 3 different modell of the same tree and add a random on the sapling who let spawn one of the 3 different Modell.

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

Re: minetest.register_decoration -> function

by paramat » Post

Also use 'y-slice probabilities' to randomly remove horizontal slices from the tree schematics, this is used in the latest mgv7 biomes for tree variety and height variation.

Sokomine
Member
Posts: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: minetest.register_decoration -> function

by Sokomine » Post

The trees in RealTest don't use random - and still their forrests look good. It doesn't take too many tree models for a good impression. Variety is of course welcome!
A list of my mods can be found here.

LNJ
Member
Posts: 252
Joined: Tue Sep 23, 2014 16:02
GitHub: lnjX
IRC: LNJ
In-game: LNJ
Location: Europe/Berlin

Re: minetest.register_decoration -> function

by LNJ » Post

Thanks for your answers!
Storage Drawers - The simplest item storage in Minetest

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests