Shading the Apprentice
We’d been deliberating for awhile on what style of lighting and shading we wanted for Up & Dn. We’d tested everything from cel-based toon through to detailed phong shading, and nothing really felt quite right. Having given up on tuning the lighting in favour of completing the world editor and collision systems, I suddenly realized exactly what we needed stylistically while watching a presentation on the lighting systems in Valve’s Team Fortress 2.
We had previously been using a toon shader based on lambertian lighting as an index into a 16 element 1D cel texture broken up into distinct tones. It looked okay, but didn’t really have the feel that we wanted. What Valve did was take the same approach of using the lambertian diffuse term as a lookup but into a graded “warp” texture that faded to warm colours before falling off to black. The warm colours were used to get that unique feel of 1970s American illustration that really defines the game’s visul presence.
So taking a page from Valve’s book we went and modified our own warp texture using a falloff gradient that gave us just the right feel. It combined with an improvised ambient occlusion term has given our visuals just the right feel.
I’ll post some shots tomorrow along with the shadow demo that I promised. For now, here’s a link to the TF2 paper: Illustrative Rendering in Team Fortress 2
