Procedural Lot Design and Modular Lot Elements
In today's Drawing Board post I want to expand on the ideas I covered in a couple of previous topics: namely Lots and Structures, Procedural Generation, and Services Coverage. Specifically, I'd like to look beyond structures and talk about the other parts of a lot. While buildings might make up the most noticeable features of our urban landscapes, a lack of attention to what constitutes the space between them can thoroughly negate their visual impact, no matter how much care we lavish on their details. But let's not get ahead of ourselves, lest we outrun the Disclaimer:
IMPORTANT DISCLAIMER
This series of posts are not to be read as "official" ideas for the Metropolis Project, they are simply my personal thoughts about what some cool game features might be. The final feature set for the game will be decided by the community and the development team contracted to build the game, and may not include any of these things. More details about the purpose of the Drawing Board articles can be found here.
To start, let me just sum up briefly the relevant concepts from the first two articles linked above. Lots constitute discrete areas of land, which, when developed, will generate a procedural structure appropriate to the zoning type they have been assigned. The structure, while associated with the lot, is independent in object terms; That is, the lot shape can change without affecting the structure, and vice versa. While this paradigm of separating the lot and the structure gives us a necessary degree of flexibility, it also requires us to give some thought to the leftover areas of the lot. After all, no matter how well designed and rendered our building models are, they will look bland and artificial if they are surrounded by featureless flatness. As in jewelry, the setting can have nearly as much effect as the gem.
Lot Generation
Like the buildings, I believe the non-structure areas of the lot should be generated procedurally; But while building generation is largely a matter of size, shape and design, the considerations when generating the setting are slightly different. Let's look at some of them below:


These two houses would both fall into the same category zoning-wise, but their structure, position, and orientation give them a dramatically different appearance.
Position, Usage, Orientation and Connection: When a lot is first improved, and a new structure is generated, there are several basic questions to consider. The first is, where do we place it? This seems like a fairly trivial matter, but it can have a large effect on the character of the lot. For example, a suburban home would typically be set back from the street and have a comfortable amount of space separating individual dwellings. A downtown commercial zone, however, would have buildings set directly against the sidewalk, with little or no space between the adjacent buildings. Which brings us to another consideration: how much of the lot should be occupied by the structure? Our aformentioned suburban home might have a relatively small footprint compared to its total area, while our downtown building might be constructed flush to the property line. Clearly these calculations would have to work closely in tandem with the building generation code to create buildings that fit together where they would be appropriate.
The third issue is orientation, or rather which way the structure faces. This variable is closely related to a fourth, equally important question: how and where is the lot connected to the network? While this might be fairly cut-and-dried for rectangular lots bordering only one road, it becomes more of an issue when the lot is oddly shaped or could be oriented to two or more streets. While the "front" of the lot could be specified during the zoning process, it would also be necessary to determine where a front walk or driveway connected the structure to the network. Furthermore, large lots with a relatively small footprint (think a country estate with large grounds) would not necessarily be oriented towards the road, while large commercial developments (a shopping mall, for example) might have multiple network connections and no specific "front" orientation.
The network elements within the lot itself would be set based on the structure and zone type. The procedural script for a given lot would determine where the network would terminate (front door, garage, etc.) and create a connection between the structure and the connection point to the adjoining network infrastructure. A typical house, for example, would create a driveway (defined using the same options as the road tool) leading from the garage to the street, which would be connected just like an intersection. A mine or factory, on the other hand, could connect directly to the rail network if it contained a terminal; The logic for rail connections would be polled, and a spur would be connected to the main track at an appropriate angle.
Texture and Ground Cover: Moving away from the main structure itself, probably the next most important element of the lot is the base texure which covers the ground. City builders which combine the lot and the main structure into one unit routinely suffer from a jarring contrast between the ground type of the lot and that of the surrounding landscape; If only one base texture is chosen for a given building, then the lot will inevitably end up being placed on ground that doesn't match it's underlying terrain and look artificial. If the building is separated from the base lot however, we can overcome this problem by rendering the lot texture independently to blend with the underlying terrain.

