Ocean Quigley’s project blog – lighting buildings in SimCity 4

Discussion in 'SimCity Legacy' started by Judhudson, Apr 7, 2010.

  1. Judhudson

    Judhudson is a Hi-Tech Redneck

    Ocean Quigley’s project blog – lighting buildings in SimCity 4

    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

    [​IMG]

    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.​

    [​IMG]

    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.​

    [​IMG]

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

    [​IMG]

    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.

    [​IMG]

    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.​

     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice