Pick up the crowbar of research scientist Gordon Freeman, who finds himself on an alien-infested Earth being picked to the bone, its resources depleted, its populace dwindling. Freeman is thrust into the unenviable role of rescuing the world from the wrong he unleashed back at Black Mesa. And a lot of people, people he cares about, are counting on him.

Post tutorial Report content RSS feed Beginners Guide to Valve Hammer Editor

This tutorial will show you how to make a very basic map, you will learn how to create brushes (they are blocks that you use to make your level) apply textures & scale them and using various tools that the hammer editor has.

Posted by on - Basic Mapping/Technical

[page=Starting Hammer]
If you already know how to start hammer move on to the next section.

First you'll need Half-Life 2 and Steam installed to use Hammer. After you've done that you need the SDK. Start Steam then open the "Play Games" menu. Go to the bottom of the list. There should be a "Source SDK" on the list (it will not appear if HL2 is not installed). Right-click on it and click "Launch game" button on the drop-down menu. If this is the first time that you have started the SDK, you'll need to download it (it does this automatically. You won't need to download it off of a site). This will take awhile. Once it finshes, you will have the SDK. Now when you launch, it will open a window (after it finshes loading). Here you have a list of most of the tools. Right-click on Hammer (the one at the top) and click "Launch" on the drop-down menu. Now that you've started Hammer (it may take a second or two to finsh loading)you can start mapping! Please move on to the next section.

[page=Mapping with Hammer]
First things first, click on the "file" tab at the top bar, then click on new.

Example:
User Posted Image

Once you've done that you will have a grid, camera and tools to work with,
Example:
User Posted Image

Now you're probably wanting to know what those tools on the side do. Here's a description of each one (note: only the basics of mapping is covered in this tutorial, not all of the tools will be covered, but I hope to cover them in later tutorials). If you get confused later about tools, look back here.

The Selection Tool:
User Posted Image
This is your selection tool. It lets you select brushes and enitiys that are in the map. When something is selected it will have a red-ish tint to verify that you have selected it. You can select multiple things at once by holding Crtl and clicking on the brushes you want.

The Zoom Tool:
User Posted Image
A simple tool used to zoom in and out of the grid and view. If you have a mouse wheel you can zoom in and out with that as well.

Camera Tool:
User Posted Image
This is the tool for moving around the "camera" view.

Entity Tool:
User Posted Image
The Entity Tool is the one of most important tools in Hammer. It can make lights or even place starting points.

Brush Tool:
User Posted Image
The most important tool in Hammer. This will let you create floors, walls, ceilings , catwalks almost anything can be made by using simple brushes. But for the more compelx shapes, you'll need models (I won't cover placing them in this tutorial, but I hope to in the future).

