User:Wisdurm/Sandbox/1. A Room (Updated)
<div class="entityDIV [ Either there are no particularly important entities referenced in this tutorial,
or the entity list for this tutorial has not yet been setup.
E-mail me if you think this is a bug. ]
<div class="tutHeader 1. A Room (Updated)
All basic tutorials are exactly that: basic. They are step by step guides
through each operation, hopefully fully illustrated. Experienced mappers may find these tedious, but they are essentially designed for newbies :-)
This builds a <span class="ref BASIC ROOM takes you through making brushes,
hollowing, placing the player, adding a light source and some basic texturing operations in Hammer.
We will be using this room in later tutorials.
As with all tutorials, you can go through it and make it, or if you just want to get how to do it, then download the VMF load it up in Hammer, and use the tutorial as a reference point to see how things work.
<hr width="85%" color="#FFFFFF
- Open Hammer
- Click on <span class="fer file | new
- Click on the <span class="ref Block tool <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/blocktool.jpg" align="middle or press <span class="key SHIFT+B
- On the right hand side of the screen under <span class="ref Objects in the drop down, make sure
<span class="ref Block is showing
- With the cursor in the <span class="ref 2d Top (x/y)view hold down the LeftMouseButton (LMB),
and drag out your room.
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/top2d.jpg
<blockquote class="tip TIP...
It is a good idea to keep to the 1024 grid lines on the grid as far as possible. This helps with performance of the game engine
- Note that the program shows you the size of the room (length and width) as you draw it.
(512 x 512 is good)
- In the <span class="ref side view, click and hold the small white handle in the
middle of the bottom line, pull it down to make the room 128 units high.
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/side2d.jpg
- Click on <span class="ref Browse in the <span class="ref Texture Window (Top RHS of screen);
here are all the textures available to you.
- In the <span class="ref Filter window type <span class="ref Nodraw
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/texwind.jpg
<blockquote class="tipNo Draw ...
The <span class="ref Nodraw material helps increase performance for the Source engine by not rendering the surfaces that it is applied to. Any surface that the player will never see in the game can be textured with <span class="ref Nodraw, so it makes sense that if you use this as your default texture, and then only texture the surfaces which the player will see, you save some work, and maximise performance of the engine. - Double-click on the <span class="ref Nodraw texture that comes up.
- The texture window closes and returns you to the editor. <span class="ref Nodraw
is in the texture pane.
- Press enter.
- You have now made a solid cube in the editor: 512 x 512 x 128.
<span class="ref THIS IS A BRUSH
- Click on the <span class="ref Selector Tool in the toolbar.
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/selector.jpg" align="middle
Your brush will be red and have 8 small white square handles, showing it is selected.
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/selectbrush.jpg" align="middle
So that you can walk around inside it, we need to hollow it.
(See the [#end end of this tutorial] for a note about hollowing vs making walls separately)
- Click on <span class="fer Tools on the menu bar, and then
<span class="fer Make Hollow <span class="key (CTRL+H).
A window comes up.
This asks how thick you want the walls, I always hollow outward as it retains the dimensions of the room (i.e. 512 x 512 x 512) so put a minus in front of the number. You can change the thickness, so change it to -16.
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/hollow.jpg" align="middle
Click OK.
- You now have a room, and you should be able to see it in the <span class="ref 3D window. (Click on
<span class="ref Camera in the <span class="ref 3D screen and select <span class="ref 3d Textured.)
Put your cursor in the camera window, and press <span class="key Z on the keyboard. The cursor changes to a cross.
- If you move the mouse around in the <span class="ref 3D window your room will appear.
To move towards it press '<span class="key W', back is '<span class="key S',
right is '<span class="key D' and left is '<span class="key A',
the same as in the game. You can use the mouse to look around
and up and down. Press <span class="key Z again, to come out of the camera.
You see your big, very yellow room. <blockquote class="tip CAMERA ...
You can place a camera anywhere in the <span class="ref 2D views. Click on the camera icon <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/camera.jpg" align="middle
hold down <span class="key SHIFT and drag out the camera in a <span class="ref 2D view. You get a red ball with a blue line, the line points in the direction of the camera. Check to see if it's where you intended in the other <span class="ref 2D windows. You can place as many as you like, and with <span class="ref Camera selected, when you click on one in the <span class="ref 2D view, the <span class="ref 3D view uses that camera.
Let's texture the room - Click on the green blue and red cube on the LHS toolbar.
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/faceedit.jpg" align="middle
This is called the <span class="ref Toggle Texture Application tool or, the <span class="ref Face Edit Sheet.
With this tool you can pick, scale, rotate, shift in any axis and change the lightmap value of all your textures.
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/faceeditwin.jpg
- Click on <span class="ref Browse and we are back in the textures browser.
Clear the <span class="ref Filter which will still have <span class="ref Nodraw
in it.
Type in <span class="ref wall and pick a wall texture.
<blockquote class="tip TIP ...
If you single click on a texture, you are able to scroll through with a wheel mouse. - Double click on your fancy (for reference, I used <span class="ref plaster/wallpaper002a),
then, in the <span class="ref Face Edit Sheet click on
<span class="ref Mode: Lift and Select. From the drop down click on
<span class="ref Apply Texture and Values.
- Press <span class="key Z on the keyboard with the cursor in the camera
window, and you will be able to left click the texture onto each wall in turn.
- Do the same thing, finding floor and ceiling textures.
(Type floor or ceiling into the <span class="ref Filter )
I used <span class="ref concrete/concretefloor011a for the floor and
<span class="ref concrete/concreteceiling003a for the ceiling.
(I don't intend covering texturing in detail, that's for later tutorials, but textures are a particular size which can be changed,, but as the wall texture e.g. was 128 by 128 you will have noted that the wall texture fits exactly floor to ceiling.)
Close the <span class="ref Face Edit Sheet
Now let's put a player in the game.
- Click on the <span class="ref Entity Tool
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/enttool.jpg" align="middle
On the RHS of the editor you will see <span class="ref Categories and below it <span class="ref Entities. Then below that <span class="ref Objects and then <span class="ref Info_player_start.
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/entwindow.jpg
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/entlist.jpg
If <span class="ref Info_player_start is not displayed, simply click the arrow and pick it from the alphabetical list of entities.
Back in the <span class="ref 2D window, your cursor turns into an axe with a cross !!
- The easiest way to place entities on the floor is in the <span class="ref 3D window.
So click it onto the floor. You can still move it (in a <span class="ref 2d window) if it is not in the right place, but it must not overlap
the floor, or your player will be stuck in the floor, in the game.
Time for your reward.
- Click on <span class="fer Run map on the menu bar
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/runmap.jpg" align="middle or press <span class="key F9
You will be asked to name the map. Name it <span class="ref master_room , or something, as we will use this basic room in later tutorials, and click OK.
Then the <span class="ref Run Map window opens <span class="ref Normal should be selected in <span class="ref Run BSP, Run VIS and <span class="ref Run RAD.
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/runmapwin.jpg
- Type in <span class="key -dev -console , in the additional game parameters window,
then click <span class="ref OK .
If you are set up properly Hammer will compile your map and send it to HL2, and you should be in the game in your room.
- Before you leave the game press the keyboard key just below the <span class="key ESC key,
or the tilde <span class="key ~ key.
The console window comes up. (this is why we put -dev -console in the parameters).
This is one of the places you should look for errors in your map, if you have a problem.
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/console.jpg
- OK exit the game. You are dumped back into Hammer.
You will see here the <span class="ref Compile Process Window , open it up and scroll through. This is another place you can find why there might be errors in your map.
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/compile.jpg
The map is fully lit in the game. That it because there are no lights in your map, so the compiler sends it fully lit to the game.
- Let's put some light in.
- Click on the <span class="ref Entity Tool <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/enttool.jpg" align="middle
- Open the <span class="ref Objects drop down menu
and find the <span class="ref Light entity
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/lightent.jpg
- Put the <span class="ref Light entity in the middle of the room, roughly.
- Click on Run map on the menu bar
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/runmap.jpg" align="middle or press <span class="key F9
- Click OK.
- You will be back in the game, with the room lit by the light entity you put in.
<hr width="85%" size="1
<div align="center
<a name="end Hollowing vs Making Walls Separately.]
There are some mappers who think you should never use hollow. This means making rooms wall
by wall and adding a ceiling and a floor all as separate brushes. Further some believe that
mitring (by means of vertex editing - see later tutorial) the joins makes for better map
practice. This may be for reasons of compiling, FPS rates etc. I don't know, I am still
learning and I don't have a view on this subject. What is true is that you can make many
differently shaped rooms if you do it brush by brush, which avoids the square or rectangular
options that hollowing with the block tool leaves you with.
Probably best to only use hollow where simple cube shapes are involved.(no doubt someone can
comment on this, and the forums will give more discussion (see [?page=links&PHPSESSID=d50bbc8e15612551d0eb10d5f6efb683 links]
page)See also [?page=workshop&action=view&item=5&PHPSESSID=d50bbc8e15612551d0eb10d5f6efb683 here].
<div class="VMF" align="center [tutorials/1/master_room.zip?PHPSESSID=d50bbc8e15612551d0eb10d5f6efb683 Download the File : master_room.zip (1.266kb)]<div align="center
Click to <img src="/web/20060625142302im_/http://halfwit-2.com/images/laughing5.gif" align="middle Comment <img src="/web/20060625142302im_/http://halfwit-2.com/images/laughing5.gif" align="middle on this tutorial or Click to <img src="/web/20060625142302im_/http://halfwit-2.com/images/mad.gif" align="middle Complain <img src="/web/20060625142302im_/http://halfwit-2.com/images/mad.gif" align="middle
<div class="VMF The next tutorial is "2. A Room with a Light (Updated)" and can be found [?page=tutorials&id=2&PHPSESSID=d50bbc8e15612551d0eb10d5f6efb683 here].
[#top Return to the top of the page
]