InfiniteSims found a new entry over at Ocean Quigley’s Project Blog (former EA worker) sharing insight on how they came up with their lighting technique for the buildings during the night.  Very interesting!

SimCity 4 was really a giant compositing engine.

Visually, the city was a collection of sprites all layered and blended on top of each other. As the view panned around, a strip of new stuff was exposed and added to the existing image.

It was kind of like an elaborate, automatic matte painting. Like a matte painting, we used 3D geometry to help with sorting and overlaps, so that realtime elements (like cars and people) could be composited in.

So the natural way to represent night was by layering additional sprites on top of the existing scene. Here was my design proposal for night lighting, one that we wound up more-or-less implementing.

Let’s say that we start out with a building like this, and want to make a nighttime version of it

Ocean Quigley's project blog - lighting buildings in SimCity 4

First, we automatically make a mask for the the windows by assigning them all a particular material so that they’ll render into a separate buffer. We did that was in our pipeline, using 3DStudio Max.

Ocean Quigley's project blog - lighting buildings in SimCity 4

Then we get an artist to light the building, by placing point and spot-lights in the appropriate places. Charlie Aquilina lit most of the buildings we shipped with.

Now the building had to be rendered twice in our pipeline, once with normal daylight lighting, and once to capture the artist-placed lighting.

Ocean Quigley's project blog - lighting buildings in SimCity 4

Then when night comes in the game view, we tint the whole scene blue. We could even animate transitions, if performance allows.

Ocean Quigley's project blog - lighting buildings in SimCity 4

And to show that the building is inhabited (and that the power is turned on) we just add the window lights and the hand placed lighting over the building sprite.

I tried to break the windows into sections, so that they could be turned off and on in groups (showing how full a building was), but we didn’t have enough memory (or disk space!) for the additional window masks. Those big sprites wound up taking a lot of disk space.

Ocean Quigley's project blog - lighting buildings in SimCity 4

Other elements, like streetlights and headlights were nothing but additive textures on quads, placed appropriately. Give how simple the system was, night came out quite nicely.