Texture App:
User Posted Image
For applying and scaling textures. This is very useful when textures tile badly (see later in this tutorial how it's used).

Apply Texture:
User Posted Image
Not to be confused with the Texture App. This will apply the texture currently selected in the texture browser (later this will be covered).

Apply Decal:
User Posted Image
Some textures are "Decals". For example, if you want a bullet hole in a wall, you get the decal selected in the texture browser (using the texture browser will be covered later). Click on the "apply decal" button and click on the place you want it to be in the "camera view".

Apply Overlay:
User Posted Image
A lot like a Decal. But overlays can be morphed and sized. You can place it the same way as you would a decal.

Clipping Tool:
User Posted Image
A more complex tool, but it can make amazing results. I will go into this in a later tutorial.

Vertex Tool:
User Posted Image
This lets you "morph" brushes. I will go into this in a later tutorial.

That's it for the main tools. Now let's make something. First, click on the brush tool, drag a box & press enter(the size doesn't matter much. You can change it later if you need). Move the camera so you can see your new brush. It should look something like this:
User Posted Image

NOTE: To see textured brushes, go to the top bar. Then View>3D textured polygons.

That brick texture looks pretty ugly. Lets change it. Over on the right-side of the screen you should see this:
User Posted Image
Click on "browse". A new window has appeared, it's the Texture Browser. Since this is a floor, we're gonna add "floor" to the filter. You'll come up with a lot of textures. So instead of just floor we'll add "metal floor" to the filter. This will narrow your search.
User Posted Image
Double click on the texture to use it. Now to apply it. Click on the brush you want to have the texture, and press the Apply Texture button. Voila!
User Posted Image
Now we need a ceiling. Hold shift and drag your floor brush (in the "side" grid) higher, then let go of shift.
User Posted Image
You now have a ceiling! Now you just need some walls. Drag to make brushes like you did before, but in the "side" grid make them tall.
User Posted Image
Then press enter. Repeat this until your map is sealed. Now find a good wall texture (doesn't really matter what you're using). Most likely you'll run into this problem:
User Posted Image
It tiles horribly! Select the walls and press Shift+A. A new window has appeared! It's the Texture App:
User Posted Image
Just play around with the scale and shift settings. It might take a while to get it right, but there's no need to hurry so take your time. When you finsh it should look something like this:
User Posted Image
Doesn't that look a lot better? Your map is almost ready. Now you need to place a starting point so the game knows where you start. Click on the Entity Tool. You won't need to select which entity you want right now. It starts out with a info_player_start entity so all you'll need to do is place the entity. On the grid click on where you want it to be. Here's an example:
User Posted Image
Press enter and a little green man will appear. Make sure that he's not going through the ground. I recommend making him float a little to be sure. Note that other source games such as Counter-Stirke: Source or Day of Defeat: Source use custom spawn points. Like into_player_terrorist and info_player_counterterrorist.
User Posted Image
Now for the last thing, you'll want to add some lighting. Click on the entity tool. Over at the right you'll see this
User Posted Image
From the drop-down list choose light. Place a few like you did with starting point. When you've finshed adding the lights it should look like this:
User Posted Image
Notice that I'm not placing the light entitiy on the ground, but i'm making them float just a little bit. This makes it a litte less intensely bright making it look a bit better. Now you need to save and compile the map. Press "file" at the top bar. Then click save
User Posted Image
Don't put spaces in the file name use _ or just don't use spaces. Now you're to the last part. Click on the "file" menu again then "Run Map" a new window will appear:
User Posted Image
Set everything to "normal" and turn off "don't run the game after compiling" if it's on. Press ok. The compile window will appear:
User Posted Image
Once finshed it will automatically run the game. The final product will look something like this:
User Posted Image
Congrats! you've made your very first level! it's not that pretty, but this tutorial is not for making the coolest looking map in the world. It's for beginners that want to map but just don't know how.
Go to the next page for some handy keyboard tricks.

[page=Keyboard tricks & wrap up]
Here's a list of every keyboard trick out there:

Tools:

Shift+S - Pointer Tool
Shift+G - Magnify Tool
Shift+C - Camera Tool
Shift+E - Entity Tool
Shift+B - Block Tool
Shift+A - Texture Application Tool
Shift+T - Apply Current Texture
Shift+D - Decal Tool
Shift+O - Overlay Tool
Shift+X - Clipping Tool
Shift+V - Vertex Edit Tool

File Operations:

Ctrl+N – Create a new file.
Ctrl+O – Open an existing file.
Ctrl+S – Save the current file.
Alt+B – Export again.
F9 – Run/Compile Map.
Ctrl+Shift+S – Open Sound Browser.

Undo/Redo:

Ctrl+Z – Undo.
Ctrl+Y – Redo.

Clipboard/Selection:

Ctrl+C – Copy objects to clipboard (also Ctrl+Insert).
Ctrl+V – Paste objects from clipboard (also Shift+Insert).
Ctrl+X – Cut objects to clipboard (also Shift+del).
Shift+Q or Esc – Clear current selections.
PgUp – Previous selection in "hit" list.
PgDn – Next selection in "hit" list .
Alt+Enter – Open up Object Properties for the currently selected objects.

Grid:

[ – Decrease the size of the grid.
] – Increase the size of the grid.
Shift+R – Toggle grid on/off.
Shift+W – Toggle snap to grid.
P – Toggle 3D grid on and off (with mouse cursor in 3D view).

Grouping:

Ctrl+G – Group selected objects.
Ctrl+U – Ungroup selected groups.
Ctrl+R – Create prefab with selected objects.
Ctrl+T – Tie to entity. Creates an entity with selected objects, or adds objects to an existing entity if one is also selected.
Ctrl+W – Toggle Ignore Groups mode to bypass entity and group selection.
Ctrl+Shift+W – Move selected solid entities to world.

Carving/Hollowing:

Ctrl+Shift+C - Carve selected objects.
Ctrl+H - Hollow selected objects.
Viewports
Ctrl+A – Auto-size 4 views to center.
Shift+Z – Maximize/restore current viewport.
Arrow keys – Nudge the current selection in the current 2D or 3D viewport.
Shift+Arrow keys – Clone the current selection and nudge it the current 2D or 3D viewport.
F6 – Cycles to the next active viewport.
F6 – Cycles to the previous active viewport.

2D Views:

Ctrl+I – Flip selected objects vertically.
Ctrl+L – Flip selected objects horizontally.
Ctrl+B – Snap selected objects to grid (based on bounding box).
Ctrl+Shift+B – Snap selected objects to grid (individually).
Tab – Switch view types (top/side/front).
+/- – Zoom in/out (hold Ctrl to synchronize all 2D views).
Mouse Wheel – Zoom in/out (hold Ctrl to synchronize all 2D views).
1 to 9 – Preset zoom levels.
Space – Hold space and left mouse button to drag view position.
Alt – Disable snap to grid while dragging with the mouse.
Ctrl+E – Center 2D Views on currently selected objects.
Mouse Wheel – Zoom in/out (hold Ctrl to synchronize all 2D views).

3D View:

Space - While holding the spacebar:
Holding the left mouse button allows you to rotate your angle of view in any direction, while the viewing point remains stationary.
Holding the right mouse button will allow you to move left, right, up, and down while keeping the viewing angle constant.
Space+Shift - While holding the spacebar and Shift:
The left mouse button acts the same as above.
The right mouse button allows you to move forward and backward, as well as from side to side.
Mouse Wheel – Zoom in/out.
W – Move camera forward.
S – Move camera backward.
A – Move camera (strafe) left.
D – Move camera (strafe) right.
z – Toggles 3D view "noclip" navigation mode.
P – Toggle 3D grid on and off (with mouse cursor in 3D view).
O – Display frames per second and yaw/pitch of camera (with mouse cursor in 3D view).
1 – Decrease far clipping plane.
2 – Increase far clipping plane.
Ctrl+Shift+E – Center 3D View on selection.

Selection Tool:

Ctrl – Hold Ctrl and click to select multiple objects.
Shift – Hold Shift when rotating to constrain rotation to 15 degrees; hold Shift when moving an object to create a copy (clone) of that object.
Left mouse – Click and drag left mouse button to select with a box; press Enter to select objects hitting the box, or press Shift+Enter to select objects only entirely within the box.
Esc – Cancel current selection

Camera Tool:

Shift or Alt – Hold Shift or Alt and click and drag left mouse button to create a new camera.
PgUp – Cycle to the previous camera position.
PgDn – Cycle to the next camera position.
Delete – Delete the current camera position.
Ctrl – Hold Ctrl and drag a camera or its point of interest to move both together.

Block Tool:

Left Mouse – Click and drag left mouse to draw a new brush shape.
Enter – Create object drawn with block/entity tool.
Esc – Delete object drawn with block/entity tool without creating it.
Alt+Shift+C – Insert original prefab.

Texture Application Tool:

Ctrl – Hold Ctrl and click to select multiple faces.
Shift – Hold Shift and click a face to select all faces on the brush.
Shift+Ctrl – Hold Shift and Ctrl, click a face to add all faces on the brush to the current selection.
Right-click – Apply the current material settings to the face that is clicked.
Alt+Right-click – Apply the current material settings to the face that is clicked, with wrapping.
Displacement Editing Tool, Select Mode
Ctrl – Hold Ctrl and click to select multiple faces.
Shift – Hold Shift and click a face to select all faces on the brush.
Shift+Ctrl – Hold Shift and Ctrl, click a face to add all faces on the brush to the current selection.
Displacement Editing Tool, Paint Geometry Mode
Ctrl – Hold Ctrl and click to select multiple faces.
Alt – hold Alt and drag to alter the size of the spatial editing brush.
Shift – hold Shift and drag a vertex to nudge the vertex along the editing axis.
Alt+Right-click – Click any brush or displacement face to make that face’s normal the current painting axis.
Displacement Editing Tool, Paint Alpha mode
Ctrl – Hold Ctrl and click to select multiple faces.
Shift+Ctrl – Hold Shift and Ctrl, click a face to add all faces on the brush to the current selection.

Overlay Tool:

Shift – Hold Shift and drag a overlay vertex to snap it to another vertex.
Ctrl – hold Ctrl and click to select multiple overlays.
Clipper Tool
Left mouse– Click and drag left mouse to create a new clip plane.
Shift – Hold Shift and drag with the left mouse button to create a new clip plane without performing the previous clip.
Enter – Perform clip
Ctrl – hold Ctrl and drag with the left mouse button to move both handles of the clipping plane.
O – Toggle clip distance display on and off (with mouse cursor in 2D view).
Shift+X – Cycle through clip modes.
Vertex Edit Tool
Ctrl+F – Split faces (vertex manipulation) – must have two edges or vertices selected.
Alt+E – Open Vertex Scaling dialog.
Enter – Close Vertex Scaling dialog and perform scale.
Shift+V – Cycle vertex/edge display modes.

Miscellaneous:

Shift+L – Toggle Texture lock.
Ctrl+M – Open Transform dialog.
Alt+P – Open Check for Problems dialog.
Esc – Abort current tool/mouse operation (drag/drop) or clear current selection.
Ctrl+Shift+G – Go to Brush Number dialog.
Ctrl+Shift+F – Open Find Entities dialog.
Ctrl+Shift+R – Open Replace Entities dialog.

Post comment Comments  (100 - 150 of 164)
BlackIce1
BlackIce1

I dont get the entity. my man keeps coming up like a terrorist and hes lying down. i dont get it

Reply Good karma Bad karma+1 vote
Keegah
Keegah

Oi Azngangster... did you select the block you wanted to apply the texture to first?

Reply Good karma Bad karma+1 vote
Keegah
Keegah

Oh, wow.... I replied to one of the first comments. Teh stupid. Anyway, great tut. Taught me how to map. Thanks!

Reply Good karma Bad karma+1 vote
Coolman44445
Coolman44445

Hi,

First off all:
You've made a very nice tutorial. I've learned how to make maps with hammer mod, but there is 1 issue. I've made my first map and tried to run it on css. I followed your tutorial exactly and made 5 t spawns and 5 ct spawns(with info_player_terrorist and info_player_counterterrorist). I've put 6 lights in my map and i tried to run it, css started as well as the server and when i tried to chose a team it said: Ct team full and T team full. When i hit auto assign it said: All teams are full. When i hit spectate i cant see anything cuz its very dark. How can i fix these problems?

Thank you

Reply Good karma Bad karma+1 vote
Glazer
Glazer

Whew, it took me like 2 hours, but I've got those basics down, thanks for the tutorial man!

Reply Good karma Bad karma+1 vote
Killerbox
Killerbox

when i did the entity tool and place a info_player_start instead of a green figure a green rectangle box came out. Is this a problem? If it is then plz tell me how to fix it!

Reply Good karma Bad karma+1 vote
Vom
Vom

Thank you very much for this guide. If I could (slash I'd know how) to rate your guide, I'd give you 6/5.

Keep it goin' lad!

Reply Good karma Bad karma+1 vote
PiMp2o9
PiMp2o9

k well im makin a map and when i test the map in certain spots the sky and walls will go black or stuff will disappear and come back when im in a different spots of the map..... what can i do to fix this thxx in advance

Reply Good karma Bad karma+1 vote
DERMOTK5
DERMOTK5

good tutorial

Reply Good karma Bad karma+1 vote
TyeTheCzar
TyeTheCzar

I am having the same problem as Minoran and FreakyD, oy. Email me at tyetheczar@hotmail.com
BTW, nice tutorial, oy.

Reply Good karma Bad karma+1 vote
musicman2793
musicman2793

I keep trying to get it to run, but it will only run it with Half-Life, it won't do Half-Life 2. And I can't run it from Steam, I have to use the shortcut on my desktop. Can anyone help?!

Reply Good karma Bad karma+1 vote
Pwnzor
Pwnzor

Heya,

we are making an map for cs:s but we need to know how we can put computers and desks in the map.

i know this forum is not been used for 2 years lol.

Reply Good karma Bad karma+1 vote
Pwnzor
Pwnzor

lol i was only looking ong page 1 haha.

well i need some help with the computers and the desks.

thnx

Reply Good karma Bad karma+1 vote
WieruZ
WieruZ

error... i did the map with lights and all, but when im going to play the map an error sign comes up. It says unable to load c:\program\steam\steamapps\my acount\half-life 2 episode two\bin\filesystem_steam.dll

Reply Good karma Bad karma+1 vote
WieruZ
WieruZ

got it working hadnt updated hl2 ep 2

Reply Good karma Bad karma+1 vote
ShadeX
ShadeX

very helpful, it shows me how to get the camera working!

Reply Good karma Bad karma+1 vote
jwalker236
jwalker236

For some reason when i play it i can only listen to the sounds the video wont show up and secondly i cant find hl basic textures or dod_glider to save my life. Can someone give me a hand please..

Reply Good karma Bad karma+1 vote
bluey90
bluey90

Like many others I am having this problem:

I've built the room, following, so far as I can tell, the directions, yet when I run the map I am only left with blackness. I have placed the lights, though I have no way of knowing if the room is simply dark or if it isn't properly loaded and I'm in an abyss.

I'm using Half Life 2, and am (obviously) very new to this. If anyone can help, please email me at bluey<NOSPAM>90@gmail.com (remove the <NOSPAM> bit).

Thanks,
Michael

Reply Good karma Bad karma+1 vote
Csucsu93
Csucsu93

huups.... wait a second...I start the Steam, but, I cant see "play games" menu..... WHY??!! Somebody please help me... THX......XD

Reply Good karma Bad karma+1 vote
KittyHawk
KittyHawk

I do not know if you can see this but mine says "Store, Library, News, Community" I click Library and below Library, and News it says "Games, Media, Tools, and Downloads" I click Games for games I own and Tools for Source Sdk or any other tool I use.

Reply Good karma Bad karma+1 vote
ChromeClaw
ChromeClaw

I made an account just so i could thank you dude you make it very simple even though beginners find it hard id just like to say thank you for you work

Reply Good karma Bad karma+1 vote
sule
sule

Cool tutorial. Thx for help! =)

Reply Good karma Bad karma+1 vote
Ctrotter456
Ctrotter456

Does any1 no how to load mods into hammer????

Reply Good karma Bad karma+1 vote
tspearin
tspearin

I did it all, but when I ran it, it was just blackness. there was a crosshair however.

any ideas?

Reply Good karma Bad karma+1 vote
KittyHawk
KittyHawk

Use the Entity Light_Environment to light up that area although in my maps I have never had the need to used lights.

Reply Good karma Bad karma+1 vote
TheOrestes
TheOrestes

Kickass tuts to start with ... thx mate :)

Reply Good karma Bad karma+1 vote
qewo
qewo

how do i get the created map to run with garrysmod and how do i create a non world item (physics prop)that would be everything i would need to make a map thanks :)

