//server/stuff/CityGen>
Main
CityGen
CityGen is an experiment in procedural city generation. Only textures are not generated. Screenshots are arranged from newest to oldest. The FPS listed is for an old GPU barely capable of shadow mapping.
Roads are generated without any input, just an L-system and a bounding limit (extents of the map). They're placed with CSG. The remaining regions (empty) are converted into plots which are subdivided into lots. For appropriate lots (determined by size and shape and if it's directly connected to a road), there's a 70% chance of generating a building. Buildings are generated upwards, with the base floor being the largest and subtracing rooms until the top floor. A list of windows is generated and shuffled for each floor except for the base floor, which uses base floor tiles. Roof decals are randomly shuffled and placed perpendicular to the longest axis of the face. The next step would be to use prefabricated geometry for finer details such as balconies, HVACs, stairwells, etc.
A city block.
Atmospheric scattering for the sky and a day/night cycle (not shown), specular hilights on the windows.
The building generator wasn't written yet. These are placeholders, generated by extruding lots upwards to random heights.
Lot generation.
This screenshot shows roads and CSG splits (white lines).
A road network.