6
\$\begingroup\$

I'd like to know how many shadow casting lights are supported in modern games, such as Uncharted 2, Crysis 2, Modern Warfare 2, Halo: Reach, etc. Do they all limit themselves to just a couple of shadow casting lights, or do the numbers vary wildly?

\$\endgroup\$

1 Answer 1

6
\$\begingroup\$

I haven't played MW2 and Halo, but Crysis 2 and Uncharted 2 don't have lots of dynamic shadow-casting lights at the same time. I can remember mostly 2 shadow casters at the same time; naturally they wanted to keep shadow resolve quick. Generally shadows are expensive to compute, so most games will have 2-4 shadow-casting lights with several non-shadow-casting lights nearby, then shadow resolve will switch between them depending on light’s screen presence. Two shadow casters are enough for a nice visual, especially when you're targeting consoles with limited resources and have to do other lighting parts quick and beautiful, which means lots of pre-computed stuff.

I'm sure there are papers on Crysis 2 and Uncharted 2 lighting somewhere, but here is a pretty generic guess mentioning most modern techniques: detailed character shading via lighting baked into AO and diffuse maps, cascade shadows for global light source and several dynamic lights per pass via some spatial screen partitioning and a normal buffer, with the rest of the lighting baked into vertexes through some form of PRT.

That's not a very useful info for your game, you know. Number of shadow-casting lights depends on the approach to lighting, which in turn depends on lots of things like a renderer's architecture, expected scene complexity, chosen shadow maps for a global light, desired post-effects and overall "heaviness" of the shaders.

Also keep in mind that dynamic lights, shadow-casting or not, aren't the biggest part of overall lighting scheme, there are other important points to consider like character lighting/shading, opaque/alpha blend geometry and various post-processing effects.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ I've found that any more than two active light sources casting shadows just makes for a big visual mess and even two lights gets confusing if they both have the same hue/value slapped onto the ground (you just don't see that kind of equal intensity lighting very often in real life). \$\endgroup\$ Aug 30, 2011 at 20:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .