Texturing tutorial

This document is broken up into 8 sections outlining the different aspects of texturing and use in maps for q3 Urban Terror.

> Proper tiling
> The high pass filter
> Trim technique
> Advanced tiling
> Dirtying textures
> Misc. tips/tricks
> Map color theory
> Simple shaders (shiny windows)

Trim technique:

The next method I am going to talk about is what I call the "trim method" because I use it for horizontal bands of trim, either at the top or bottom of buildings to indicate wear of different kinds. Drips and water damage, or just dirt that tends to accumulate at the bottoms of buildings where the walls meet the ground.

The first thing we do is grab our texture from the previous tutorials and find a new image that we want to use for the trim. In this instance I have the original photograph I based the last texture on that I am using. The photograph has a great dirty lower edge of the wall that would really help in my map.

New and improved wall texture from last tutorials


Start by selecting and cropping the part of the image you want. Remember to hold shift while selecting to get a perfect square. Now resize this image to the same size as your wall texture.

(Just a note, for most textures spread over a large area, 256x256 pixels is the best size. See the texture size portion of my miscellaneous tips/tricks tutorial for more information)

The bottom half of this texture will be used as a trim in a new texture

Now paste this new image into a new layer over top of your texture.

Then add a mask to the layer by clicking the button on the layers menu with the white circle on a grey rectangle. I have pointed a red arrow at it in the second picture. The layers menu should change on the second layer, with the white box to the right. That is the mask layer. Click the white box to select it.

The new texture on a new layer over my wall texture

Adding a layer mask

From here we want to select the airbrush, white as the foreground color and airbrush. Here I have chosen a soft airbrush, size 45 pixels. Experiment with different types of brushes to figure out what works best for you, but for me the softer edge helps fade in texture changes.

The object here is to paint in the mask layer. Masks work like this:

Black is areas where the layer shows thru at 0%, or not visible, while white is where the layer will be at 100%, or visible. Grey areas are somewhere in between. The layer mask right now is pure white, so the entire layer is visible.

First fill in the entire layer with black. In the layers menu you can now select either the image or the mask part of the layer by clicking on the small box preview in the layers menu.

Selecting the airbrush to paint in the mask

Here I have started to paint white on the lower edge of the top layer mask so that part of it starts to show through.

Continue this process until the dirty trim area you want fades into the main wall texture nicely. You may want to use several shades of grey that progressively get darker as you near the point where the texture has completely faded into the main wall texture.

Starting to paint in the mask

The texture mask fades nicely from white to black, adding the dirty trim to our existing texture.

From here we are going to want to flatten the texture by going to layer>flatten texture. Then you are going to want to run the offset filter and go thru the tiling process again.

This time however it will be a litle different. For tiling a texture such as this, there is no reason to have the texture tile vertically, only horizontally. So this time, just put in a horizontal value of about 125, to put the line in the middle of the 256x256 texture.

In this image, you can barely see the outline in the middle of the darker area. Use the clone stamp tool to fix up any horizontal tiling issues, then make sure to use the offset tool again with a negative value to line the texture back up to its original state.

Removing the tiling effect on the new dirty texture.

From here, these textures can be used in map creation. The key is knowing how to align the base wall texture to the wall trim texture.

In this first screenshot, I setup a new map and aligned the bottom wall texture the way I wanted it.

Next, I selected the top brush and right clicked the lower brush to set the top brush to the same texture and alignment as the lower texture. Then I opened up the surface inspector by pressing "S".

To finish it up, just change the texture path name to the base wall texture. In this instance, the texture is named "2.jpg", while the main wall is "1.jpg". By renaming the texture path, the horizontal and vertical shift stay intact. Since you built the trim texture off the main wall texture, when you use the same horizontal and vertical shift values, the main wall texture lines up perfectly with the lower trim texture.

This technique can be used in many ways, think of how real buildings get worn, usually either at the upper or lower edge of walls - or in some cases both. Drips and water damage along the top, or where brick meets plaster on a lower edge. This technique can be seen in use all over the map ut_casa.

Next tutorial - Advanced tiling