Now, I just have to add rules to get a more realistic city and compute some details on the mass buildings. But to do that, I have to manipulate polygons with a lot of algoritm more complicated one eachothers.
The first algo that I implement is the offset/setback operator, that push somes edges of a polygon insde or outside, changing it's topology, to get new shapes of different forms. On these pics, you can see inside offset and basic L-Shape and U-Shapes giving building the width of a classic appartement. There are also some texturing rules, and a fence generation for houses. Rule creation is done in minutes.
The most important thing is that these algorithms must work on any polygon, in any situation because you never know what the road graph will compute for you. This is certainly the most difficult part of the job : no place for quick and dirty code! on a 20 000 buildings city, the special shitting case is immediatly visible.
Aucun commentaire:
Enregistrer un commentaire