Reply Good karma Bad karma+1 vote
todibbang
todibbang

i made a map with bots, but the bots can see through the walls. when they spawn they just stand still and shoot in my direction. first when they run out of armo they start moving around. i can also see through the walls. When i aime at their spawn location i can see their names even though there is a blockwall between us...... what have i done wrong ? :P

Reply Good karma Bad karma+1 vote
Aquilia
Aquilia

when i try to test my map, half life 2 loads, but I can't access my map, solution?

Reply Good karma Bad karma+1 vote
2468001
2468001

I didn't have any problem making the map. but every time i test run it takes me to the hl2 dm main menu. I tried to create my own sever useing my map..it never works . HELP ME!

Reply Good karma Bad karma+1 vote
KittyHawk
KittyHawk

I learned that to make a sliding door make a wall put it in the spot where you want it to be (in the wall same size or bigger to do this process) go under tools click carve then press Ctrl + T and it opens something up and then click "Func_Door" and pick what direction speed you want it to slide open in, No problem always glad to help, if this does not make sense reply to me and I will try to help again

Reply Good karma Bad karma+1 vote
BEEF_JERKY_MAN
BEEF_JERKY_MAN

I am having nav errors and i made a room how do i make a door.
I'm very new to making this i made a small room is that my whole level or do i need to start over and make it bigger and add stuff to it.

