User:Wisdurm/Sandbox/1. A Room (Updated): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Half-Wit 2)
 
m (fixed links)
Line 1: Line 1:




<div class="entityDIV">[ Either there are no particularly important entities referenced in this tutorial,
<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.
or the entity list for this tutorial has not yet been setup.
<a href="https://web.archive.org/web/20060625142302/mailto:frodo_greenman@dsl.pipex.com">E-mail me</a> if you think this is a bug. ]</div><br><br><div class="tutHeader">1. A Room (Updated)</div><br><br> All basic tutorials are exactly that: basic. They are step by step guides
[https://web.archive.org/web/20060625142302/mailto:frodo_greenman@dsl.pipex.com E-mail me] if you think this is a bug. ]</div><br><br><div class="tutHeader 1. A Room (Updated)</div><br><br> All basic tutorials are exactly that: basic. They are step by step guides
through each operation, hopefully fully illustrated. Experienced mappers may
through each operation, hopefully fully illustrated. Experienced mappers may
find these tedious, but they are essentially designed for newbies :-)
find these tedious, but they are essentially designed for newbies :-)
Line 9: Line 9:
<br>
<br>
<br>
<br>
This builds a <span class="ref"><u>BASIC ROOM</u></span> takes you through making brushes,  
This builds a <span class="ref <u>BASIC ROOM</u></span> takes you through making brushes,  
hollowing, placing the player, adding a light source and some basic texturing operations in Hammer.
hollowing, placing the player, adding a light source and some basic texturing operations in Hammer.
<u>We will be using this room in later tutorials.</u>
<u>We will be using this room in later tutorials.</u>
Line 18: Line 18:
<br>
<br>


<hr width="85%" color="#FFFFFF">
<hr width="85%" color="#FFFFFF  


<br>
<br>
Line 27: Line 27:
<br>
<br>


</li><li> Click on <span class="fer">file | new</span>
</li><li> Click on <span class="fer file | new</span>


<br>
<br>


</li><li> Click on the <span class="ref">Block </span>tool   
</li><li> Click on the <span class="ref Block </span>tool   
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/blocktool.jpg" align="middle">  or press <span class="key">SHIFT+B</span>
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/blocktool.jpg" align="middle   or press <span class="key SHIFT+B</span>
</li><li> On the right hand side of the screen under <span class="ref"><u>O</u>bjects</span> in the drop down, make sure  
</li><li> On the right hand side of the screen under <span class="ref <u>O</u>bjects</span> in the drop down, make sure  
<span class="ref">Block</span> is showing
<span class="ref Block</span> is showing
<br>  
<br>  
<br>
<br>
 
 
</li><li> With the cursor in the <span class="ref">2d Top (x/y)view </span>hold down the LeftMouseButton (LMB),  
</li><li> With the cursor in the <span class="ref 2d Top (x/y)view </span>hold down the LeftMouseButton (LMB),  
and drag out your room.
and drag out your room.
<br>
<br>
 
 
<br> <div align="center"> <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/top2d.jpg"> </div>
<br> <div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/top2d.jpg </div>
 
 
<br> <blockquote class="tip">
<br> <blockquote class="tip
<strong>TIP...</strong>
<strong>TIP...</strong>


