Creating a Room: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Nesciuse moved page Creating a Room/en to Creating a Room without leaving a redirect: Move en subpage to basepage)
 
(66 intermediate revisions by 36 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. (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 "[[skybox]]es". These rooms and boxes are very carefully sealed off from the black void surrounding them to greatly increase performance 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:
{{src|3.1}} maps are really just a series of rooms. Outdoor areas are rooms with [[skybox]]es instead of normal ceilings.


==Moving Brushes==
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.
To move a selected brush, select the '''Selection Tool''' and put the mouse pointer over the brush in one of the 2D views, staying clear of the corner handles. The pointer will change into four arrows pointing in all four directions, indicating the option to move. Now, click and drag the brush to where you want it in one of the 2D views. As you release the mouse button, the brush will be moved to that position.
3retetgete 45tt 454t54t54t54 45y54


==Cloning 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.
Instead of having to create new brushes with the '''Block Tool''' every time, you can make a copy of 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.


Once you learn this technique, you will rarely have to use the '''Block Tool''' to create basic brushes -- you will just clone one of the existing brushes when you want a new one.
# 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>


==Deleting Brushes==
{{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.}}
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==
{{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.}}
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 with the '''Block Tool'''.
# Using to the '''Selection Tool''', <Shift>-drag to clone the floor brush, and move it upwards to create a ceiling of equal size as the floor.
# Clone another 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.
# Clone 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 clone and resize a brush to create a third wall, covering the gap between the floor, the ceiling and the two walls.
# Clone this brush to the opposite end of the room to create the final 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]].
{{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.