The base textures on these Cities XL lots don't match the ground (or the other lots), giving them an artificial look.
Of course, "blending with the underlying terrain" doesn't necessarily imply that the lot texture should simply be transparent. After all, if our base terrain is desert, or scrub grass, we will probably want our buildings to develop some kind of landscaping other than bare dirt. Instead, the generation engine should create approriate texture overlays and landscaping based on both the lot type and the existing terrain. For example, a power plant or other heavy industrial installation would simply allow the underying ground to show through, as facilities like that typically don't want to waste money on making the building attractive. A residential lot, on the other hand, would react to the existing texture: if it developed on a grassy piece of land, it would simply use the existing grass texture; If it was placed instead on a barren area, it would create a lawn overlay. There are a lot of possibilities for individual building types, but in principle the ground texture should be able to factor in the existing landscape, the development type, and the adjacent lots/structures in generating an appropriate base texture for the lot.
Elevation: Elevation would be handled on an analagous basis to texture: the generation engine should make modifications (or not) based on the existing terrain, the adjacent lots, and the type of structure on the lot. The big questions for elevation are whether to flatten the lot; And if it is flattened, at what elevation it should be flattened and how it should transition into the next lot over. Obviously, this depends largely on the structure type: A parking lot can't conform to the existing contours, while a rural cabin should not affect the terrain at all. Since elevation is a fairly deep topic potentially deserving its own article, I'll simply say that, like texture, it should be responsive to the situation.
Substructures and Props: Finally, the lot design will need to incorporate 3D objects separate from the main structure. I would group these into two types: substructures and props. The principle difference between these two is that substructures would contribute value to the simulation(as described below), while props would simply be for visual effect. I would further divide props into two types: fixed and variable. Fixed props, like trees or fences, would be generated once and remain a part of the lot; Variable props would change at random, either on loading a game or at some other point where the geometry is redrawn. Things like bicycles, parked cars or hot dog vendors would fall into this category. The actual models for props and substructures could be handled the same way as buildings, depending on the object in question: things like garages or swimming pools could be generated procedurally, while benches or dumpsters would probably use a predesigned model.
Generation Settings
As we've seen above, there are a lot of variables to take into account when generating lots procedurally. A feature that would give the player more control over this process, as well as reducing the amount of computation required by the generation engine, would be generation presets. Generation presets would use the system of option trees that I described in the last Drawing Board article. They could be handled either as a subset of the zoning options, or as an independent layer. With generation presets, the player would be able to select a lot or group of lots prior to their being developed and specify, to as granular a degree as they wished, what would appear and not appear in that area. So, for example, upon building a new block, one could specify that the houses that developed would be set forward and wall-to-wall, like English row houses; Or that they could all have driveways that connect to a back alley rather than the main street; Or that they have lawns and white picket fences. As with road options, these selections could also be saved as presets, allowing the player to easily create a large area with a very specific look.
An additional benefit of using generation presets would be reducing the amount of processor cycles needed by the generation engine; The more specifically the presets are set, the fewer decisions have to be made by the program when creating the lot.
Modular Improvements
As I mentioned briefly above, certain lot elements would function not only as visual additions, but would actually contribute to the simulation. For lots that develop independently, i.e. any non-municipal lot, substructures could develop to reflect changes in the wealth profile of the residents, and in turn contribute to the resale value of the lot. For example, a residential lot could install a garage or a swimming pool, which would in turn increase the property value of the house. A retail lot, on the other hand, could add a large sign near the road, which would increase the amount of customer traffic. As a side note, this feature would also be present for structure generation: homes and businesses could make additions to existing structures, raising their value.
For player-controlled municipal lots, substructures could be used to support the modular paradigm I talked about in the Services Coverage article. A player would be able to manually add appropriate substructures to a given lot which would upgrade its functionality in some way; Municpal parks could add a playground, for example, or a library could add a bike parking rack.
Architect Mode
One more addition that I think would be valuable for procedural lots (and structures, for that matter) is to include an "architect" or "expert" mode which, when toggled, would allow the player to manually adjust any procedural output. This would be the default for municipal lots, of course, but a player using expert mode would be able to manually adjust privately owned lots and structures as well. There could potentially be two versions of this, one in which the player can only adjust visual parameters, and one in which they would have free rein (the latter bordering on a "cheat", as one could tweak property values unrealistically.) This would be a necessary tool for those players whose main focus is on the look of their cities, and want to have absolute control over the minutiae; But it would also come in handy for the average player who sees an occasional odd or unrealistic result from the procedural engine (Players of Sim City 4 might recall the "swimming pools on hillsides" effect) and wants to fix the anomaly.

