TF2 isn't Normal

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
I was studying TF2’s walls the other day  and discovered something weird. And by that,   I don’t mean how you can shoot through, taunt  kill, or even stick to them– you can check   out my other videos to learn about that–  here, I’m just talking about how they look. Take this brick wall found in  Granary and Well. At a first glance,   it looks like a simple texture on  a flat wall because, well, it is,   but there’s something more to it that isn’t  easily distinguishable and which we don’t see   at all in Source 2. It has something called  an “ssbump” map, but before I even say what   “ssbump” stands for, let’s see how this brick  texture was put together in the first place. On the technical side of things, there’s  a file called “brickwall001.vmt,” which   is basically a text file that contains all of  the instructions for the material. At the top,   it says “LightmappedGeneric,” which tells the  game to calculate the material’s lighting per   pixel. Models, on the other hand,  like this barrel here in Gorge,   have “VertexLitGeneric,” which calculates  the lighting for each vertex instead, and,   the pixels in between are interpolated. This  isn’t as accurate as per-pixel lighting,   which is why models like this barrel  look weird in high-contrast areas;   you can literally see the interpolation happening  across the triangles that make up the mesh. Anyway, going back to the brick wall, the next  thing we see is a parameter called “$basetexture”   alongside a directory and file name. The directory  is relative to the TF2 materials folder within the   “tf2_textures_dir” pak file, which I can access  using a program called GCFScape. So doing that,   I’m able to locate and open up that file,  which looks like this, and as you can see,   it’s a texture file. In fact, the file name  extension “.vtf” literally stands for “Valve   Texture Format.” It might seem silly considering  we typically use things like PNGs and JPGs,   and I think Valve realized this  because you can now use them in   Source 2. But since TF2 still runs  on Source 1, we’re stuck with VTFs. Moving onto the next line, we have another  parameter called “$bumpmap,” and a couple   of lines farther, “$ssbump,” which is  where things start to get interesting.   If I open the corresponding texture file,  it looks like this. What the heck is it? If you’re already familiar with how  materials work, you might think that   this is a bump or normal map. If you’re not,  don’t worry, because this is neither. Instead,   it’s an “ssbump” map. What does it  stand for, and what does it do? Well,   I’ll get to that in a moment. First, I’d  like everybody to understand what bump   and normal maps are, since that should  help in understanding what an ssbump is. All three maps control how light is reflected  off of the surface they’re applied to. Bump   maps do this by using light and dark values. The  lighter values cause the area they coincide with   to reflect more light back to you whereas the  darker values do the opposite. This is done by   skewing the normals– which are lines perpendicular  to the surface– towards and away from you. You   can think of this like a person using one of  those tanning reflectors at the beach. When   they point the reflector towards themselves to  get “more sun,” they’re also angling the normals   towards themselves like a lighter value in a  bump map. In 3D applications, this simulates   curvature across parts of the texture where the  bump map transitions from one shade to another. Normal maps serve the same function, but take  things one step further by controlling the   skew of the normals in all directions– not  just towards or away from you. This is done   using RGB color values which, if you don’t  know, are red, green, and blue. By mixing   these three colors together, the surface  normals can be skewed in any direction,   allowing for more control over how  light reflects off of the surface. Both maps are well-known  to 3D and material artists,   and are used in practically every  modern game, but not TF2. Well,   it is, and every community mapper I’ve seen has  used them, but many of the game’s stock assets,   like this brick wall I keep coming back to, use  something else called “ssbump” maps– where the   “ss” stands for “self-shadowing–” and believe  it or not, it was actually created by Valve. In fact, Valve employee Chris Green wrote  an entire paper about it back in 2007,   where he dives deep into the inner workings of  ssbump. I’ll only be covering a small bit of it,   so feel free to read the rest of the paper on  your own if you find this interesting. And,   you can also follow Chris on Twitter where  he posts stuff like this on a regular basis. So what does this paper say about ssbump?  Well, to start, Chris states that bump maps   lack “self-shadowing of surface details and  ambient occlusion,” and that by doing this–   you can pause and read this if you want– a kind  of ambient occlusion can be added to the texture,   which is when certain parts receive stronger  shadows in areas we’d expect them to be,   like the crevices between these balls. A little further in, he adds the following: SSBump works with dynamic lights. It provides softer shadows and ambient occlusion. The shadowing information is generated  from height data– or bump maps. There is no increase in storage  space when compared with normal   maps– I know it says bump, but trust me on this. And it preserves the use of the normal map  alpha channel for other visual effects. Okay, this all sounds nice, but what does it  actually look like compared to a regular bump   or normal map? Well, there are two sets of  images in the paper, this one up at the top,   and this other one toward the bottom. In the  bottom one, we see that Chris refers to what   I’ve described as a normal map as a bump map, and  a bump map as a height map. This is why I swapped   the terminology when going through the bullet  points. This paper was written back in 2007,   and terminology conventions have  since changed, hence the confusion. But, I didn’t want to just take  Chris’s word for everything,   so I created this test map where we  can compare things for ourselves. First, let’s see how this brick wall texture  looks under all of the different texture maps. Here, we have the base texture with nothing  else, so it looks flat. Notice how painterly   it looks. That’s because Valve painted each brick  separately in Photoshop over a real-life photo. Next is the base texture combined with a  black-and-white bump map. You can start   to see some of the curvature forming, which  becomes much more apparent when I disable   colors. It looks a little weird, which I think  is because I had to enable the $ssbump parameter   to get it to work in the first place, so I  don’t think it’s an accurate representation   of how a bump map should really look, but I  couldn’t figure out a way to get around it. Now we have the base texture with the ssbump map,  which forms the version we see throughout TF2.   Now we can see the curvature really take form,  especially around the crevices of the bricks. Finally, we have the normal map, which looks  similar to the ssbump map, but with a lot more   curvature. You might even say that it looks  more realistic, but more on that in a second. So which one looks the best? You might  think that the normal map is the best   for realism and that the ssbump is better  for a game like TF2 where the art style   is relatively flat and painterly. And while  I wouldn’t say that that’s a bad takeaway,   I do think it undermines a special feature  within the ssbump that isn’t in the normal.   It might be hard to notice at first, especially  with colors turned on, so if I turn them off and   point a flashlight at both of these walls,  we can see how the ssbump really shines;   the crevices between the bricks are dark unlike  in the normal, which is the occlusion Chris was   talking about. So in a way, the ssbump is more  realistic than the normal. But if that’s the case,   why does it appear to produce less curvature than  the normal, and why was it abandoned in Source 2? Well, to answer the first question, my guess is  that the occlusion effect “softens” areas where   sharp bits are poking out, resulting in better  anti-aliasing throughout the texture. So then,   maybe this normal map setup isn’t more  realistic and is just missing lighting   occlusion information present within ssbump  that ultimately makes it appear crispier. Regardless, I think I speak for everyone  when I say that ssbump works better for   TF2 because you’d never want to have  such dramatic changes in a texture’s   curvature when the entire game is meant  to look smooth and cartoony, and despite   ssbump being potentially more realistic,  it just so happens to bolster this effect. So, if ssbump is more realistic, why  was it removed in Source 2? Well,   as you may have heard, Source 2 uses something  called “Physically Based Rendering” that Source   1 does not. It’s the standard across  all modern game engines nowadays,   and comes with new texture maps that aren’t  present in Source 1, which includes something   called an “ambient occlusion map.” This nullifies  the need for ssbump since you can just make your   own texture map to add occlusion instead of  trying to lump it together with the normal map. Before I wrap up, you might be wondering about  those other things I brought in the bullet points,   like the “dynamic lights,” “storage size,” and  “other visual effects.” Well, I can confirm that   ssbump does indeed work with dynamic lights,  even though we never see them used in TF2. And I can confirm that the file size isn’t any  higher than a normal map because the size of the   ssbump and normal map PNG files– which I can  get by extracting them from their VTFs– are   practically the same. In fact, in this  case, the ssbump is actually smaller. And finally, by “visual effects,” I can point to  this bullet point at the end of the paper where   Chris writes, “Texture blending for operations  such as detail texturing, texture cross fading,   etc. are much more straightforward.” To give an  example, I can point to these two rock ground   textures I brought up in my video “Everything  Wrong with Dustbowl,” where I described how   there’s a seam between them even though they use  the same base texture and have matching texture   scale, shift, and UV coordinates. The texture  on the left called “rockground002” doesn’t use   a bump map, but the one on the right called  “blendrockground004” does, and it uses them in   conjunction with this “$blendmodulatetexture”  parameter, which I think is what Chris was   referring to when he said “texture blending”  like “cross fading.” I might be wrong, though,   so feel free to correct me about anything  I may have misinterpreted in the comments. So that’s why TF2 isn’t normal, both figuratively  and literally. It uses an interesting development   by Valve that wasn’t very well known about  to begin with, and which is now obsolete. Thank you for watching,  this is LED, switching off.
Info
Channel: LED
Views: 131,021
Rating: undefined out of 5
Keywords: tf2, team fortress 2, tf2 brick, tf2 normal, tf2 not normal, tf2 analysis, tf2 maps, tf2 mapping, source engine, source 2, ssbump, tf2 ssbump, tf2 normal map, tf2 hammer editor, tf2 led
Id: pT2aM2mbSvM
Channel Id: undefined
Length: 10min 31sec (631 seconds)
Published: Tue Mar 19 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.