TF2 Map Design: Bringing the Hammer Down
So it’s all well and good that I have my sketch, but now I needed to get started actually MAKING the dang map. This is where HAMMER comes in. Part of the Source SDK, Hammer lets you create and modify level textures and models, as well as place scripted events. Hammer is a pretty robust tool and is the same tool Valve developers use to create official maps. At first, I was pretty skeptical… I’ve used an earlier version of Hammer (back in TFC days) and it was rough. Then, once again, when HL2 first came out. It was better, but it still seemed impossible to achieve the level of complexity that one could see in the official maps. The initial 5 minutes with the tool was changing my mind, and then I cam across the wonderful Valve Developer Community.
After 30 minutes of reading, the Behemoth of materials and buttons became like a soft fuzzy kitten… still pointy and full of claws, but at least approachable. I especially like the open admission that it’s NOT very easy to use. Then again, none of the 3D modeling programs I’ve used have been either. It comes with a CP sample map which is a great starting point for seeing how all the script pieces of the game come together. I ran through the sample level a few times, read some more and decided to starting building up all the things I would need for my CTF map.
Collecting the Tools
First step to any new toy is playing with it to see what can be done. I very loosely went though the tutorials taking as much time as I wanted to just build some solid objects. Trying to follow the example of the sample map, I started collecting all the tools I would need to build a CTF map. 2 Flags, 2 Capture Points, 2 Spawn Areas and a resupply area. Of all these, the resupply area was the hardest and most complex to put together.
Once all the necessary coded stuff was in place it was time to start modeling. Afterall, a giant block staring off into glitchy (framebuffer) space does not a level make. I used the Hallow command to turn my giant block into an actual room, then filled the basic room with a bunch of different arches and shapes and props to get a feel for the size of things. Always remember to test test test while doing this. It was fun running and jumping around as the different classes and seeing how they handled in the ugly sample world I created. As a side note, never use the Carve command on empty space. It crashed my box so hard it literally turned itself off. Darn binary subtract…. when used properly it is actually really cool.
One of the best things in Hammer HAS to be the displacement maps. This tool is in the texture section, but what it does is let you “paint” terrain heights. There are even a few levels of vertex density so anything from pointy mountains to a smooth slope can be created quickly and easily. I think I’ll be using a lot of this. I’ll have to test how much can be used without causing a significant performance hit. So far no problems.
Texturing & Lighting
Texturing the world is pretty easy, all the Materials (as they call them) can have code attached to them (”Proxies”) so all that needs to be done is apply them in a way that’s visually appealing. The Material Browser can even be searched so finding all the TF Materials is fast… especially with the thumbnail view. It also remembers the last few textures that were used. Lighting seems like is going to be the difficult. I’ve always loved the way Source games handle lighting, but I can’t seem to get any love from HAMMER with my lights. There’s no way (so far) to preview how lights will look in the 3D preview window. This is pretty rough because it is necessary to specify how far the light will travel from the light source. While I’m sure guesstimates are fine, I would like to be able to see if an area’s going to be too dark without re-compiling the level. Oh big pointer —–> There is a special way to make the SkyBox. There are Materials that look like they should be used together to do this but it is a trick!!!! Take these links if you want to live:2D Skyboxes & Skybox List.
Props
There are tons and tons of props in the game. Pretty much anything that’s not blatantly level geometry you can find, and then use in any custom level. The only downside to props is they can only be rotated, not scaled. My dreams of a giant rocket silo filled with dump trucks shall go unfulfilled. They also cannot be carved. They do have collision though, and that makes me happy. I’ve already found a ton of the rocks I’m going to be using for cover and, more importantly, the scaffolding for the bridge in 2Fort. It’s even in lots of pieces so I can lose the guardrails.
So now I’ve got all sorts of tools at my disposal, its time to start building the level.
Next Time: Staredown! It’s stupid big!
March 25th, 2008 at 4:35 am
Turtle Dove…
Nice article….