TrenchBroom Help - Getting Started

## Getting Started

TrenchBroom allows you to create and edit Quake 1 maps entirely in 3D. Many advanced features make editing geometry and entities as well as camera navigation easier than in other tools. Find out more about TrenchBroom's features by browsing this document.

### Overview

TrenchBroom's map document window

The above screenshot displays TrenchBroom's map document window. The main elements are the 3D view in which your map is rendered and in which you perform most of your editing with the mouse. At the bottom of the 3D view you can see the console where TrenchBroom will print information about what is happening in the editor. The inspector on the right of the window has the following tabs:

- Entity - Here you can edit the properties of the currently selected entities as well as browse the available entity types.
- Face - In the face tab you can edit the properties of the selected faces and browse the available textures.
- View - This tab allows you to filter objects by type or by name. You can also change the rendering modes here.

### Setting the Quake Path

To allow TrenchBroom to find entity models, the path to the Quake folder must be set in the preferences window. Bring up the preference window (
) and set the Quake path by clicking on the Choose button.

TrenchBroom's preferences window

### Creating, Opening and Saving Maps

To create a new, empty map file, choose
from the menu. This will create a new empty map file and open a new editor window.

You can open an existing map file by choosing
from the menu. TrenchBroom can open standard Quake maps as well as maps in Valve's 220 map format. However, since TrenchBroom does not fully support the 220 map format, there will be misaligned textures in such maps.

To save your map file, choose
. If you want to save your map with a different file name, choose
.

### Entity Definition Files

Entity definition files and textures are loaded into TrenchBroom using the Map Properties dialog, which you can bring up by choosing
from the menu.

TrenchBroom's map properties window

In the upper section of the dialog, you can select one of the builtin entity definition files (such as Quake.def). You can also load an external file by selecting the Choose... option from the dropdown list. In addition, you can choose one additional mod directory from within your Quake installation which is searched for models. The pak files in the id1 directory are always searched for models, even if id1 is not selected in this dialog.

### Adding Texture Wads

Open the Map Properties dialog by choosing
from the menu. In the middle section of the dialog, you can manage texture wad files. To add a texture wad, click on the + button. To remove texture wads, first select them in the list and then click on the - button. To change the order in which textures are loaded from the wad files, use the triangle buttons to move texture wad files up and down. The textures are loaded from top to bottom, and textures overwrite previously loaded textures with the same name. For example, if both "quake.wad" and "rtz.wad" contain a texture called "trim1", the editor will use the one from "rtz.wad" because it is loaded later.

The paths to texture wads and external entity definition files can either be stored as absolute or as relative paths. A relative path can be relative to the current map file (if it has already been saved), to the application's executable or to your Quake installation. You can set this whenever you add an external entity definition file or a texture wad.

### Setting the Plane Point Format

Open the Map Properties dialog by choosing
from the menu. In the bottom section of the dialog, you can set TrenchBroom to force integer plane points. This affects how the points that define a brush plane are stored in the map files. The two options are floating point coordinates (the default, unchecked) and integer point coordinates (checked). If your compilers supports floating point coordinates, you should leave this setting alone, as it gives you more freedom when editing the vertices of brushes. If your compiler does not support floating point coordinates, you should set it to "Force integer plane points".

In general, if you find that geometry in-game does not look the way it did in-editor, you should try turning this on and re-compiling to see if it helps. Only older compilers do not support floating-point plane coordinates though, so this should rarely be an issue.

#### What are planes and what does this setting really do?

While Trenchbroom and all other editors represent brushes are convex shapes with faces and vertices, in actuality, brushes are defined as a set of planes via 3 points, and their edges are resolved by getting the intersections of those planes during compile time. ID chose to use this method because it reduces the filesize and also makes compiling faster. These reasons are of course no longer relevant now as computers are more than fast enough to perform the faces to planes conversion on the fly.

Planes are represented with 3 co-linear points (in other words, all 3 of those points are on the plane). Because of this, it is possible for a brush in the editor which has non-integer vertices to have integer plane-points.

When this option is enabled, once the user leaves vertex mode after performing vertex manipulations on a brush(es), Trenchbroom will rebuild those brushes from their plane definitions to ensure that editor and game engine will look the same.

Trenchbroom will try its best to make sure the rebuilt faces are as close to identical as the original was, but this is not always possible and as a result, occasionally, vertices will shift when leaving vertex mode.