the eternal struggle of making cities to destroy

Originally posted on Cohost: 2024-09-15
thinking about making big city macro stompy scenes vs actually making big city stompy scenes

macro art usually takes place in some kind of city, and as a macro artist you want the ability to create plausible cities for your sizetrash shenanigans. The problem: cities require effort to make, which is why we often see the "cluster of buildings in the middle of nowhere"-type of cities in macro art.

In 3D, there are a number of ways to get a city to play with, with the easiest one being "download a city model from the internets". With these you usually only get a subset of a city, limiting how big of a macro you can put in the city before the perimeter of the city is visible (copypasting the city a bunch can help with this though).
Another issue is that the cities you get tend to be triangle soup with hundreds of materials and textures (like the playgrounds), which doesn't always lend itself well to destructive fun times.

With geometry nodes being part of Blender now there are quite a few city generators available on the market, but they usually aren't fully suitable for my macro needs; a recent one I looked at contained so many textures that anything larger than a few blocks would max out the GPU memory, on top of only supporting cities that were totally flat (and not because they were flattened by macros).

As the saying goes; if you want something done right, you gotta do it yourself.

my attempts at making cities/city generators, in chronological order

This will likely be my last longpost in this place, after sitting in drafts for over a year!

A very crappy rendition of the OneShot world (March 2017, Blender 2.78)

a rendition of the Barrens, Glen and the Refuge from the game OneShot

the OneShot overworld has three color coded areas laid out as concentric circles. The innermost red one is a city with high rises and walkways, and a really tall tower in the middle. My rendition of this city was terrible, but to be fair it was for a shitpost where Niko trebucheted(?) the sun bulb into the tower from the outermost circle. This was also before the Random Per Island output was available in materials, so each window is a separate object in order to have them randomly lit ...

Godzilla on the copper circle (May 2017, Blender 2.78)

Godzilla 2000 standing on a city that's made on a copper circle

The thumbnails for my garry's mod playermodels used to be the model standing on a copper circle and waving at the camera, but this got old after a while so i started mixing it up. For the Godzilla 2000 playermodel I built a little city on top of the copper circle. I also modeled a simple car and semi truck, that were later re-used in the distant background of a 2020 render.

Lazy City (June 2020, Blender 2.83)

A giant dragon destroying a city at night, complete breath energy beam and fire. The scene does not look good in daylight.

Ian Hubert's lazy tutorials are brilliant, and I had to give the city one a try because it was kaijune and I needed a city to destroy. This method of making a city exploits the fact that all CGI looks better in the dark because everything is harder to see, including the lack of detail. Which also means it falls apart instantly if you turn the (day)light on.

First geometry node city (January 2021, Blender 2.92 alpha)

A simple scene with instanced buildings and "street lights"

Geometry nodes had just been added to the main branch of blender, and one of the first questions on my mind was "can it make city?". I cooked up this sample of buildings and "street lights" that were actually just emissive planes - I think I was having trouble instancing point lights so i went the silly route

More geometry node testing (March 2021, Blender 2.93 Alpha)

A "city" that's just a cluster of simple models in the shape of a footprint. The nodegraph is visible below.

The geometry nodes system was rapidly getting new nodes and I'd play around with them to test new ideas. I think this file was for testing the new "Attribute Sample Texture" node, using a texture of a footprint to generate a city in the same shape (and then of course the potential of making holes with that shape). There was a lot of attribute wrangling in this version of geometry nodes, and you can see how the nodegraphs would stretch very horizontal because of it.

Inexplicable City (March 2021, Blender 2.92)

A "city" that's a cluster of buildings surrounding a lake, with some roads on the perimeter.

With a little bit more geometry nodes experience... i made what was essentially the same as the first geometry node sample but more of it. It's fine because it was made for a parody of the "City that is Just A Cluster Of Buildings in The Middle Of Nowhere". Ignore the pink in the picture, that's just one of the terrain textures that went missing since then.

Now With Parking Lots and Foliage (June 2021, Blender 2.93)

A city with a parking lot and trees next to the roads. The scale of the buildings are very off.

At this point I had managed to make some vaguely tree-looking things using geometry nodes, good enough for the simple style I like to go for. Then the buildings are just improvised models placed a lot of times, with extreme scale discrepancy in this case (they were more of an afterthought)

Roads with Buildings (October 2021, Blender 3.0 Alpha)

A winding road with "buildings" on each side, and a view of the nodegraph to the right.

Buildings in cities are usually located next to roads, so going forwards my approach to generating cities was to generate the roads first and then place buildings next to them.
This was made possible thanks to the new curve nodes in 3.0, as well as the new geometry nodes paradigm of "fields", which really cut down on the amount of attribute wrangling you had to do, making the node graphs shorter and more branched.

More roads, more mesh (December 2021, Blender 3.1 Alpha)

a simple mesh generating roads and buildings on small faces

Cities have more than just one road, so the next test was to generate roads from edges in a mesh, and then instancing "buildings" on faces that are small enough. Large faces would become parks, and this method let you sculpt cities to some degree:

