Creating a Room: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Moving the camera part to the new View Navigation chapter.)
(Rewrote the entire article, using a better method. Feel free to add pictures.)
Line 1: Line 1:
[[Category:Level Design Tutorials]]
[[Category:Level Design Tutorials]]
{{first room menu}}
{{first room menu}}
This is an continuation of the "[[Your First Half-Life 2: Deathmatch Room]]" tutorial. In this section, you'll learn how to make a room out of the brush you've created.
This is an continuation of the "[[Your First Half-Life 2: Deathmatch Room]]" tutorial. In this section, you'll learn how to make a room out of the brush you've created. (This article currently doesn't have any images because it has been completely rewritten. Feel free to add what you think is necessary, but remember that sometimes less is more.)
<br clear="both" />


==Making a hollow room==
==Sealed Rooms==
All serious maps consists completely of rooms one way or another. Even outdoor maps are surrounded by so called "[[skybox]]es". These rooms and boxes are very carefully sealed off from the black void surrounding them to greatly increase preformance and to enable something called vvis when compiling.
A simple room consists of six brushes: The floor, the ceiling and the four walls, completely sealing what is within from the void outside.


First, make sure the brush is still selected.
In order to make a room quickly and easily, you'll first need to know a few more easy brush handling techniques:


[[Image:hammer_makehollow.jpg|350px|thumb|right|The Make Hollow command.]]
==Moving Brushes==
To move a brush, put the mouse pointer over the brush in one of the 2D views, staying clear of the handles. The pointer will change into four arrows pointing in all four directions, indicating the option to move. To move the brush, hold the left mouse-button and drag the brush. As you release the mouse-button, the brush will be moved to that position.


Now select '''Make Hollow''' from the '''Tools Menu'''.
==Copying Brushes==
Instead of having to create new brushes with the ''Block Tool'' you can copy an already existing brush by holding down the <shift> key while moving the brush. The brush will remain in its place while the copy will end up at the position you <shift>-dragged the brush to.


We can use this to make a hollow room out of the single solid brush we've made.
==Deleting Brushes==
To be on the safe side, I'll teach you how to delete brushes as well: Just select a brush and press your <Delete> key. That's it.


It will create new brushes that are no different from the brush you drew earlier, they will instead make walls for a room. Make hollow is a helper designed to save you time.
==Building the Room==
 
When you feel confident with these techniques, let's build the room. Remember to not make it too small, as it will be the whole level for this example.
Instead of drawing the six brushes it usually takes to make a room, you can do it with one brush and the hollow command.
* Make a brush to use as the floor.
 
* <Shift>-drag the floor brush upwards to create a ceiling of equal size as the floor.
{{note|If the '''Make Hollow''' command is greyed-out, it means you accidentally de-selected the brush. Click on the brush in the '''3D View''' to select it again.}}<br style="clear:both">
* Copy one of the brushes and resize it so that it connects the floor to the ceiling, ''but only with its inner side''. This will not look pretty from the outside of the room, but if the room is completely sealed, the surfaces facing outward will not even be included in the compiled map.  
 
* Copy this wall brush and drag it to its opposite end, again making sure that it just "leans" against the floor and the ceiling, and not supporting it.
[[Image:hammer_setwallwidth.jpg|frame|left|Set the wall width for the Make Hollow command.]]
* Again copy and resize a brush to create a third wall, covering the gap between the floor, the ceiling and the two walls.
 
* Copy this brush to the opposite end of the room to create the fourth wall.
The '''Hollow''' dialog appears.
* Check for any gaps so that you are sure that the room has been completely sealed.
 
Change the value in the box from the default of '''"32"''' to '''"-16"''', which will create 16-inch walls for our room. Click '''OK''' when you are done.
 
The negative number will create the walls outside the brush you drew, it will leave the inisde of your room exactly the size you drew the brush.
 
Positive values create the walls inside yours brush and will make a smaller room than the brush you drew.
<br style="clear:both">
 
==Selecting and Ungrouping the room==
 
[[Image:hammer_selectiontool.jpg|frame|left|Pick the Selection Tool.]]
 
Pick the '''Selection Tool''' again.<br style="clear:both">
[[Image:hammer_selectbrush.jpg|350px|right|Left-click a object in the 3D View to select it.]]
 
Left-click the hollow room, so that it turns red, like in the image here. You've selected the room.<br style="clear:both">
 
[[Image:hammer_ungroup.jpg|frame|right|Ungroup the hollowed room to separate the brushes.]]
 
Select '''Ungroup''' from the '''Tools Menu'''.
 
This separates the pieces of the hollowed room into separate brush objects that can be individually selected and manipulated.
 
Ungrouping is generally advised because as you advance you will wish to edit the floor seperate to the rest of the room for example. This is difficult to do grouped and ungrouping now will save unexpected problems in the future when you select the room instead of the wall.<br style="clear:both">


Now onto the next part of the tutorial, [[Applying Textures]].
Now onto the next part of the tutorial, [[Applying Textures]].

Revision as of 03:13, 15 February 2006

This is an continuation of the "Your First Half-Life 2: Deathmatch Room" tutorial. In this section, you'll learn how to make a room out of the brush you've created. (This article currently doesn't have any images because it has been completely rewritten. Feel free to add what you think is necessary, but remember that sometimes less is more.)

Sealed Rooms

All serious maps consists completely of rooms one way or another. Even outdoor maps are surrounded by so called "skyboxes". These rooms and boxes are very carefully sealed off from the black void surrounding them to greatly increase preformance and to enable something called vvis when compiling. A simple room consists of six brushes: The floor, the ceiling and the four walls, completely sealing what is within from the void outside.

In order to make a room quickly and easily, you'll first need to know a few more easy brush handling techniques:

Moving Brushes

To move a brush, put the mouse pointer over the brush in one of the 2D views, staying clear of the handles. The pointer will change into four arrows pointing in all four directions, indicating the option to move. To move the brush, hold the left mouse-button and drag the brush. As you release the mouse-button, the brush will be moved to that position.

Copying Brushes

Instead of having to create new brushes with the Block Tool you can copy an already existing brush by holding down the <shift> key while moving the brush. The brush will remain in its place while the copy will end up at the position you <shift>-dragged the brush to.

Deleting Brushes

To be on the safe side, I'll teach you how to delete brushes as well: Just select a brush and press your <Delete> key. That's it.

Building the Room

When you feel confident with these techniques, let's build the room. Remember to not make it too small, as it will be the whole level for this example.

  • Make a brush to use as the floor.
  • <Shift>-drag the floor brush upwards to create a ceiling of equal size as the floor.
  • Copy one of the brushes and resize it so that it connects the floor to the ceiling, but only with its inner side. This will not look pretty from the outside of the room, but if the room is completely sealed, the surfaces facing outward will not even be included in the compiled map.
  • Copy this wall brush and drag it to its opposite end, again making sure that it just "leans" against the floor and the ceiling, and not supporting it.
  • Again copy and resize a brush to create a third wall, covering the gap between the floor, the ceiling and the two walls.
  • Copy this brush to the opposite end of the room to create the fourth wall.
  • Check for any gaps so that you are sure that the room has been completely sealed.

Now onto the next part of the tutorial, Applying Textures.