Reply Good karma Bad karma+1 vote
ethancm
ethancm

I am trying to mod, but i dont get the auto tecsture, i only get the yellow outline.... Can somebody please tell me why???

Reply Good karma Bad karma+1 vote
Spenzerr
Spenzerr

thnx im downloading source sdk now my first goal is to make a gungame map!

is their a tutorial for that? or anything special i need to know for such a game type?

Reply Good karma Bad karma+1 vote
reza_the_great
reza_the_great

so how can i use hammer if i have a non steam version of half life 2 ?? plz answer me! its realy important

Reply Good karma Bad karma+1 vote
DigiAssassin
DigiAssassin

All hail the king! Your tutorial made the most complicated thing I've encountered (new to mapping & etc) in a simple process.

Reply Good karma Bad karma+1 vote
KurtCobain
KurtCobain

Well, I am clicking, and dragging in the grid and hit enter. NOTHING SHOWS UP IN THE CAMERA VIEW!! SOMEONE PLZ HELP!!!!

Reply Good karma Bad karma+1 vote
KittyHawk
KittyHawk

Simple If you click on the camera button you can use the mouse wheel to zoom in and out and left click to change your view (Note:You can also use arrow keys)

Reply Good karma Bad karma+1 vote
AUG_DUDE
AUG_DUDE

