TrenchBroom Help - Working With Textures

## Solving Problems

### Finding Objects by Line Numbers

If the map compilers detect a problem with a map file, they often print a line number with the error message. To find the offending objects, select
from the menu and enter a space-separated list of line numbers. All objects matching these line numbers will be selected by the editor. If you would like to know the line number of the currently selected objects, select
from the menu.

### Leaks and Pointfiles

During mapping, you may inadvertently leave holes that lead outside of the map into the void. These are known as leaks. You will not be able to properly compile and vis your map until it is fully sealed from the void.

Your QBSP tool already has some functionality built in that facilitates in finding leaks, but there is an editor side as well. When QBSP detects a leak, it generates a 'pointfile'. This is a file with the .pts extension and provides a way for a map editor to communicate the QBSP tool's findings. In order to make use of this file, you must place it alongside the map file as it is loaded in Trenchbroom, so if you have a separate folder where you compile your maps, you will need to copy the .pts file back into the map folder. Once this is done, use the Load Pointfile command (
) and Trenchbroom will draw a line which will help you find where the leak in your map is. You can use the
and
commands to navigate the camera along the line.

If you open the file menu again, you will notice that the
command has been replaced with the
command. You can use this command to reload the pointfile after making changes to your map and recompiling.

Once all leaks have been closed and you are done with the pointfile line, you can use the Unload Pointfile command (
) to stop displaying the line in the editor.

### Texture alignment not matching in-game

If your texture alignment looks different in Quake then it does in Trenchbroom, you may be using a QBSP compiler that has the wrong texture projection. Usually QBSP compilers have a switch that lets you toggle between the compiler's native projection axes and the standard one used by Quake and Radiant editors.

- If you are using txQBSP, or a compiler based on txQBSP (ie: Aguirre's QBSP) you must NOT supply the -altAxis argument for TrenchBroom.
- In Tyrann's tools, you must supply the -oldAxis argument for TrenchBroom.

Check your compiler's documentation if it is not listed here!

### Dropped Brushes

When loading a map that was made in another editor, you may see this error: Skipping malformed brush at line # where # is a line number in the map file. This means Trenchbroom was unable to parse a particular line in the map file and therefore skipped the brush entirely. Check the map file at the line in question to find out the brush number and then see if you can load the brush into another editor to be sure that it is correct.

### Fixing Vertex Misalignments

During the course of editing, you may end up with vertices which have fractional coordinates. Sometimes this will be intentional, where you disabled grid snap, and other times it could be a product of floating point imprecision on the part of the editor. Regardless, there will be times when you want to snap the vertices of a brush to integer coordinates or in other words, to round off the vertex coordinates of a brush or multiple brushes. Trenchbroom provides this functionality in two ways: Correct Vertices and Snap Vertices.

- Snap Vertices

  Accessible through the menu with:
  , this command will snap vertices in the current selection to integer coordinates no matter their offsets.

Note that this function works with multiple brushes in the selection, but it is unavailable if entities are selected.

### Automatic Backups

TrenchBroom makes automatic backups of your map roughly every 10 minutes. This protects you from losing a lot of work if the editor crashes. You can find the backup map files in the sub folder autosave within the folder where your map file is stored. The backups are numbered in ascending order, i.e. the latest backup is the one with highest number. Trenchbroom will keep up the last 30 autosaves before it begins overwriting the oldest ones.