MotoGP: wet weather effects
Of all the work I did on MotoGP, I think I am most proud of the wet weather effects. Official Xbox Magazine were kind enough to call it "The World's Best Rain Effect (TM)".
What can I say. I grew up in England, and now live in Seattle. I know rain :-)
I think there are two main reasons why this rain looked good:
- We implemented many simple effects, rather than a single complicated one. Several interlocking effects, even things that might seem silly in isolation, can combine to produce a more subtle and visually complex result. The more different things you have going on, the less likely anyone will realize how they work or stop to notice the flaws.
- We used reference photographs and video of real rainy races. It can be surprisingly hard to let go of preconceived notions about what things ought to look like, and open your eyes to notice what they actually do look like. And the results can be surprising...
Rain consists of drops of water falling from the sky, right? So we should probably start by using a particle system to draw these raindrops. But when we looked at photos, falling rain was rarely even visible!
Come to think of it, I often glance out the window here at work and can't tell whether it is raining. "It's certainly overcast and misty", I find myself wondering, "but is this rain or just lots of vapor in the atmosphere?" I can only directly see the falling rain if a headlamp or streetlight is shining on it, so the best way to tell is often to look for a puddle and see if there are any splashes.
Using our reference materials, we concluded that rain affects the appearance of MotoGP races in several ways:
- Colors are muted and desaturated
- Distant objects are fogged out
- Shadows are faint and soft edged, if visible at all
- Bikes throw huge amounts of spray into the air
- Bikes create visible wakes where water that was flowing over the road surface is displaced sideways
- The road surface is darker than normal, and shiny enough to reflect other objects
- There may be water droplets on the camera lens (especially with bike mounted cameras)
- There may be lightning flashes
Note how falling rain is not part of this list, so we never actually bothered to implement that.
As for the things we did implement, there were (as always) some constraints:
- It had to fit in memory and run at a good framerate. To free up resources for the wet effects, we disabled some other effects (bike and rider shadows, the sun, and specular lighting on the road surface) during wet races.
- It had to fit into the artist schedule. We wanted to provide both sunny and rainy versions of every track, but the artists were already busy creating the sunny graphics. They had some time to tweak the rainy versions, but not enough to build everything again from scratch or create more than a handful of specialized textures. So our rainification process had to be mostly automatic.
Stay tuned for more...