Line 58: Line 58:
<br>
<br>
</li><li> In the <span class="ref">side view</span>, click and hold the small white handle in the  
</li><li> In the <span class="ref side view</span>, click and hold the small white handle in the  
middle of the bottom line, pull it down to make the room 128 units high.
middle of the bottom line, pull it down to make the room 128 units high.
<br>
<br>
<br>  
<br>  
<div align="center"> <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/side2d.jpg"> </div>  
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/side2d.jpg </div>  
<br>
<br>
</li><li> Click on <span class="ref">Browse</span> in the <span class="ref">Texture Window</span> (Top RHS of screen);  
</li><li> Click on <span class="ref Browse</span> in the <span class="ref Texture Window</span> (Top RHS of screen);  
here are all the textures available to you.
here are all the textures available to you.
<br>
<br>
<br>
<br>
</li><li> In the <span class="ref">Filter</span> window type <span class="ref">Nodraw</span>
</li><li> In the <span class="ref Filter</span> window type <span class="ref Nodraw</span>
<br>
<br>
<br>
<br>
<div align="center"> <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/texwind.jpg"> </div>
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/texwind.jpg </div>
 
 
<br> <blockquote class="tip">
<br> <blockquote class="tip
   
   
<strong>No Draw ...</strong>
<strong>No Draw ...</strong>
Line 81: Line 81:
<br>
<br>
<br>  
<br>  
The <span class="ref">Nodraw</span> material helps increase performance for the Source engine by not  
The <span class="ref Nodraw</span> material helps increase performance for the Source engine by not  
rendering the surfaces that it is applied to. Any surface that the player will <u>never see</u> in  
rendering the surfaces that it is applied to. Any surface that the player will <u>never see</u> in  
the game can be textured with <span class="ref">Nodraw</span>, so it makes sense that if you use  
the game can be textured with <span class="ref Nodraw</span>, 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  
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.
some work, and maximise performance of the engine.
Line 89: Line 89:
</blockquote>
</blockquote>
</li><li> Double-click on the <span class="ref">Nodraw</span> texture that comes up.
</li><li> Double-click on the <span class="ref Nodraw</span> texture that comes up.
<br>
<br>
<br>
<br>
</li><li> The texture window closes and returns you to the editor. <span class="ref"> Nodraw </span>  
</li><li> The texture window closes and returns you to the editor. <span class="ref Nodraw </span>  
is in the texture pane.  
is in the texture pane.  
Line 105: Line 105:
<br>
<br>
<br>
<br>
<em><span class="ref"> <u> THIS IS A BRUSH </u></span></em>
<em><span class="ref <u> THIS IS A BRUSH </u></span></em>
<br>
<br>
<br>
<br>
</li><li> Click on the <span class="ref">Selector Tool</span> in the toolbar.
</li><li> Click on the <span class="ref Selector Tool</span> in the toolbar.
      <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/selector.jpg" align="middle">
      <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/selector.jpg" align="middle  
<br>  
<br>  
Your brush will be red and have 8 small white square handles, showing it is selected.
Your brush will be red and have 8 small white square handles, showing it is selected.
<br>
<br>
<br>
<br>
<div align="center"> <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/selectbrush.jpg" align="middle"> </div>
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/selectbrush.jpg" align="middle </div>


