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