how do you do to reload .BSP maps???

Reply Good karma Bad karma+1 vote
KittyHawk
KittyHawk

You need a Decoder I've been told so you are unable to do this until you have a File Decoder

Reply Good karma Bad karma+1 vote
netrom4
netrom4

i've made a map, and when i try adding bots to it it keep restarting... why? please help me

Reply Good karma Bad karma+1 vote
JK4ever
JK4ever

This is cool thx :)
i have made something like this on my own without any kind of help, but didn't came any further then to make a wall secment and painting them. i needed to place a spawning point, but couldn't find it :P
Now i know that i made something in the right direction :) and this mod helped me then further to place a spawn point and light :D

Reply Good karma Bad karma+1 vote
KittyHawk
KittyHawk

Tutorial is great helped me a lot and learned some new stuff you didn't mention on my own also figured out how to fix some of my problems and helped others with the same issue I have or had or have figured out already even tho it was never an issue.

Reply Good karma Bad karma+1 vote
KittyHawk
KittyHawk

Helped a ton by the way

Reply Good karma Bad karma+1 vote
GamerX1000
GamerX1000

Great tutorial. But I have a problem. (My hammer is for Half-Life 2) When I start the game, I can't use the flashlight, run or walk slowly. Can anyone tell what entities or nouns or solutions for this? I relly need to know.
Thanks.

Reply Good karma Bad karma+1 vote
patrikpatrikp
patrikpatrikp

Please help me ... i dont find the entity bar ... where can i found it???

Reply Good karma Bad karma+1 vote
patrikpatrikp
patrikpatrikp

and the prefabs (catagories) PLEASE HELP ME!!!!!!!!!!!!!!!

Reply Good karma Bad karma+1 vote
yarow12
yarow12

Thank you for posting this.

Reply Good karma Bad karma+1 vote
oGrim_Reapero
oGrim_Reapero

It says I need to setup game configurations

Reply Good karma Bad karma+1 vote
Post a comment

You are not logged in, your comment will be anonymous unless you join the community. Or sign in with your social account:

Icon
Half-Life 2
Platforms
Windows, X360, XBOX, PS3
Developer & Publisher
Valve
Engine
Source
Contact
Send Message
Homepage
Half-life2.com
Release date
Game watch
Start tracking
Tutorial
Related Games
Half-Life 2
Half-Life 2 First Person Shooter
Related Engines
Source
Source Commercial
Related Groups
Valve
Valve Developer & Publisher