Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Populating a WE selection with Schematics at a set Density #10

Open
ChristianLieven opened this issue Aug 3, 2017 · 2 comments
Open

Comments

@ChristianLieven
Copy link

ChristianLieven commented Aug 3, 2017

Hey Mike,

This is an idea a couple of us had on the server. We'd like to be able to make any sort of WE selection, then define a SchemSet or a mix of SchemSets and then have the SchemBrush populate that area subject to a random scattering algorithm.

Ideally, to determine how close together trees cluster this algorithm would take into account a few biological parameters such as the horizontal dimensions of the canopy or its density i.e. amount of light under it of the individual schematics.

Ideally, users would be able to play with the parameters (or even better, a single parameter), but depending on the algorithm you choose this might not be necessary/ feasible.

Here are some suggestions of what kind of algorithms would make this happen in principle:
http://www.gamasutra.com/view/feature/130071/random_scattering_creating_.php?page=3

http://procworld.blogspot.com/2011/05/forest.html

I don't think you need to worry about factors like slope, water or sunlight much. I think it should be up to the user to just use another SchemSet and some sort of 'scatter coefficient' (sparse - dense) more suitable to an area's topography.

What do you think?

@mikeprimm
Copy link
Owner

Neat idea - let me read the provided info, and give it some thought!

@ChristianLieven
Copy link
Author

ChristianLieven commented Aug 4, 2017

With regards to what Steineke posted here, this could be a rough pythonic pseudo-code outline for the command, that helps avoid all the mental acrobatics he's performing to squeeze this into FAWE:

def ForestGen(we_selection, trees_schemset, density, undergrowth=none, undergrowth_density=0, debris=none, debris_density=0):
	# scatter algorithm that uses parameters from the tree schems to determine where to place trees.
	# Parameters used are height of the tree, width of the canopy and light level at the coordinates.
	scatter_algorithm_trees(trees_schemset, density)

	if debris:
    	# scatter algorithm that just picks random free coordinates in the we_selection
    	scatter_algorithm_debris(debris_schemset, density)

	if undergrowth:
    	# scatter algorithm that samples coordinates based on the undergrowth_density parameter and the light level in the we_selection.
    	scatter_algorithm_undergrowth(undergrowth_schemset, density)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants