Looking at it after a break of a few weeks not working on the project gave me a valuable fresh perspective and I realised that maybe the whole chart subdivision plan was flawed, maybe there was a better way. Rather than abandon charts altogether though I came up with a new way to use them - rather than splitting them up to try and make lots I thought it might be interesting to start with tiny "seed" lots placed in locations and with orientations I already knew to be sensible then apply some sort of iterative growth algorithm to let them fight it out in a sort of survival of the fittest manner.
The best starting position for this free-for-all seemed to be placing a seed lot half way along any chart edge longer than some minimum threshold. This not only ensured the lots would follow the roads exactly but also made it easy to determine the building front side. Each seed lot is a small square only a couple of metres in size, their initial placements in my test city can be seen here:
Seed points for lot generation |
Should a lot run out of space before it reaches the minimum size threshold required to place a building on it the lot is flagged as invalid and other lots allowed to grow into it's space if required. Once all lots have grown as much as possible the process is complete.
After a dozen iteration the above seed lot layout produces this completed result:
After 12 iterations no more lot growth is possible |
The image below illustrates where the invalid lots that didn't survive the cut were located:
Lots in red are too small for buildings and are discarded |
One final check that is also performed is that building lots larger than a certain size are subdivided along their width into a number of sub-lots that meet the size criteria. This maximum size is a function of the distance from the population centre so building lots nearer the centre of the city are allowed to be larger than those in the suburbs. In the next image lots in blue are the result of subdivision in this way:
Lots in blue are the result of subdivision of larger lots |
Placing my simple building place-holder object on these new lots and giving them heights based upon their distance from the population centre gives what I think is a fairly decent looking impression of a city for such a graphically simple representation:
Adding some road geometry with a number of lanes based upon the generation number of the road in the road network generation system and some basic pavements gives some other pleasing results:
Overall I'm quite happy with the new system and am definitely much happier about moving on to look at procedural architecture with this better foundation. It shows if nothing else that if your instincts are telling you that a system is not up to the job, it's often best to listen to them!
No comments:
Post a Comment
Comments, questions or feedback? Here's your chance...