Area Shadows, Where Are You?

One feature that is pretty top on my wish list for real-time graphics is genuine area shadows. The shadows in question are results of so-called area lights which are light sources with spatial dimensions, like a sphere, a plane or a box for instance. The thing is, light sources with dimensions are so complicated to simulate in real-time that they are basically replaced with point light sources or their variant, directional light sources which behave, unfortunately, more often than not very unrealistically. Point light source’s main problem is that it always casts evenly sharp shadows no matter what the circumstances are, even though in real life, shadow’s softness increases as the distance increases between the object and the surface on which the object’s shadow is cast. Admittedly, the look of the shadow depends highly on the shape of the light source also, but still, the underlying logic remains as described.

This lack of area shadows creates all kinds of problems, which become increasingly evident the more there is distance between the shadow casting objects and the shadow receiving surfaces. That is to say, in small distances, point light sources work fine.

If you look at the left screen shot from Assassin’s Creed, the Altair’s shadow is perfectly acceptable, whereas the shadow cast by the distant wall in the background is obviously not.

Interestingly, in Crysis, there is this one particular level located in a valley in which the real-time area shadows are at least triedto simulate. It’s pretty given that laser sharp shadows cast by the hillsides would have looked rather silly, so evidently Crytek had to do something about it. The problem was, though, that they had made such a big deal out of their dynamic time-of-day lighting in Crysis that basically any static solution was ruled out from the get go. So, what they did was they used extremely (and I mean extremely) low-resolution shadow maps to mimic the softness the shadows would have had in that setting. Okay, so far so good. However, because the lighting conditions change as the sun travels in the sky, the shadows must update themselves constantly. Now we encounter the same exact problem the Assassin’s Creed II had with its shadows. That means, those particular shadows in Crysis stutter like there’s no tomorrow.

The solution Crytek came up with lighting that particular level of Crysis could almost be considered as a desperate move. They had painted themselves into the corner by dogmatic design decisions made early on (like dynamic time-of-day), and thus grabbed to whatever solution was left there. In still images the solution looks rather good, but in motion, not so much.

We are yet to see true real-time area shadows in video games, and I wonder how long it’s going to eventually take us to get there. Given the mathematical complexity of the area shadows, I’m afraid it’s going to  take a while.

UPDATE: There is some kind of emulation of area shadows included in Direct X 11 SDK dubbed as “contact hardening shadows” which is used only by STALKER: Call of Pripyat at the moment. I wonder how it performs in extreme conditions, though.