interactively sculpting a city generating mesh

Fuck it, We Grid (December 2021, Blender 3.0)

a grid city with a giant bird footprint in it

Needing a Really Sprawling City for a giga bird to trample, I took the easy way out and made a city that is Literally Just A Grid. The randomness comes from moving the building models up or down, rotating them and coloring them differently from each other. And then flattening a large number of them where footprints are.

This really Extrudes my Buildings (February 2022, Blender 3.1 Beta)

a city consisting of subdivided extruded faces

Real Cities are usually shaped a bit more organically than just one massive grid, so I experimented with subdividing a mesh and extruding individual faces to different heights. The benefit is that buildings will be flush against the streets, but like previous city attempts it only looks barely passable at night.

I Don't Care Anymore Just Place Buildings Randomly (March 2022, Blender 3.1)

a city consisting of instanced buildings and trees randomly on a terrain surface

One time saving thing about cities is that if you place the camera low enough, you don't have to make the streets, as all the buildings would obscure them. And then it's more than enough to just instance building models and foliage randomly on a vaguely city textured terrain surface.

Courtyard City (July 2022, Blender 3.2)

city blocks with a courtyard in the middle, with buildings (mostly) pointing outwards to the street

A test of having city blocks where buildings face away from the center, creating a "courtyard" in the middle. With arrows on the test buildings that point towards the "street" in a Sim City-like fashion.

UV City (July 2022, Blender 3.3 Alpha)

buildings with repeating textures from a texture sheet

When generating buildings based on extrusion rather than instancing, you need some way of putting details on them, and textures are one way. This was a test of using a single texture sheet to make repeating textures on many building models. It mostly worked, but texture orientation was an issue.

This really Extrudes my Buildings Again (July 2022, Blender 3.3 Alpha)

a city consisting of extruded faces

Another attempt at using extrusion to make buildings. This one worked better but the buildings kinda oozed into the streets to varying degrees, which is quite dangerous for traffic and pedestrians.

A Combination of Grid and Road (October 2022, Blender 3.3)

a city with suburbs on the outskirts

Needing a large city on a terrain, I combined the grid city from december 2021 with the road-building layouter to make a sloppy city with suburbs on the outskirts.

This Isn't A City It's Just Ruins (January 2023, Blender 3.4)

macro tigershark and squid dog from changed destroying the already destroyed wasteland outside the facility

A refreshing break from trying to create realistic cities where I could just place ruined buildings willy nilly and color them with the distance to the camera.

Road Layout (February 2023, Blender 3.5 Beta)

a sprawling grid city with a bit of randomness

More testing with getting a complex road layout from a simple mesh. This one is mostly a grid with some edges deleted here and there.

Voronoi Road Layout (March 2023, Blender 3.5)

a grid road layout interspersed with more organic roads

Yet another attempt at road layouts, this one using a voronoi texture to shake the grid up a bit.

A Full City?? (Nov 2022-May 2023, Blender 3.3-3.5)

four pictures from a city showing skyscrapers, highways with cars, resort hotels with sun chairs and palm trees, suburbs, marinas with boats

I set out to make a more complete city system that would be used in a commission, complete with a manually placed road layout and city zoning, suburbs, financial district, special buildings like an airport, a furniture store based on ikea, stadiums, a transit network with elevated railways, highways, marinas with boats, container ships, power lines, wind turbines ... a lot of stuff. It was a severe case of scope creep and I've yet to finish the scene. I'm hoping to return to it in the future and clean up the nodegraphs a bit with the new repeat and potential for-each zones.

Iteratively Generating Buildings (May 2023, Blender 3.6 Beta)

generating one building per frame based on the footprint the building is on

With simulation nodes came the first concept of a loop in geometry nodes, and I tested the feasibility of generating a unique building per city block. It is possible but the serial nature of the simulation zone (and repeat zone) means it doesn't scale well for generating cities. The future for-each zone should hopefully be better for this use case however.

Look I Just Need A Flattenable City (December 2023, Blender 4.0)

a grid city flattened with many pawprints

It was yet another december, and like the december two years prior I took the easy way of going with a grid layout for the city streets, and then just flattening a lot of the city with pawprints to hide that fact. This city system has been used in at least three scenes, that's a success in my book at least.

Flattenable City Now With Less Grid (June 2024, Blender 4.1)

a less griddy city with a couple pawprints

I needed to make a sequence of someone stepping on a city, with various camera angles. I took the flattenable city and extended it to work with a road network of varying width. Wide roads would get tall buildings next to them, and further from the population centers you'd get suburban houses. I also needed to add persistence to the city, keeping track of building IDs so that buildings didn't change type or color between the panels in the sequence, as some panels had very similar camera angles. Technically this city system should be possible to make an animation with, but that's a thing for future me.

Future

I still haven't made a city system that I'm happy with, but the ones I have are decent enough for macro scenes of a specific size range (about 500m to 5km). For macros smaller than that I'll create a bespoke city scene or modify existing third party ones. I should probably also do more micro and shrinking scenes in the future because then I won't have to make entire cities all the time ...