Wednesday, April 23, 2008

DomeLight vs. SkyLight

"[Dome light] does have a slightly different look to the skylight and I was wondering what the difference was, as on the surface they seem to be doing the same thing."
The main difference is usually the use of the Render Cache. The DomeLight does not work with the Render Cache yet, which Sky Light does. As the Render Cache tends to blend the samples together over a greater area, that's usually the main difference.

( Note: rendertimes are for a Pentium Mobile 1.6M - divide by 8 for modern systems )

Assuming you're not using the Render Cache, however, then the next biggest difference is in the DomeLight sampling the 'sky' much more efficiently, especially with high-contrast sky maps, such as HDR maps. If you have a map with mostly blue sky and one very bright sun, then Sky Light is going to have a very hard time resolving that into a clean lighting solution for the scene. The Dome Light, however, recognizes that there's a bright sun in the map and will focus its attention on that. So while Sky Light might give you mostly blue (sky) lighting with noisy yellow spots here and there from where it randomly did hit that sun, the Dome Light will give a nice even lighting and crisp shadows.

If you let both run for long enough, though (mostly Sky Light - DomeLight calculates in no time as it is), they should give the same result.



That said... just as Sky Light is imperfect because it only samples the sky randomly and is prone to missing bits with some regularity, DomeLight is imperfect because in its determination of which bits of the sky are the most important it, by definition, makes other bits less important. Although that does wonders for speed and overall accuracy, you might see some minor variation from a pure Sky Light calculation. Typically, however, it's well worth the speed gains.


by Richard Annema