"Don't talk to me about the laws of physics, Elaine, I know where I want that pool."
To sum up, the way the simulation generates lots is nearly, if not as, important as the way it generates structures. With a well thought out system in place for making lots realistic, our cities will have greater realism and aesthetic appeal than was ever possible before.
11 reponses to "Procedural Lot Design and Modular Lot Elements"
1. Man alive John. If our
Man alive John. If our secret project comes out successfully, I would like the opportunity to apply the same efforts to these drawing board articles. First things, first of course, but the discussion is tantalizing! I wish this game were available now!
2. Oh! Guess who didn't sign
Oh! Guess who didn't sign in? The Mighty Borlaug wrote the above :)
3. Ah, the pitfalls of leaving
Ah, the pitfalls of leaving anonymous commenting on! I've totally done that too :)
Good idea about the drawing board articles! Might take some of the edge off waiting.
4. I think it would be a good
I think it would be a good idea to implement growth stages in the game. A suburban or rural house or estate would be at growth stage one (the lowest tier of population density) while a rowhouse would be growth stage 3 (the highest population density that is still considered low density).
Depending on how many growth stages we impliment, there should be 3-5 densities.
With 8 or 9 growth stages, low density would be stages 1-3, medium would be 4-6, and high would be 7-8 or 9.
With 15 growth stages (like the CAM), low and medium would remain the same, high would be 7-10, and unlimited or supertall would be 11-15.
For agriculture we could have small to medium farms (1-3), factory farms (4-5), and park/landmark farms (6/7).
Industry could be either 10 or 15 growth stages depending on whether you think that offices should be industry and how large you want a limit on the size of factories or biotech offices.
"Words are words; explanations are explanations, promises are promises, but only performance is reality."
Always do your best and you will always be better than the best in my eyes.
5. To AzemOcram, I add this:
To AzemOcram, I add this: Your suggestions are spot on. Growth stages should be numbered and many. I personally hated the zone density issue in SC4. I figure, bearing with how the CAM made the game and it's growth stages more advanced and intelligible, why not also do away with the player selectable density zoning? Just put down a zone and let it grow to what the surrounding area can support. It's density is already decided by growth stages and those stages are supported by what the city around them can withstand in a given location.
One need only increase the lot size if a location is dying to become a huge factory or a very tall building. I find that re-zoning for high density once factors are met is a chore activity we could eliminate, especially since so much care is going into making certain that the building and lot match the portion of the game world where they've been placed.
6. If I plan on an area on
If I plan on an area on having high density eventually, I just zone high density. If zoning was less expensive, then zoning high density would be a good idea. I want to be able to limit density. I think that growth stages in Metropolis should be like SC4D plus CAM but with the ability to zone anything be it 1-3, 1-15, or 9-15 (having a minimum density). I think there should also be a cheat code that allows any density to develop.
"Words are words; explanations are explanations, promises are promises, but only performance is reality."
Always do your best and you will always be better than the best in my eyes.
7. I think a distinction that's
I think a distinction that's important to make is whether you're talking about "density" as a measure of population per lot, or per unit of area (e.g. pop./sq. km) While row houses are more "high-density" in the latter sense (as the lots tend to be smaller and more of them crowded together), they are the same as a ranch house in terms of how many people live there on average. So another factor that we're going to have to look at is how lots are combined/subdivided within a larger contiguous area.
While Mighty has an interesting idea about doing away with density restrictions entirely, that might be taking it a bit far; AzemOcram is right that we need a way to limit density. I think the best approach is to do away with the arbitrary "low/medium/high" paradigm from SC4, and differentiate zones as is done IRL: by usage. So, rather than zoning "low density residential" you would zone for "single family residences" (with a height restriction of x, if that was also what you wanted); What developed there subsequently would depend on other factors like the land value, the surrounding neighborhood, and the size/shape of the available lots (or, a more specific building profile could be set manually by a player with "expert mode" turned on).
Mighty also brings up a good point about rezoning, and I agree that it can be a pain; But really I think that's more a UI issue, we just need to make sure there's a simple way to select a lot, or block, or street, or entire neighborhood and alter the zoning for the selection
8. Oh Hey! That sounds like a
Oh Hey! That sounds like a winning compromise! Using limits on how high a lot can become and what type of building will tend to develop there would be infinitely more advanced than how SC4 managed. I imagine having the following settings that could be assigned to selected lots:
Lot Archetypes -
Residential:
Single Family
Residential Park
Subdivision Housing
Condominiums (Urban/Suburban)
Apartments (Urban/Suburban)
Superstructures
Mixed Usage (Residential/Commercial)
Commercial:
Retail (Small/Medium/Large)
Services (Fast Food/Dining/Fuel/Automotive/Hotels)
Mercantile (Small/Medium/Large/Big Box)
Implement (Cars/Boats/Machinery)
Offices (Local/Regional/Corporate)
Industrial:
Agricultural (Farms/Ranches/Orchards/Plantations/etc)
Manufacturing (Milling/Tap and Die/Foundry/etc)
Refining (Ore/Petroleum/Resin/etc)
Processing (Meat Packing/etc)
Mining
Shipping
Waste
Height Limit -
1-X though I would feel troubled to expect any city to develop buildings exceeding 160 are going to be a little on the fanciful side.
Density/Jobs -
Min and Max of the number of people who can occupy the 3D space.
Then I just throw a selection lasso around my city centers and tell the big metros to build as tall as they can while my idyllic town centers and main streets retain a smaller, humbler look even though property values have gone out the roof. Throw into that a "density" min and max and you can pretty well tell what kinds of buildings will develop. In this way, at least, you can leave the door open for huge structures when your city is small and retain certain smallness' when your city is very large. I'd be into something like that :)
9. Well, growth stages would be
Well, growth stages would be population density per square meter of lot. A low rise that has building to the edge of the (large) lot would be the same growth stage as a narrow midrise or a very narrow and tapered highrise (all) with (roughly) the same population figure. A height limit and a stage limit would prevent the elegant highrise but would allow the low or mid rise depending.
Rowhouses are either stage 3 or stage 4 (according to SimCity 4) which would mean they could be classified as low or medium density by SimCity 4 but can be zoned in lowish density (1-4) or medium-low density (2-4).
"Words are words; explanations are explanations, promises are promises, but only performance is reality."
Always do your best and you will always be better than the best in my eyes.
10. The problem with defining
The problem with defining growth stages only by density is that it leaves out other factors, like property value; A mansion should be at a higher growth stage than a ranch house, but they would still have the same density in terms of population/lot area.
Rowhouses serve to highlight the issue that there's no linear spectrum from low-density to high for residential buildings; They are really more a different stylistic choice rather than a "growth stage", and I think the procedural logic should reflect that. In other words, if a player zones lots that are narrow and specifies single-family housing as their allowed usage, the block should develop terraced housing in response.
11. Growth stages could be a
Growth stages could be a limiting factor for the density of housing when population is low. Single family houses in medium or medium-low density would include terraced housing. Having wealth levels would also help. Land value could get you a $$$$ mansion, a $$$ low rise, a $$ mid rise, or a $ high rise but density and services (satisfaction/desirability) would define what would grow. Without cheating, rowhouses would not be the first buildings to develop in the first city of a region.
"Words are words; explanations are explanations, promises are promises, but only performance is reality."
Always do your best and you will always be better than the best in my eyes.
Post new comment