Basics of the Hammer Editor Version 4.0
This Tut assumes you are using the Half life 2 configuration.
First things first I will run through the basic toolset and give a basic description of each, any that I’m still struggling with will have to wait for my second tut. Don’t think of this as a tut but more basic info on the major tools.
From top to bottom on the sidebar.
- Selection tool. This is used to select brushes entity’s and anything else that you add to your map, simply click it, then click the brush you want, you can also use it the same way you use drag select in windows. Also a note on the handles (ie the little squares at the corner of your brush)
-
Magnify. This is used to zoom in and out in the 3d and 2d views, LMB to zoom in and RMB to zoom out. - and + keys also work without the need to select this tool.
-
Camera . This is quite handy for quick movements around your map, select the tool click in any of the 2d views and drag, you will get a blue dot (camera), and a blue line(angle of view) if used in the 3d view it will simply move the camera around (using z in the 3d view at any time will give the same effect)
-
Entity tool. This is used to place entity’s in your map such as player start points and lights to name about 0.009% of whats possible. I will go into this tool in more detail later.
-
Block tool. This is the most important tool in the editor, and is used to create blocks and walls. Select the tool, go to a 2d view and drag a box to the size you wish, then do the same in the other 2d views until you have the dotted outline the size you want, then right click create object (or press enter) you will now have a block/wall. Again I will go into this tool in greater detail later.
-
Texture application tool. This nifty tool is for viewing/applying textures to the block you created with the last tool. this tool can be as easy or complicated as you wish, once the tool is selected a small screen will pop up with two tabs (material and Displacement) material is the textures, select a texture like metal and it will act like that in the engine automatically. Displacements are used to create terrain such as hills and cliffs. More detail later.
-
apply current texture. A handy short cut tool that applys the currently selected texture to the selected brush, be aware that while not using the texture tool it will apply the texture to every face of the brush, but while using the texture tool it will only select the face you click.
-
Decal tool. This tool is used to apply decals like graffiti to already applied textures, note that the decal will adopt the scale and orientation of the texture you stick it to.
-
Overlay tool. Very similar to the decal tool, except it gives you much more control over the size and orientation of the Decal once applied.
-
Clipping tool. This tool is used to clip or cut pieces from a brush you have already created. More detail on this tool later.
-
Vertex manipulation. This tool allows you to move corners of brushes you created around the grid. Probably the hardest tool to get used to and will most likely be the last tool you will learn to use. Beware that its quite easy to move a brush in a way that the engine cant handle, so after every move, go to map/ check for problems, if the brush is invalid it will tell you there, again I will not go into this tool in much more detail until a future Tut.
Other important tools
O.K I will now run through a few important tools that aren’t in the sidebar
Carve: this tool is used to carves shapes out of already created walls/blocks, to use it simply create a brush the size you wish to carve out, place it inside the brush you wish to carve and press Ctrl+Shift+C.
You can then delete the piece, this is quite handy for cutting doors and windows out of walls. The thing to remember with carve is that it breaks up the block into different pieces, so complex carvings can be very expensive in terms of performance, in later tuts I will demonstrate how Vertex manipulation can be used just as effectively but with less overhead.
Make hollow: this is used to hollow out blocks you created, select the block you wish to hollow and press CTRL+H a small box will appear asking you what width you want the walls (default is 32)
Note the only numbers u cant use are -1, 0, 1 if you make the walls say -13, the block will hollow to the size of the block and create walls outside the the original block.
TL: texture lock, this when clicked will keep textures the same if you move the brush around, otherwise the texture will move around and change to the world orientation.
Vis groups: As you progress through the creation of your map, you will soon be overwhelmed by the amount of information on the 2d grids, it is very easy to get confused, to aid this simply select the Walls/room/whatever then go to View/ hide selected objects you can then add it to either an already created Vis group or create a new one, hidden objects will not be compiled into your map, so make sure to unhide before the compile, or for a quicker compile you can simply compile the new changes, I find adding a info_player_start into the new room makes it handy for checking out in game.
Compiling
O.K I’ve use the word compile far to much without explaining what it is. I’m no programming genius (ie not a programmer at all)s layman’s terms will have to suffice,
Basically the compile programme is broken up into 3 different programs BSP VIS(not to be confused with vis groups) and RAD.
BSP: (binary Space partition) this basically creates a playable bsp from the .map,
Vis: vis calculates what parts of the map are visible from, at any time, breaking the map into different sections, or leafs, if not run in the compile, your map will still run, but the engine will render every section of the map at all times, on more complex maps or on older rigs, you will really notice the difference in performance, to check how your map is being rendered in game, open the console type in sv_cheats 1 then mat_wireframe 1. try this after compile without vis and with to see the difference.
Rad. (radiosity) this programme basically makes the lighting and texture brightness in your level, if not run your map will be set as mat_fullbright 1, which is quite ugly compared to a nicely lit map.
On the very basic level, compile is very easy to use, simply make up the map you want, then press f9 click o.k by default the map will be set for a full compile, but changes made by yourself will be kept the next time its run.
There are also a lot of third party compile programs available that can compile your map without the need for hammer to be running such as Batch compiler (http://nemesis.thewavelength.net)
Make your first room:
So you’ve sat down in front of Hammer and your head hurts a lot, it’s a daunting looking program at first, but give it 2 or 3 weeks and you’ll be flying .
-
File new. What you have in front of you is broken up into 4 screens (default) top left (x/y top down) bottom left (y/z front) top right (3d view) bottom right (x/z side) by default the Snap on grid is set to 64 units, which isn’t great for detailed work, but will be fine for your first room. [ and ] keys change the Snap on grid down and up respectively.
-
O.K, select the block tool<, then in the top down view, drag a box to the size that you wish your room to be, notice that in the 2 other 2d views the rectangle you made is only a white dotted line with handles. So in either of the other views, drag one of the handles to the height you wish your room to be. Once your happy with the size, right click inside the dotted
line and click create object. Shazam you now have a nice box. Now go to tools and make Hollow (or press ctrl+H). For this little exercise, we’re not going to worry about the wall thickness, so leave it at the default (32) and click ok. Brilliant! Now
in the 3d view move the camera inside your box, congrats you have your first room, a little on the boring side but a room non the less.
-
So you now have your little room but it looks poo, so you now want to add textures to it to spice things up a little, so go ahead and select the texture tool, then in the 3d view, click the floor(as good a place to start as any) move the texture tool off of the 3d view for a better view. Notice that the selection is only on the floor, signaled by the reddish mask. Now click the browse button under the Hidemask button. A large screen will appear on screen with lots of textures on it. Down the bottom of this screen you will see a few different things, lets focus on Filter for now. In that type in “Floor” notice all the textures changed to ones suited for use on a floor, so choose the floor you want in your room by double clicking it. The texture browser should disappear and leave you back at the texture tool, simply click apply to set the texture. Now simply repeat this step again on your walls and ceiling using Wall and ceiling as the filter. Note that holding ctrl down while selecting faces allows you to select multiple faces. Also its not against the law to use a floor texture on a ceiling but it might just look a little odd.
-
Now you have your room textured, you might want to go in game and test it out. To do this you will need to add a start point to do this simply select the Entity tool. by default the entity tool is set as info_player_start so simply click the mouse at the part of your room you wish to spawn.
For more accurate placement of entity’s, first click on the top 2d view notice the green line with a little square in the middle, then in the side 2d view set the height of the entity and hit enter. Once the green gordon freeman is there you are ready for your first compile. So go ahead and press f9 then click o.k it should only take a couple of seconds before the game launches and your in your room. Congrats!!
-
your first room is done but did you notice it was plainly lit? Quite ugly! So to remedy this, you will need some lighting, for the sake of covering ground I will combine this part of the tut with Static entity placement, simply placing a light in your room will look quite odd, as it will appear that the light has no source, just brightness hovering in mid air. O.k so go back to your hammer editor and select the entity tool again. On the right side of the screen near the bottom were is says info_player_start type in prop_static and place it the same as you placed the Player start, only put it on the wall, then select the selection tool and double click the Prop_static red square, this will bring up the object properties dialog box, it look a little complex at first but for now we just want to focus on the World model part, so click the world model then hit the browse button, Half life 2 comes with an absolute abundance of models ready made for your maps, so if you want to deviate from the model I use fine, but for this Im gonna use “models/props_interiors/LightSconce01.mdl”
So just follow the model name into the props_interiors folder and double click the LightSconce model the model browser will dissapear and leave you back in the object properties box, so now simply click the apply button and the red square will turn into the light model. Congrats you have added your first model, remember what you did here and you are well on your way.
O.K so you have your light model, but its not a light, so you will need to add a light close to the model to make it appear as if it is working like a light, after the last few stages of this tut, this should be a breeze. Simply select the entity tool and type Light into the bottom right of the screen were you typed Prop_static, then just as you added the prop_static place the light near to the model, fiddle with it until it looks right. see below.

Congrats, now compile to see your handiwork, and if the light doesn’t look right just go back to the editor and tweak it until it does. Remember you can bring the Snap on grid down to 1 for ultra precision.
Also a note on leaks:
If any entity’s are left outside your room in the Blackness (lets call it the void) the engine will report a leak. the void can not be used in your levels, so you must seal your map, the easiest way to do this is to create a big hollow box around your level, then apply the skybox texture to the inside of it, once the map is compiled the skybox texture will give a realistic looking sky.
However,most pro mappers will advise your skybox not to be simply a large box, but “carefully crafted Ceiling brushes”, for an Idea of what they mean by this, set your configuration to Counterstrike source and open the De_cobble sdk map in the editor, there you will see what they mean by carefully crafted, as its not easy to do. My first attempt at this failed miserably as I couldnt clear the sky of anomaly’s.
To set the configuration, simply select the game you wish to map for at the bottom of the SDK splash screen and run hammer. But you can only map for games that you have Downloaded.

Thank you for reading this Tutorial, if you spotted inaccurate information, please notify me by Email at richie@igniq.com.
Also if you want to add a tutorial of your own, please submit them at your leisure to either myself gary or rob@igniq.com