This article relates to the game "Counter-Strike 2". Click here for more information.
This article relates to the software/tool "Counter-Strike 2 Workshop Tools". Click here for more information.
This article relates to the game "Dota 2". Click here for more information.
This article relates to the SDK/Workshop Tools for "Dota 2 Workshop Tools". Click here for more information.
This article relates to the game "Half-Life: Alyx". Click here for more information.
This article relates to the workshop tools for "Half-Life: Alyx". Click here for more information.
This article's documentation is for Source 2. Click here for more information.

Source 2/Docs/Level Design/Basic Construction/Mesh Editing 1

From Valve Developer Community
Jump to: navigation, search
English (en)中文 (zh)

Hammer's geometry tools have undergone a significant overhaul. The usage of brushes is no longer the primary building block to construct levels and instead it is all faces, edges, and vertices. This is very similar to how modeling software works except Hammer is organized and setup in such a way to make geometry construction quick and effective for level designers without the limitations of brushes.

Building Blocks

The basic Hammer 2 geometry editing controls.

Start Hammer with the Hammer icon in the Asset Browser. Create a new map with File > New.

The left-hand toolbar contains the basic tool modes, similar to previous iterations of Hammer. Select has several modes of operation and can be cycled through using Spacebar. It is also possible to directly enter these modes using the following shortcuts:

  • 1 Vertices
  • 2 Edges
  • 3 Faces
  • 4 Meshes
  • 5 Objects
  • 6 Groups


These can contain arbitrary collections of entities and meshes. They can be moved, rotated, and scaled just like a mesh or object can but instead will affect every object in the group.


Inside of a group contains objects and meshes. In this mode you can select the individual objects or meshes inside a group. Clicking on an entity such as a player_start will select it and you can manipulate the object on its own.


Meshes are the closest equivalent to the brushes in the previous iteration of Hammer. A mesh is composed of faces, edges, and vertices.


Also referred to as polygons or n-gons. A face connects edges together. A face cannot exist without an edge.


Edges border every face and are connected by vertices. A face can be split into smaller ones by adding edge. Combining or removing edges can create larger faces.


The smallest unit of a mesh is the vertex. This is the corner where an edge terminates. In Hammer it is not possible to have a free floating vertex, it must be attached to an edge and a face somewhere.

Not Brushes

Users familiar with the previous iteration of Hammer know the restrictions of brushes. With this new construction method those restrictions are removed. As an example these shapes are all meshes made with the basic construction tools and are valid meshes.

Creating Geometry

Basic Blocks

A basic block.
  1. Click the Block Tool icon on the left hand side.
  2. Check that Geometry Type: block is selected in the Tool Properties tab.
  3. In the 3D view, Looking roughly down on the grid, drag out a rectangle. Depending on how fine the grid is set it will automatically grow into a fully-3D cuboid.
  4. Drag the red, green and blue controls to adjust its size.
  5. Press Enter when done.

Camera Control

  1. Click on the 3D view and do a Shift+Z to expand it to full-size.
  2. Adjust your view by clicking and holding the RMB button on the 3D view. Move the mouse around for a "game-style" mouselook. Release the right mouse button to stop.
  3. Again keeping with the game theme, "WASD" controls are present to move the viewpoint around in the world.

Basic Transformations

Transform tools are the basic tools for manipulating meshes. These tools are accessible via the toolbar to the left but are most quickly accessed via keyboard shortcuts:

  • Scale E
  • Rotate R
  • Translate T
Note.pngNote:If you are familiar with other 3D modelling programs this will be familiar except that T is translate due to W being taken for navigation.

Mesh Editing


Extruding a face with the Shift key.

To create a slightly more interesting mesh, the mesh components can be manipulated.

  1. Click the mouse-cursor-like Selection tool in the left-hand toolbar, then ensure Faces is selected in the top toolbar.
  2. Click on one of the faces of the mesh in the 3D view.
  3. Press Translate, T.
  4. A translation "gizmo" will appear at the center of the selected face. Drag the arrows and squares on the gizmo to move it around.

To create even more geometry based on existing geometry extrusion can be used to quickly generate more interesting shapes.

  1. With the face selected and translate mode active, hold down Shift and drag a control to extrude the face outwards.
  2. Do the same with some of the other faces on the mesh.


Moving edges with the Transform tool.

The other selection methods can be manipulated in the same manner as above.

  1. Click the Edges button on the top toolbar.
  2. Click on one of the edges on your mesh to select it.
  3. Press T to translate.

Move the edge around. Use this to create some slopes in your mesh.

  • You can select multiple things by holding down Shift and clicking on subsequent items, or remove things by holding down Ctrl and clicking.
  • You can also select multiple things in one go by holding down the LMB and dragging the cursor over the components.
Tip.pngTip:You can also cycle between selection modes by pressing Space. The mouse cursor will change to indicate the current mode. The number keys can also be used to go directly to a specific selection type.

Edge Rings and Loops

Selecting an edge ring with the G key.

It's possible to make this mesh even more complex by manipulating edge rings and loops. Note that a "ring" or "loop" is a continuous set of edges that span the length of the surface of a mesh.

  1. In Edges selection mode, click one of the edges on the mesh.
  2. Press G. This should select a edge ring of edges going around the mesh.
  3. Press Connect for the list of Edge Editing tools on the left.

Note: If the Edge Editing tools are not visible enable the 'Tools Properties' view under 'View -> Toolbars'.

This will create a new loop of edges going through the mid-points of all those previously selected edges, called an edge loop. To select any edge loop, double-click on one of its edges, or press L to generate an edge loop selection from the currently selected edges. It will go through each edge and make a best guess as to which way the loop goes. Some complex meshes will have few useful loops; other meshes will have plenty of loops. You can move that loop around to significantly distort your mesh - a more subtle example would be adding loops along a cylinder in order to add some slight bends to it. You can select one of the new faces to extrude new sections of your mesh.

Rotate and Scale

A mesh with a rotated and scaled face.

Continue exploring selecting faces, edges and vertices and translating them around.

Use can also use the rotate and scale tools to further mangle the mesh but yet this is still will be considered a valid mesh shape. There are very few limitations on the shape of a mesh.

Next: Mesh Editing 2