TrenchBroom Help - Working With Textures

## The Face Inspector

This is where all texture information is displayed. Here, you can select which texture to apply to the selection as well as the texture's offsets, rotation and scaling.

### Texture Alignment Section

This part of the Face Inspector is where texture alignment is handled. On the left is a large preview of the texture and on the right you can modify the offset, scale and rotation of the current selection (see this section on face selection for how to control this). You can enter values directly, or you can use the spinner controls to increment/decrement the values. The intervals of these spinners have default values but change based on conditions.

Texture alignment controls in the face inspector.

- For texture offsets, clicking the spinner buttons will offset the texture by the current grid size. Pressing
  while clicking the spinner will offset the texture by 2X the grid size. Pressing
  while clicking the spinner will always offset the texture by 1 unit.
- For texture scaling, pressing the spinner buttons will scale the texture in increments of 0.1.
  increases this to 0.25 and
  reduces this to 0.01.
- For texture rotation, the default value of angle changes is 15°. Pressing
  increases this value to 90°.
  reduces this value to 1° increments.

The final control in this section is the Reset button. This buttons resets all offset, rotation and scale settings on the current selection to the default values of '0, 0' for offsets, '0' for rotation and '1, 1' for scale. This is useful when you want to get your brush's textures back to default values after performing operations on it with texture lock enabled. It does not modify the textures applied to the selections, so you can use this button on selections that contain multiple different textures.

All of the previously documented controls work either in face selection mode, or brush selection mode. When modifying textures in brush selection mode, this is the only way of doing so.

### Texture Browser

This is where textures from all the WAD files currently in use are displayed.

Texture browser.

At the very top of this section are options that control how the textures are displayed in the browser.

The first control on the left is a drop down list that allows you to sort textures either by Name or by Usage. Sorting by Name is fairly simple, it sorts the textures alphabetically. Sorting by Usage is a little more interesting and sorts textures based on how often they are used in the map. A common wall texture therefore appears first in the list while the more rarely used textures appear near the bottom (and unused textures are last). This is extremely useful at the beginning of a map where you will need the entire wad open, and are still in the process of assembling your 'palette' of textures.

The next control, Group, is a toggle button. It changes the texture browser to display textures grouped together based on what WAD file they belong to (the wad files are sorted based on the order they are loaded).

The third control, Used, is another toggle button. When enabled, this filters out textures that are not used in the map. This is very useful when you are satisfied with the current texture palette and no longer need to add new ones into the mix. This ensures only textures already in the map are available for selection.

The final control is a search box that dynamically filters textures based on their name. If you are looking for liquids, typing "*" will show only textures who's names start with the "*" character, for example: "*water1, *water2, *lava". You could also filter with "wat" which would return only "*water1, *water2". The little X button on the right will clear the currently typed filter.

## Keyboard Texture Application Shortcuts

Keyboard shortcuts exist for texture offset and rotation and greatly speed up texture alignment. With practice, you may never need to use the textbox controls and will do all of your texture alignment purely in the 3D Viewport. Of note: These shortcuts are ONLY available in face selection mode. Attempting to use these shortcuts when in brush selection mode will result in brush translation and brush rotation operations instead!

### Texture Offset

You can offset textures up, down, left and right with the arrow keys
.

As with the spinner controls detailed previously, the offset is based on the current grid size and modifier keys can be used to increase or decrease the offset amount.
offsets textures by twice the current grid size and
offsets textures by 1 unit.

Texture alignment shortcuts.

### Relative Offsets

Unlike other editors, when using keyboard shortcuts texture offsets are applied relative to the camera. The example image to the left shows what this means: because of the placement and viewing angle of the camera, pressing the
key would actually cause the X alignment offset to increase by 1 whereas in other editors, this would cause the Y alignment offset to decrease by 1.

What this means is that texture alignment in Trenchbroom is intuitive and reactive to what you are looking at. You do not need to guess what texture axis is what, only to press the key that would move the texture in the direction that you would like it to move.

### Texture Rotation

For rotating textures, the
and
keys rotate the texture clockwise and counter-clockwise at 15° intervals. As with the keyboard commands for moving textures detailed previously, the
modifier key decreases the rotation angle to 1°.

## Mouse Texture Application Shortcuts

Trenchbroom has the ability to quickly paste a texture onto other faces. This is accomplished by first choosing a face with the texture you want by
on it. Now, by
on other faces, you can quickly apply the same texture to multiple faces without needing to first select the faces. If you want to apply this texture to the entire brush, simply
on any face of that brush. Note: Can only be done when a single face is selected.