Creating a Room

From Valve Developer Community
Revision as of 08:34, 28 August 2009 by TomEdwards (talk | contribs) (huh?)
Jump to navigation Jump to search

Template:Otherlang2

All maps consist completely of rooms one way or another. Outdoor areas are just rooms with skyboxes instead of normal ceilings. These rooms and boxes are very carefully sealed off from the black void surrounding them, as if there are any holes the map will not compile properly. A proper compile is essential for good framerate, as it controls the visibility of objects within levels, and lighting.

A simple one-room map consists of six brushes completely sealing what is within from the void outside. In order to make it quickly and easily, you’ll first need to know a few more easy brush handling techniques:

Moving brushes

Select the Selection Tool Hammer select.png and mouse 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 FourArrows.png, indicating the option to move the object.

Click and drag the brush to move the brush in any of the 2D views. Upon release, the brush will be moved to that position.

Click & drag in any 2D view to move a brush.


Cloning brushes

Shift+Drag to clone a brush.

Instead of having to create new brushes with the Block Tool Hammer block.png 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.


Deleting brushes

To delete a brush, select it with the Selection Tool Hammer select.png and press the Delete key on your keyboard.

Building the room

A 3D camera view (shaded textured polygons) with one wall brush selected. Note that the wall here is "between" or "supporting" the floor, ceiling, and neighboring walls.

In this next section, we will learn to build a room. Make sure it is a large room, as it will contain the whole level for this example. A total area of about 1024(L) x 1024(W) x 512(H) units will do fine.

  1. Using the Block Tool Hammer block.png, make a brush to use as the floor (about 1024L x 1024W x 64H).
  2. Using the Selection Tool Hammer select.png, Shift+drag to clone the floor brush, and move it upwards to create a ceiling of equal size to the floor.
    Shift+Drag to clone floor.

  3. Clone another one of the brushes and resize it so that it connects the floor to the ceiling. You can either have the wall brushes on the outside edges of the floor and ceiling brushes, or between (supporting) them. (see associated note)
    Connect the floor to the ceiling with a wall.

  4. Clone this wall brush and drag it to its opposite end.
  5. Again clone and resize a brush to create a third wall.
  6. Clone this brush to the opposite end of the room to create the final wall.
    Complete room with no leaks.
  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.
Alternatively, you can create a single brush the size of your room, then right click on it and select the Hollow option. Though quicker, this method makes it harder to size the room to your needs.
Note.pngNote:One thing to take into consideration when deciding to have your walls "lean" against your floor and ceiling or "support" them is regarding later texturing. If you design your walls to "support" your floor and ceiling, for instance, if the "height" of your room is 256 units, and your walls are 256 units tall, it will be straightforward to make a texture that is 256 units tall, rather than having to worry about the top and bottom edges of the walls that are being covered by the edges of the floor and ceiling.