<br>
<br>
Line 120: Line 120:
So that you can walk around inside it, we need to hollow it.
So that you can walk around inside it, we need to hollow it.
<br>
<br>
(See the <a href="#end">end of this tutorial</a> for a note about hollowing vs making walls separately)
(See the [#end end of this tutorial] for a note about hollowing vs making walls separately)
<br>
<br>
<br>
<br>
</li><li> Click on <span class="fer">Tools </span> on the menu bar, and then  
</li><li> Click on <span class="fer Tools </span> on the menu bar, and then  
<span class="fer">Make Hollow</span> <span class="key">(CTRL+H)</span>. 
<span class="fer Make Hollow</span> <span class="key (CTRL+H)</span>. 
<br>
<br>
A window comes up.
A window comes up.
Line 132: Line 132:
You can change the thickness, so change it to -16.
You can change the thickness, so change it to -16.
<br>
<br>
<br><div align="center"> <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/hollow.jpg" align="middle"> </div>
<br><div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/hollow.jpg" align="middle </div>
<br>
<br>
Click OK.
Click OK.
<br>
<br>
<br>
<br>
</li><li> You now have a room, and you should be able to see it in the <span class="ref"> 3D </span> window. (Click on  
</li><li> You now have a room, and you should be able to see it in the <span class="ref 3D </span> window. (Click on  
<span class="ref">Camera</span> <u>in</u> the <span class="ref"> 3D </span> screen and select <span class="ref">3d Textured</span>.)
<span class="ref Camera</span> <u>in</u> the <span class="ref 3D </span> screen and select <span class="ref 3d Textured</span>.)
<br>
<br>
Put your cursor in the camera window, and press <span class="key">Z</span> on the keyboard.  
Put your cursor in the camera window, and press <span class="key Z</span> on the keyboard.  
The cursor changes to a cross.
The cursor changes to a cross.
<br>
<br>
<br>
<br>
</li><li> If you move the mouse around in the <span class="ref"> 3D </span> window your room will appear.  
</li><li> If you move the mouse around in the <span class="ref 3D </span> window your room will appear.  
To move towards it press '<span class="key">W</span>', back is '<span class="key">S</span>',  
To move towards it press '<span class="key W</span>', back is '<span class="key S</span>',  
right is '<span class="key">D</span>' and left is '<span class="key">A</span>',  
right is '<span class="key D</span>' and left is '<span class="key A</span>',  
the same as in the game. You can use the mouse to look around  
the same as in the game. You can use the mouse to look around  
and up and down. Press <span class="key">Z</span> again, to come out of the camera.
and up and down. Press <span class="key Z</span> again, to come out of the camera.
<br>
<br>
<br>
<br>
You see your big, very yellow room.
You see your big, very yellow room.
<blockquote class="tip">
<blockquote class="tip
<strong>CAMERA ...</strong>
<strong>CAMERA ...</strong>


<br>
<br>
You can place a camera anywhere in the <span class="ref">2D </span>views. Click on the camera icon
You can place a camera anywhere in the <span class="ref 2D </span>views. Click on the camera icon
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/camera.jpg" align="middle">
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/camera.jpg" align="middle  
<br>  
<br>  
hold down <span class="key">SHIFT</span> and drag out the camera in a <span class="ref"> 2D </span>view.  
hold down <span class="key SHIFT</span> and drag out the camera in a <span class="ref 2D </span>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  
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 </span> windows. You can place as many as you like,  
where you intended in the other <span class="ref 2D </span> windows. You can place as many as you like,  
and with <span class="ref"> Camera</span>  
and with <span class="ref Camera</span>  
selected, when you click on one in the <span class="ref"> 2D </span> view, the <span class="ref"> 3D </span>view uses that camera.
selected, when you click on one in the <span class="ref 2D </span> view, the <span class="ref 3D </span>view uses that camera.
</blockquote>
</blockquote>
<br>
<br>
Line 172: Line 172:
</li><li> Click on the green blue and red cube on the LHS toolbar.
</li><li> 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">
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/faceedit.jpg" align="middle  
<br>
<br>
<br>  
<br>  
This is called the <span class="ref">Toggle Texture Application</span> tool
This is called the <span class="ref Toggle Texture Application</span> tool
or, the <span class="ref">Face Edit Sheet</span>.
or, the <span class="ref Face Edit Sheet</span>.
<br>
<br>
With this tool you can pick, scale, rotate, shift in any axis and change the lightmap  
With this tool you can pick, scale, rotate, shift in any axis and change the lightmap  
Line 182: Line 182:
<br>
<br>
<br>
<br>
<div align="center"> <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/faceeditwin.jpg"> </div>
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/faceeditwin.jpg </div>
<br>
<br>
</li><li> Click on <span class="ref">Browse</span> and we are back in the textures browser.  
</li><li> Click on <span class="ref Browse</span> and we are back in the textures browser.  
Clear the <span class="ref">Filter</span> which will still have <span class="ref">Nodraw </span>
Clear the <span class="ref Filter</span> which will still have <span class="ref Nodraw </span>
in it.  
in it.  
Type in <span class="ref">wall</span> and pick a wall texture.  
Type in <span class="ref wall</span> and pick a wall texture.  
<br>
<br>
<br>
<br>
<blockquote class="tip">
<blockquote class="tip
<strong>TIP ...</strong>
<strong>TIP ...</strong>


Line 200: Line 200:
</blockquote>
</blockquote>
</li><li> Double click on your fancy (for reference, I used <span class="ref">plaster/wallpaper002a)</span>,  
</li><li> Double click on your fancy (for reference, I used <span class="ref plaster/wallpaper002a)</span>,  
then, in the <span class="ref">Face Edit Sheet</span> click on  
then, in the <span class="ref Face Edit Sheet</span> click on  
<span class="ref">Mode: Lift and Select</span>. From the drop down click on  
<span class="ref Mode: Lift and Select</span>. From the drop down click on  
<span class="ref">Apply Texture and Values</span>.
<span class="ref Apply Texture and Values</span>.
<br>
<br>
<br>
<br>
</li><li>Press <span class="key">Z</span> on the keyboard with the cursor in the camera  
</li><li>Press <span class="key Z</span> on the keyboard with the cursor in the camera  
window, and you will be able to <u>left</u> click the texture onto each wall in turn.
window, and you will be able to <u>left</u> click the texture onto each wall in turn.
<br><br>
<br><br>
</li><li> Do the same thing, finding floor and ceiling textures.  
</li><li> Do the same thing, finding floor and ceiling textures.  
(Type floor or ceiling into the <span class="ref"> Filter </span>)
(Type floor or ceiling into the <span class="ref Filter </span>)
I used <span class="ref">concrete/concretefloor011a </span>for the floor and   
I used <span class="ref concrete/concretefloor011a </span>for the floor and   
<span class="ref">concrete/concreteceiling003a </span>for the ceiling.
<span class="ref concrete/concreteceiling003a </span>for the ceiling.
<br>
<br>
<br>
<br>
Line 221: Line 221:


<br>
<br>
Close the <span class="ref">Face Edit Sheet</span>  
Close the <span class="ref Face Edit Sheet</span>  
<br>
<br>
<br>
<br>
Line 227: Line 227:
<br>
<br>
<br>
<br>
</li><li> Click on the <span class="ref">Entity Tool</span>  
</li><li> Click on the <span class="ref Entity Tool</span>  
      <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/enttool.jpg" align="middle">
      <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/enttool.jpg" align="middle  
<br>
<br>
<br>  
<br>  
On the RHS of the editor you will see <span class="ref">Categories</span>  
On the RHS of the editor you will see <span class="ref Categories</span>  
and below it <span class="ref">Entities</span>. Then below that <span class="ref">
and below it <span class="ref Entities</span>. Then below that <span class="ref  
<u>O</u>bjects</span> and then <span class="ref">Info_player_start</span>.
<u>O</u>bjects</span> and then <span class="ref Info_player_start</span>.
<br>
<br>
<br>
<br>
<div align="center"> <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/entwindow.jpg"> </div>
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/entwindow.jpg </div>


<br>
<br>
If <span class="ref">Info_player_start</span> is not displayed, simply click the arrow  
If <span class="ref Info_player_start</span> is not displayed, simply click the arrow  
and pick it from the alphabetical list of entities.
and pick it from the alphabetical list of entities.
<br>
<br>
<br>
<br>
<div align="center"> <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/entlist.jpg"> </div>
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/entlist.jpg </div>
<br>  
<br>  
Back in the <span class="ref"> 2D </span> window, your cursor turns into an axe with a cross !!
Back in the <span class="ref 2D </span> window, your cursor turns into an axe with a cross !!
<br>
<br>
<br>  
<br>  
</li><li>The easiest way to place entities on the floor is in the <span class="ref"> 3D </span> window.  
</li><li>The easiest way to place entities on the floor is in the <span class="ref 3D </span> window.  
So click it onto the floor. You can still move it (in a <span class="ref"> 2d </span> window) if it is not in the right place, but it must not overlap  
So click it onto the floor. You can still move it (in a <span class="ref 2d </span> 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.
the floor, or your player will be stuck in the floor, in the game.
Line 256: Line 256:
Time for your reward.  
Time for your reward.  
<br>
<br>
</li><li>Click on <span class="fer">Run map</span> on the menu bar  
</li><li>Click on <span class="fer Run map</span> on the menu bar  
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/runmap.jpg" align="middle"> or press <span class="key">F9</span>
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/runmap.jpg" align="middle or press <span class="key F9</span>
<br>
<br>




You will be asked to name the map. Name it <span class="ref"> master_room </span>, or something,  
You will be asked to name the map. Name it <span class="ref master_room </span>, or something,  
<u> as we will use this basic room in later tutorials</u>, and click OK.  
<u> as we will use this basic room in later tutorials</u>, and click OK.  
<br>
<br>
Then the <span class="ref">Run Map</span> window opens  
Then the <span class="ref Run Map</span> window opens  
<span class="ref">Normal</span> should be selected in <span class="ref">Run BSP, Run  VIS</span> and  
<span class="ref Normal</span> should be selected in <span class="ref Run BSP, Run  VIS</span> and  
<span class="ref">Run RAD</span>.  
<span class="ref Run RAD</span>.  
<br>
<br>
<br>
<br>
<div align="center"> <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/runmapwin.jpg"> </div>
<div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/runmapwin.jpg </div>
<br>
<br>
<br>
<br>


</li><li>Type in <span class="key"> -dev -console </span>, in the additional game parameters window,  
</li><li>Type in <span class="key -dev -console </span>, in the additional game parameters window,  
then click <span class="ref"> OK </span>.
then click <span class="ref OK </span>.
<br>
<br>
If you are set up properly Hammer will compile your map and send it to HL2, and you should be in the  
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.
game in your room.
<br>
<br>
<br> </li><li>Before you leave the game press the keyboard key just below the <span class="key"> ESC </span> key,  
<br> </li><li>Before you leave the game press the keyboard key just below the <span class="key ESC </span> key,  
or the tilde  <span class="key"> ~ </span>key.  
or the tilde  <span class="key ~ </span>key.  
<br> The console window comes up. (this is why we put -dev -console in the parameters).  
<br> The console window comes up. (this is why we put -dev -console in the parameters).  
<br> This is one of the places you should look for errors in your map, if you have a problem.
<br> This is one of the places you should look for errors in your map, if you have a problem.
<br>
<br>
<br>
<br>
<br> <div align="center"> <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/console.jpg"> </div>
<br> <div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/console.jpg </div>
<br>
<br>
<br>
<br>
</li><li>OK exit the game. You are dumped back into Hammer.
</li><li>OK exit the game. You are dumped back into Hammer.
<br>
<br>
You will see here the <span class="ref"> Compile Process Window </span>, open it up and scroll through.
You will see here the <span class="ref Compile Process Window </span>, open it up and scroll through.
This is another place you can find why there might be errors in your map.
This is another place you can find why there might be errors in your map.
<br>
<br>
<br> <div align="center"> <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/compile.jpg"> </div>
<br> <div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/compile.jpg </div>
<br>
<br>
<br>
<br>
Line 303: Line 303:
</li><li>Let's put some light in.
</li><li>Let's put some light in.
<br>
<br>
</li><li>Click on the <span class="ref"> Entity Tool </span>  
</li><li>Click on the <span class="ref Entity Tool </span>  
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/enttool.jpg" align="middle">
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/enttool.jpg" align="middle
</li><li>Open the <span class="ref"><u>O</u>bjects </span>drop down menu  
</li><li>Open the <span class="ref <u>O</u>bjects </span>drop down menu  
and find the <span class="ref">Light</span> entity  
and find the <span class="ref Light</span> entity  
<br> <div align="center"><img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/lightent.jpg"></div>
<br> <div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/lightent.jpg </div>
<br>
<br>
</li><li>Put the <span class="ref">Light</span> entity in the middle of the room, roughly.
</li><li>Put the <span class="ref Light</span> entity in the middle of the room, roughly.
<br>
<br>
</li><li>Click on Run map on the menu bar  
</li><li>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</span>
<img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/runmap.jpg" align="middle or press <span class="key F9</span>
<br>
<br>
</li><li>Click OK.
</li><li>Click OK.
Line 325: Line 325:
<br>
<br>
<br>
<br>
<hr width="85%" size="1">
<hr width="85%" size="1  
<br>
<br>
<div align="center">
<div align="center  
<b>
<b>
<u><a name="end">Hollowing vs Making Walls Separately.</a></u>
<u><a name="end Hollowing vs Making Walls Separately.]</u>
</b>
</b>
</div>
</div>
Line 343: Line 343:
<br>
<br>
Probably best to only use hollow where simple cube shapes are involved.(no doubt someone can  
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 <a href="?page=links&amp;PHPSESSID=d50bbc8e15612551d0eb10d5f6efb683">links</a>
comment on this, and the forums will give more discussion (see [?page=links&amp;PHPSESSID=d50bbc8e15612551d0eb10d5f6efb683 links]
page)See also <a href="?page=workshop&amp;action=view&amp;item=5&amp;PHPSESSID=d50bbc8e15612551d0eb10d5f6efb683">here</a>.
page)See also [?page=workshop&amp;action=view&amp;item=5&amp;PHPSESSID=d50bbc8e15612551d0eb10d5f6efb683 here].


<br><br><div class="VMF" align="center"><a href="tutorials/1/master_room.zip?PHPSESSID=d50bbc8e15612551d0eb10d5f6efb683">Download the File : master_room.zip (1.266kb)</a></div><div align="center"><br>Click to <img src="/web/20060625142302im_/http://halfwit-2.com/images/laughing5.gif" align="middle"> <a href="https://web.archive.org/web/20060625142302/http://www.halfwit-2.com/phpbb/viewtopic.php?t=49">Comment</a> <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"> <a href="https://web.archive.org/web/20060625142302/http://www.halfwit-2.com/phpbb/viewtopic.php?t=40">Complain</a> <img src="/web/20060625142302im_/http://halfwit-2.com/images/mad.gif" align="middle"><br></div><br><div class="VMF">The next tutorial is <strong>"2. A Room with a Light (Updated)"</strong> and can be found <a href="?page=tutorials&amp;id=2&amp;PHPSESSID=d50bbc8e15612551d0eb10d5f6efb683">here</a>.</div><br><br><a href="#top">Return to the top of the page
<br><br><div class="VMF" align="center [tutorials/1/master_room.zip?PHPSESSID=d50bbc8e15612551d0eb10d5f6efb683 Download the File : master_room.zip (1.266kb)]</div><div align="center <br>Click to <img src="/web/20060625142302im_/http://halfwit-2.com/images/laughing5.gif" align="middle [https://web.archive.org/web/20060625142302/http://www.halfwit-2.com/phpbb/viewtopic.php?t=49 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 [https://web.archive.org/web/20060625142302/http://www.halfwit-2.com/phpbb/viewtopic.php?t=40 Complain] <img src="/web/20060625142302im_/http://halfwit-2.com/images/mad.gif" align="middle <br></div><br><div class="VMF The next tutorial is <strong>"2. A Room with a Light (Updated)"</strong> and can be found [?page=tutorials&amp;id=2&amp;PHPSESSID=d50bbc8e15612551d0eb10d5f6efb683 here].</div><br><br>[#top Return to the top of the page
</a>
]

Revision as of 12:23, 31 May 2024


<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


  1. Open Hammer

  2. Click on <span class="fer file | new
  3. 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
  4. 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

  5. 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


  6. Note that the program shows you the size of the room (length and width) as you draw it. (512 x 512 is good)

  7. 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


  8. 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.

  9. 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="tip

    No 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.

  10. Double-click on the <span class="ref Nodraw texture that comes up.

  11. The texture window closes and returns you to the editor. <span class="ref Nodraw is in the texture pane.

  12. Press enter.

  13. You have now made a solid cube in the editor: 512 x 512 x 128.

    <span class="ref THIS IS A BRUSH

  14. 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)

  15. 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.

  16. 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.

  17. 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

  18. 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


  19. 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.
  20. 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.

  21. 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.

  22. 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.

  23. 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


    If <span class="ref Info_player_start is not displayed, simply click the arrow and pick it from the alphabetical list of entities.

    <div align="center <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/entlist.jpg


    Back in the <span class="ref 2D window, your cursor turns into an axe with a cross !!

  24. 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.
  25. 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



  26. 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.

  27. 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



  28. 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.

  29. Let's put some light in.
  30. Click on the <span class="ref Entity Tool <img src="/web/20060625142302im_/http://halfwit-2.com/tutorials/1/enttool.jpg" align="middle
  31. 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


  32. Put the <span class="ref Light entity in the middle of the room, roughly.
  33. 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
  34. Click OK.

  35. 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

]