Clock Tue, 21 May 2013 08:55:22 +0100

Pixels of Truth: Part 4
@ Spotlights channel

Jeff Kim gives us a look at TF2's design and what exactly it is that makes it so unique.

This article is the sole opinion of the author and does not represent the opinion of Heaven Media Ltd or the opinion of any affiliates.

Spotlight picture is Gabe Newell, Co-Founder and Managing Director of Valve Software. It's been a year since we touched on Pixels of Truth, and we're jumping back into the series with a quick look into shading, visual aspects and rendering techniques used in gaming, more specifically Team Fortress 2. Through the use of various techniques Valve has honed in its lifetime, the end product is an extremely polished game set to be played by millions. Although Valve is known for it's photorealistic rendering and character models, today we're going to hop into TF2, a game that balances a very cartoon-like style, even though the movement and atmosphere is very realistic; quite a rare mixture, which makes this game unique. For the sake of time, let's skip Valve's history and assume you know in 2007 TF2 was born from the popular Half-Life mod, Team Fortress Classic.

Remember just a few words ago I mentioned that cartoon-influenced style that comes off as realistic? There's a term to describe that called non-photorealistic rendering (NPR), heavily taken from 1960's industrial designs, propaganda posters' style and comic books. Here's what sets TF2's style apart from the rest: shading and lighting. There are many games that use NPR, but due to TF2's carefully designed lighting and shading techniques to portray a silhouette well enough so the user can immediately identify it without having to see details, a modern photorealistic look is achieved. As they explain in detail, much of the game's influence spawns from late 19th century/early 20th century illustrators (note: J. C. Leyendecker, Dean Corwell, Norman Rockwell). Due to the "rim lighting," more widely known as rim highlighting in game designer lingo, silhouettes in-game appear to be 3D, not a 2D figure with a dark outline, as we can see in the picture below (hint: notice the shine near the Pyro's edges).

Now that we have the very basic idea of TF2's design down, let's talk more about the unique feel the game has. You've probably seen posters or adverts on the game where they use silhouettes only, possibly with some flashy over-edited text advertising a future update where said silhouette has the new item equipped or whatever -- even though you have no idea what the item is, if you use a few brain cells, it's not impossible to tell which class is pictured. See how magical that NPR technique is? It makes us think without thinking. That can't be it, right? Right, there's more to it, more meat to what makes the character models stand out. For this part, we're going to go backwards to anatomy class and remember what body proportions are. No, not the nasty stuff, we're talking just the basics: legs, arms, torso, head, ratios of these parts that intertwine with one another to make a realistic-looking model, regardless of the texture/rendering technique applied.


You ever notice how the Heavy has a massive upper body but his head is small? Exactly what we're trying to get to -- his head and legs are perfectly proportioned to each other, while his muscular body is much larger. The Spy? Notice how he's a very slender character, containing longer legs and a more slim torso; this coincides with the roles these characters play, something Valve has mastered that players rarely pick up on. The Scout? An athlete; shorter legs, but a muscular build much like a baseball player (notice he wields a bat in-game). Picking up on this stuff? Good, because we're going to hop into the level design next and what makes these worlds unique from other maps.


[multipagempu]

We've got the basics down, now let's nail what makes the maps what they are.

This article is the sole opinion of the author and does not represent the opinion of Heaven Media Ltd or the opinion of any affiliates.

The maps. Excluding Pyroland, the Pyro's update that dropped a little bit ago, the entire map color scheme for the game, both sides both RED and BLU, include 22 colors. Yes, that means every single color on every single map you see is made from 11 colors on each team's side that have been mixed and matched to appear as though the textures are more detailed than they really are. The game is all about geometry and a subconscious appeal to gamers using a unique setting. Both teams, Reliable Excavation Demolition (RED) and Builders League United (BLUE), are subsidiary companies of TF Industries, a fictional industrial company that pitches these two teams against one another. We're getting off track here, let's go back to level design before we go off on another tangent, shall we?


The color swatch TF2 uses.

Take 2Fort for example, the most popular map in the game. If you notice, the more traveled areas such as the upper levels and paths players take most often are filled with loud colors, that is, more vibrant colors. Opposed to that, the less traveled paths are filled with muted colors, more grayscale and lifeless colors (in TF2, the grays and browns mixed with metal textures). Sound familiar? It should if you're into anime -- this is the same impressionistic feel an elderly Japanese film director and illustrator uses in his own movies. You may know him as Hayao Miyazaki.

Notice the roofs in-game, a very unique painted style almost as if someone painted it by hand. Actually, they were hand-painted. Using the same colors from the swatch I mentioned earlier, the artists embraced that same feel and decided to add it into textures throughout the game, not only roofs: walls, ground textures, outlying building surfaces, the list goes on and on. What does this do overall opposed to using a computer-drawn design? It adds depth to the style overall and allows that NPR technique to be crossed over into abstract texture designs, something that would be very difficult if one was to do it through software opposed to elbow grease.


Left is hand-painted, right is the albedo applied to 3D models.


Finally, let's just touch once again on character modeling and look at the math behind what makes it possible. Non-photorealistic rendering was the subject of the lighting aspect, and you guessed it, non-photorealistic shading is the shading aspect of the modeling for TF2 characters. On the next page, you can see the result of a mathematical formula applied to rendering and shading to create a final character model, the formula being derived from Labertian terms, resulting in an algorithm that can be used to calculate view-independent lighting numbers which are then applied to more in-depth stuff we're not interested in because it has big words and lots of numbers.

[multipagempu]

Rounding up this piece, let's take a quick look into the math behind it all and what the end result looks like.

This article is the sole opinion of the author and does not represent the opinion of Heaven Media Ltd or the opinion of any affiliates.




For those math-loving gamers out there, that "stuff" would be a Half Lambert feature, meaning the scale of bias between light shades (Half-Life had a 0.5 bias while TF2 has slightly more, due to more extreme changes in saturation, environment and color). From there, we move to warp diffusion (how the literal gradient of light from black to white transitions) which in turn moves on to highlights (called Phong highlights), going forward into ambient lighting, rim highlighting, finally touching up the final model using the formula (seen below), regarding the reflection of light from outlying objects in the virtual world which would be known to many gamers (especially CS editors) as a 3D Skybox, essentially a cube or sphere in which the map lies.


So after all of that, we can all say we know just a tidbit more about how Team Fortress 2 came to being through the use of wild techniques that Valve has applied to make one of the most unique and fun games around. Spawning all from a mod, the game has become one of the most successful online games and an immense title under Valve Software. This information was published in 2007 before any new techniques were applied, which makes one wonder what possibilities are ahead of us and what styles the games about to come out, such as Global offensive, use to achieve their unique feel. Until next time, Pixels of Truth fades into the abyss.

The End Result (show)




RELATED: Source, Part 1, Part 2, Part 3

Bookmark and Share
// Jeff_Kim
Posted 9 months ago: Sat, 11 Aug 2012 18:22:25 +0100

Comments

Please login to post comments.

Report abusive content

Please login to notify staff.