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.)
m (Nesciuse moved page Creating a Room/en to Creating a Room without leaving a redirect: Move en subpage to basepage)
 
(74 intermediate revisions by 39 users not shown)
Line 1: Line 1:
[[Category:Level Design Tutorials]]
{{LanguageBar}}
 
{{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.
<br clear="both" />
==Making a hollow room==
First, make sure the brush is still selected.
[[Image:hammer_makehollow.jpg|350px|thumb|right|The Make Hollow command.]]
Now select '''Make Hollow''' from the '''Tools Menu'''.
We can use this to make a hollow room out of the single solid brush we've made.
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.
Instead of drawing the six brushes it usually takes to make a room, you can do it with one brush and the hollow command.
{{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">
[[Image:hammer_setwallwidth.jpg|frame|left|Set the wall width for the Make Hollow command.]]
The '''Hollow''' dialog appears.
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">
{{src|3.1}} maps are really just a series of rooms. Outdoor areas are rooms with [[skybox]]es instead of normal ceilings.
[[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">
The inside of the rooms must be completely sealed off from the black “void” surrounding them; if there are any holes [[Leak|the map will not compile properly]]. A proper compile is essential for good performance, as it controls the visibility of objects within levels, and for proper lighting.


[[Image:hammer_ungroup.jpg|frame|right|Ungroup the hollowed room to separate the brushes.]]
We will now create a room within which the rest of this tutorial series will take place. It will be 1024L×1024W×512H units large, which is quite big, and will consist of six brushes.


Select '''Ungroup''' from the '''Tools Menu'''.
# Using the {{hammer block}}, make a brush to use as the floor. It should be about about 1024L×1024W×64H.
# Using the {{hammer select}}, drag it into position if you are not happy with where it is already. The pointer will change into four arrows pointing in all directions [[File:FourArrows.png|link=]], indicating the option to move the object. {{tip|To delete a brush, select it and press {{key|Delete}}.}}
# In the side (X/Z) or front (Y/Z) grid view, and again using the {{hammer select}}, {{key|Shift}}+drag the brush to “clone” it. Move the mouse upwards while dragging so that the new brush forms a ceiling directly above the floor. If you get the position wrong, just drag the new brush as you did in step two. If you accidentally move the floor instead of cloning it, press {{key|Ctrl+Z}} to go back a step. {{note|In some CAD tools, a “cloned” object is linked to the original object. This is ''not'' the case in Hammer.}} <p>[[File:Hammer floorCeiling.png|frame|none|'''3:''' Create a ceiling by cloning the floor.]]</p>
# Clone another one of the brushes and [[Basic Construction#Resize, Rotate, & Skew|resize]] it so that it connects the floor to the ceiling. It is better for texturing if the brushes “touch corners” instead of being flush against each other, but ultimately it doesn’t matter in what manner they touch so long as there is no gap between the inside of the room and the outside. <p>[[File:Hammer wall.png|frame|none|'''4:''' Connect the floor to the ceiling with a wall.]]</p>
# Clone this wall brush and drag it to the other side of the room to form the opposite wall.
# Switch from whatever side view you were using to the other one, and repeat steps four and five to create the remaining two walls.
# Check for any gaps. Make sure the room has been completely sealed. If you’ve been designing your room on a relatively large grid scale (e.g. 64 units), then any gaps will be apparent. Mouse-over the 3D view window and press Z to enter mouselook mode to carefully inspect your room. <p>[[File:Hammer roomEnclosed.png|frame|none|'''7:''' The complete room, with no leaks.]]</p>


This separates the pieces of the hollowed room into separate brush objects that can be individually selected and manipulated.
{{tip|You can also make a room by creating a single brush to the correct size, then right-clicking on it and selecting the [[Hammer Make Hollow Dialog|Hollow]] option. This method is quicker, but once you start creating more complex maps becomes inflexible.}}


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">
{{note|If you try to compile your map now, [[VBSP]] will report that it has a leak. This is because there is nothing in it, not because of any gaps! The message will go away when the room has entities inside it.}}


Now onto the next part of the tutorial, [[Applying Textures]].
{{Navbar|Basic Construction|Your First Map|Applying Textures}}
[[Category:Level Design]]

Latest revision as of 06:03, 12 July 2024

English (en)Deutsch (de)Français (fr)Magyar (hu)日本語 (ja)Português do Brasil (pt-br)Русский (ru)中文 (zh)Translate (Translate)

Source maps are really just a series of rooms. Outdoor areas are rooms with skyboxes instead of normal ceilings.

The inside of the rooms must be completely sealed off from the black “void” surrounding them; if there are any holes the map will not compile properly. A proper compile is essential for good performance, as it controls the visibility of objects within levels, and for proper lighting.

We will now create a room within which the rest of this tutorial series will take place. It will be 1024L×1024W×512H units large, which is quite big, and will consist of six brushes.

  1. Using the Block tool Hammer block.png, make a brush to use as the floor. It should be about about 1024L×1024W×64H.
  2. Using the Selection tool Hammer select.png, drag it into position if you are not happy with where it is already. The pointer will change into four arrows pointing in all directions FourArrows.png, indicating the option to move the object.
    Tip.pngTip:To delete a brush, select it and press Delete.
  3. In the side (X/Z) or front (Y/Z) grid view, and again using the Selection tool Hammer select.png, Shift+drag the brush to “clone” it. Move the mouse upwards while dragging so that the new brush forms a ceiling directly above the floor. If you get the position wrong, just drag the new brush as you did in step two. If you accidentally move the floor instead of cloning it, press Ctrl+Z to go back a step.
    Note.pngNote:In some CAD tools, a “cloned” object is linked to the original object. This is not the case in Hammer.

    3: Create a ceiling by cloning the floor.

  4. Clone another one of the brushes and resize it so that it connects the floor to the ceiling. It is better for texturing if the brushes “touch corners” instead of being flush against each other, but ultimately it doesn’t matter in what manner they touch so long as there is no gap between the inside of the room and the outside.

    4: Connect the floor to the ceiling with a wall.

  5. Clone this wall brush and drag it to the other side of the room to form the opposite wall.
  6. Switch from whatever side view you were using to the other one, and repeat steps four and five to create the remaining two walls.
  7. Check for any gaps. Make sure the room has been completely sealed. If you’ve been designing your room on a relatively large grid scale (e.g. 64 units), then any gaps will be apparent. Mouse-over the 3D view window and press Z to enter mouselook mode to carefully inspect your room.

    7: The complete room, with no leaks.

Tip.pngTip:You can also make a room by creating a single brush to the correct size, then right-clicking on it and selecting the Hollow option. This method is quicker, but once you start creating more complex maps becomes inflexible.
Note.pngNote:If you try to compile your map now, VBSP will report that it has a leak. This is because there is nothing in it, not because of any gaps! The message will go away when the room has entities inside it.