MotoGP: lightning flashes

Originally posted to Shawn Hargreaves Blog on MSDN, Friday, April 10, 2009

If you've been following my series of posts about wet weather effects in MotoGP, you may have noticed we had a habit of abusing the fog settings to create other effects.

Ok, this is the last time, I promise :-)

The artists designated a couple of the wet tracks to be in a thunder storm. At random intervals, we triggered a burst of lighting flashes in rapid succession, then played a thunderclap sound a second or two later.

How to draw a lighting flash?

The result was similar to just globally fading the entire screen to white, but subtly different because even with a negative start distance, nearby objects were still fogged less than distant ones. This gave the flash a sense of direction: it was coming from the horizon, rather than applying equally everywhere. That's a totally different thing to properly lighting the environment based on surface normals, but we weren't set up to do realtime lighting on everything. The flash was over so quickly that even a horrendously approximate sense of distance and direction was enough to get the point across.

Blog index   -   Back to my homepage