After looking at CityEngine, i got an idea, that it would be nice to make something similar for Leadwerks
So, i decided to start with simple Village generator: i extend standard rode, so no it have some additional parameters:
1) By default, generator is disabled, its enabling by checking "Enabled" flag
2) "Seed" is just a seed for random generation.
If you need exact position of each model after each restart, you may use the same seed, and buildings would be guaranteed generates on the place you see.
If you need to change position after ever restart (some random-generations), you may just generate new seed number, and models would be generated in new positions every time.
3) "Density" is density: the higher variable - the more tries to position new buildings.
4) "Distance" is distance to the road, this is simple
5) "Models" is just a list of models, that you want to generate: it can be houses, trees, whatever you want.
also, tested with racing demo - looking very nice.
TODO list:
- add "distance" and "density" to each model or to list of models. In this way user'll be able to generate something like "i want field1, field2 and field3 be randomly generated near the road, i want house1 and house2 to be randomly generated after the fields and i want tree1, tree2, tree3 and tree4 to be generated right after houses"... this would allow user to create villages very fast.