We use cookies on this website. By using this site, you agree that we may store and access cookies on your device. Find out more and set your preferences here.

Darren Byford, Lighting TD at The Mill explains how they pushed Arnold to the limit by lighting a birds eye view of London with over 1 million lights for an episode of Skins.

Over here at Mill TV, shortly before it was closed we were tasked with a shot for the show “Skins”, episode “Pure” of a London flyover at night that had over a million lights in total.

Time was short for this shot, the initial schedule gave us 5 weeks, later this was stretched to 7 weeks. The crew was small; a modeller, a generalist, a matte painter, a compositor, a tracker and me, the lighting TD. And the shot was huge, 1450 frames starting with a live action plate at ground level then sweeping up, over the rooftops of north London, towards the Thames and finally lifting into the sky somewhere over Westminster. The bulk of the city geometry was created in CityEngine and then exported to Maya, but the detail was too low for the start of the shot. The generalist and modeller added the detail to this while the matte painter extended the peripheral regions. The tracker needed to track the start of the shot and then fly the camera over London and it was unlikely that the camera move would be approved until late in the day. So I needed a general solution.

Using a test chunk of the city I wrote a mel script that examined the polygons that made up the roads and placed street lights around their perimeter, the spacing and brightness of which was based on the road’s proximity to the nearest lighting locator, that way I could concentrate the lighting in specific areas simply by duplicating and moving a few locators. I did roughly the same with traffic, duplicating simple car geometry, assigning a random material for the paintwork, queueing the traffic more heavily near traffic locators. I stuck some polygon trees from paint effects on the pavements and in the parks too for good measure. And I didn’t skimp.

Each street light was a pointlight inside a glowing low res sphere. Each car had two red pointlights for the rear lights, two pointlights for the glow of the headlights and two spotlights for the cones of light cast by the head lights. All of the lights had quadratic falloff and all of them cast shadows.
As the amount of geometry increased translation times quickly became a problem so for every 100 roads that were processed I exported the generated geometry and replaced it with a standIn. This worked well so long as the “Defer StandIn Load” switch was off and translation times always stayed below 2 minutes after that.

The modeller supplied me with the model of London split into 5 chunks due to its overall size. I processed the materials with another mel script to linearise the textures, swap the material to Arnold’s default shader, aiStandard and pipe bright textures (lights in windows) into the emission attribute. After as many tests as the deadline would allow I ran the generation scripts on each chunk of the city, this took two days to complete on the largest chunk. Here are the tallies:

  • Point light tally: 119,010
  • Spot light tally: 51,178
  • Point light tally: 242,782
  • Spot light tally: 107,348
  • Point light tally: 195,481
  • Spot light tally: 85,312
  • Point light tally: 83,893
  • Spot light tally: 37,926
  • Point light tally: 148,036
  • Spot light tally: 65,486

Total Lights: 1,136,452

Point light tally Spot light tally
Bottom 119,010 51,178
Right 242,782 107,348
Central 195,481 85,312
Left 83,893 37,926
South 148,036 65,486

Total Lights: 1,136,452

In addition London landmarks were lit by hand and a skydome and directional light provided the ambient and moon light.
Around 10 days before delivery the camera was signed off and I began to render the individual chunks. The scenes were heavily optimised. Ray depths were set to 1, as were the diffuse, glossy and refraction samples. Almost all of the aiStandard materials behaved like lambert materials which minimised visual noise. Lights had 1 sample, a radius of 0 and 0 bounces, except when lighting landmarks or when their effect was to be reflected in the Thames. The magic setting proved to be the Low Light Threshold found in Render Settings > Arnold Renderer > Lights. I gradually raised this, reducing the subtlety of the lighting but also dramatically reducing the render times too. For most chunks a value of 0.2 was sufficient but for the slowest chunk, which was flown over for much of the shot, the value was set to 0.4. Beyond this, strangely, render times increased again. Motion blur was switched on for the camera alone and an AA Samples of 8 was chosen as a good compromise between noise and speed.

All of my initial tests suggested a peak render time around 9 hours with most frames averaging around an hour. This compared well with the other options of generating multiple layers of additive lighting or tile rendering once all of the loading/translation overheads were taken into account, A weekend render should see the bulk of the frames completed. Unfortunately the render times peaked at 17 hours, this, together with farm issues and a deadline clash with another project, caused the renders to drag on through the following week. That’s when a software engineer from Solid Angle popped by to see if there was anything he could do to help.

After analysing the scene, Solid Angle found a possible optimisation in the lighting code and rebuilt the software overnight. When I rerendered the scene the render time came down from 17 hours to 1.5! We delivered the shot on time and I even had enough time to re-render some of the weaker patches of the city. Better still, the client was delighted with the finished shot. Here’s the good news: if you’ve got Arnold or later then you’ll already be using some of these optimisations.

In conclusion, Arnold, once again, proved to be a robust and reliable renderer. The use of huge numbers of lights in a single scene, though traditionally avoided, can now be considered as a viable option. I created a single flaming torch using a rig of point lights years ago. Now, with a little scripting, torch and brazier or even explosion lighting effects could be generated from effects scenes or from tracked and processed backplates, spaceships can become far more flashy and a night time city flyover can be done in weeks by a handful of people.