Next up were the other environment touches, such as nice reflective floors, water reflections, decent specular mapping and real-time shadows. I was the sole artist on the project, and as such I wanted to make each and every environment look as realistic as possible. My other aim was to have lots of variety within the environments, so they all looked very different to each other while still maintaining a level of believability – so you could expect to find such places in the real world.
I used normal mapping combined with real-time reflections to try and make the various surfaces look realistic and interesting. One incredibly useful tool I used for the job was ShaderMap, initially version 1, and later version 2. I tried Crazy Bump too, but preferred the extra control and lower price of ShaderMap. I used quite a few textures from CGTextures, and as none of them come with normal maps I had to create a lot of these from the textures, which is where ShaderMap came in. The key was to increase the detail on the generated normal maps; smoothed normal maps look horrible – like plastic wrap on everything. I also made sure the maps weren’t too intense, otherwise you get some nasty sharp edges in there where the light changes are too extreme.
The other real-time effects we experimented with were real-time SSAO (Screen Space Ambient Occlusion) – which is a rendering technique for adding subtle shadowing to all the nooks and crannies in the meshes, and Bloom. Bloom is the effect of light bleeding out from very bright areas, giving a subtle glow to the scene if used right, or a sticky coating of grease if overdone. Unfortunately we couldn’t get these two effects running fast enough, and decided that as they were only minor details, to drop both in favour of a solid framerate.
The final element for each environment was light baking; to render each environment with realistic lighting and shadows with minimal performance overhead. Our implementation works by a sort of reverse ray trace. It takes each pixel, works out what lights are visible from it; taking into account type of light, distance and light colour etc. and works out a lighting value for the pixel. Many of the scenes included dozens of lights added to provide a nice range of lighting and shadow variation.