Aug 11, 2008

Lighting's a Bitch

While decent modelers and animators are aplenty in the field of CGI, competent lighting artists are hard to come by.

Lighting scenes is a sophisticated and tedious business. New renderers and advanced global illumination / ray-tracing algorithms doesn't make the work easier; they only give you more buttons to push, albeit with potentially better results.

Basically, a lighter's workflow goes something like this:

  1. insert light, guess the position and intensity.
  2. Render a test, wait 2 minutes, get coffee in the meantime.
  3. study rendered image. tweak intensity by 1%-2%.
  4. Render a test again, wait 2 minutes, pick up a magazine from the rack in the mean time.
  5. study rendered image. rotate light by 4.6 degree.
  6. Render a test again, wait 2 minutes, spill coffee on the magazine in the mean time.
  7. study rendered image...
....(repeat 20 times)

Repeat the same process for every other lights in the scene, with the rendertime increasing everytime you add a new light. It is even worse when you need to match the lighting against a live action plate.

Fortunately, once in a while some neat tricks and plugins come along to mitigate the mindnumbing-ness of the process. Image-based lighting (IBL) is one such thing. Using radiosity, the renderer uses an image (High-dynamic range, HDR or regular Low-dynamic range, LDR) as a light source.

For instance, the blue sky in the image will cast a bluish light while the dirt ground will cast a brown-yellowish light. It is the quickest way to get rich and accurate light colors, and definitely the easiest to match the lighting to the background plate simply because the background plate *is* the light source.

Radiosity, however, is inherently slow to render (though with more computing power this problem is gradually becoming a non-issue for simpler scenes), compounded by the fact the HDR images occupies quite some memory space. So the blokes at HDRlabs came up with an ingenious way to use IBL without the rendertime hit of using radiosity.

Enter LightBitch, a nifty plugin that plugs directly into Newtek's Lighwave3D (LW). It basically extracts key lighting information from a HDR or LDR images and builds a lighting rig into the scene using LW's native light types, eliminating the need for radiosity.

The setup is relatively customisable, allowing you to control the amount of lights, radius and light types.

Radiosity IBL: rendertime 74 seconds

LightBitch: rendertime 49.3 seconds.

Note: Both lighting methods uses the same background image as the base. There's a marked difference in the lighting directions, so I could be doing something wrong. (background HDR image from

The rendertime difference might not be that significant in my test scene, but I suppose the benefits would become more obvious as scene complexity increases.

What I love most about it is that unlike radiosity based IBL, I can tweak each light individually if I want to, apart from using the master intensity controller in the rig. If I'm feeling creative, I can even paint a custom background in Photoshop and get LightBitch to quickly generate the rig based on the painting. I can already think of a few current and upcoming projects that can benefit from this tool.

It is, however, unwise to mention this plug-in in front of the clients; They will think you're just being rude.

Unfortunately, the plugin is for Lightwave3D only, so users of other apps will have to look elsewhere for a solution, or find a way to import the rigs.

No comments: