Procedural City Builder

For the ABC 911 show package, we needed quickly create a cityscape that was immediately recognizable as the LA skyline as viewed from a hill over top of a residential/ mixed zoning neighborhood. Because of the sheer number of buildings that would be visible, a simple random scatter made the limited number of assets too obvious, and there was no real sense of cohesion in the layout.

While the final composition had a handful of hand placed buildings, mostly LA’s distinct skyscrapers, the rest of the city was entirely procedurally generated with a tool I built specifically for this project.

Open Source Data

Because this project had such a quick turnaround, there was no time to art direct massive landscape or cityscape layouts. I figured the best and fastest way to generate a plausible representation of LA would be to use whatever open source data about LA I could get my hands on.

Terrain:

Using heightmaps of the LA area, I blocked out the terrain to frame the city against the mountains like in the design boards that were pitched to the client. Because the terrain was actually LA I could find the perfect position for the camera to be overlooking a valley with a densely populated neighborhood, while seeing the skyline and mountains in the background.

some simple selections and operations on the heightmap in houdini added a large lake in the distance, as well as flattened out some areas that were a bit too hilly.

Buildings:

I downloaded a variety of different neighborhood types from OSM, and using a Labs tool brought the roads and building outlines into houdini as polylines. From there I split the roads and building, projecting the road lines onto the terrain and sweeping a simple profile along it to create roadways. Using a custom VEX script I calculated the size and orientation of the building outlines, then got the center point of their bounding box and wrote those properties to the one point. The points generated this way were also projected to the level of the terrain.

With a library of different building assets ranging from townhouses to skyscrapers, I created a few collections based on size and zoning type. With another custom vex tool I instanced random buildings from the appropriate collection onto the points generated from the OSM building outlines based on hand painted zoning and the previously collected building size data. This gave me a nice coherent layout of buildings across the terrain.

Foliage:

After the terrain and the buildings were blocked in, I built a system to scatter millions of points across the terrain that would be used for trees. These points were then culled both randomly and according to a set of rules defined in another custom VEX script to ensure that no trees were growing in the roadway or obviously intersecting with buildings. Trees were then instantiated to these points based on a few stacked procedural noises to clump similar types of trees together in a natural way.

Unreal Engine:

Because of the tight deadline, there was no way we were going to be able to render this comfortably with our more usual workhorse, redshift. Instead I relied on the USD pipeline from Houdini to UE5 to quickly transfer assets in and get them set up for rendering. With the extreme color corrections and busy layout of the shot, and after leveraging a LOT of fog volumes, many of UE5’s shortcomings when handling huge scenes like this were largely unnoticeable.

The final touch was to construct a mountainside that the camera would dolly back over, framing the city nicely. For this I used the built in quixel megascans library to get rocks, trees, and palms; then applied a simple vertex shader to the plants to have them gently swaying in the wind. No keyframing required.

Previous
Previous

Forza TechArt

Next
Next

Retro-Reflective Shader