Back to tutorial index page

2 point clipping, brush work and basic patch work


To begin we will cover the basics of clipping brushes. Clipping, or cutting brushes is the primary means of shaping geometry available to the level designer and therefore is perhaps the most important tool to get to grips with.

As with most functions in the editor it is best to keep the grid snap as high as possible, once again keeping thing neatly aligned to the grid will save a lot of frustration. Lets get underway then. As illustrated in fig.1, draw out a brush. Size here isn't really an issue.

fig. 1

With the brush selected hit x to start the clipper tool or press the clipper button on the tool bar (15th from left)

Click once on the top left hand corner and then once on the bottom right. Your brush should now look like the one in fig.2


Now you have 2 choices, hit x to cancel the clip or enter to accept. If you hit enter your brush will look like the one below in fig. 3


Easy isn't it! You can clip through multiple brushes stacked on top of each other too. Remember though, keep thing aligned to the grid!

Lets talk about using the clipper tool for building levels tidily and for optimal performance in game. Imagine you want to build a wall with a hole through it. Well you could do it as shown in fig. 4 below


The green dots are vertices. To bring up vertex editing mode select the brushes and hit v. Don't worry about what vertex editing does just at the moment we'll come to that later. There are a few reasons why fig.4 is poor brush work. When textured you will have textured faces hidden under other brushes. This is called over draw. Over draw is wasteful. In game Q3 will be drawing faces the player could never see. In a large map over draw can slow things down considerably. The other reason fig.4 is bad goes back to those green dots, or vertices, or verts. Remember the world in game is rendered as triangles or tris. The verts in fig.4 link together to form tris. Compare the number of verts in fig.5 to those in fig.4.

Fig.5 represent good brush work. With the corners cut on an angle (or mitred) those angled face can be left textured in caulk and so not drawn in game. This eliminates over draw. Also we have cut the number of verts from 12 to 8. Big deal you might say, but in a large map every triangle counts!


It is important that brushes meet corner to corner, rather than a corner meeting along the edge of another brush. Where ever you end with a brush corner you get a vert, this vert has to meet another in game. Therefore if a corner meets the edge of another brush that brush will be split into more triangles. Figs 6 and 7 below show how our hole would be correctly incorporated into a simple corridor. Avoiding these t-junction errors takes some time but will help complicated levels run smoothly, so learning how to build for optimal performance from the word go is helpful.

We will return to the subject of t-junction errors a little later when looking at using patches.



Lets look at using curves or patches.

Using curves to good effect can really make your level stand out but there are some things to be aware off. Firstly they are not solid like brushes, this means that you can't seal the world off from the void with them. If the the patch forms part of your outer wall you will need to fit  caulk brushes behind it to stop leaks (see fig.15) Use the caulk texture as it isn't drawn in game, hence eliminating over draw and any chance of z-fighting (where more than 1 texture is drawn in the same place, causing an ugly mess in game). Secondly, patches use up a lot of tris, very quickly. Having a lot of patches can cause your map to run slowly!

Let's begin then.

Flip to y/x view. Draw out a brush. Here I've gone 192 units square. Go to the curve menu, select Endcap as in fig.8 below.


The brush will transform into an endcap. Keep it selected, rotate through the x axis 3 times (4th button from the left) and switch to z/x view. The endcap should look like the one in fig.9


Incorporating a curved archway like this into rectangular brushwork might be tricky...lucky for us we have the cap function. Select the endcap, go to curve menu and select 'Cap Selection' in fig.10


This brings up the cap menu as shown in fig.11. Although we have an endcap, select inverted bevel, not inverted endcap. The verts in inverted endcaps do not line up well with surrounding brushes and cause t-junction errors. Unlike t-junction errors with brushes, those caused by patches cause tiny holes that can be seen in game. These are known as sparklies.


Fig.12 below shows a capped endcap. Selecting inverted bevel will only cap 1 side, so you will need to clone and rotate the caps, then move into position.


The surrounding geometry is important when building the curve into your brushwork. Fig.13 below shows poor brush work. See how there are two brushes making up the right hand side of the arch. This will cause t-junction errors and therefore sparklies. Fig.13 shows the correct way to do it. Don't worry about texturing your new geometry yet, we'll come back to that in the next section.



Using bevels.

I'm sure you have seen curved corridors in Q3. Here's how it's done. In fig.15 I have pre-built a right angled corridor. I have textured it all, apart from the corner. Remember patches are not solid, so as stated earlier it is necessary to place solid caulk brushes behind them. I have left the floor and ceiling as caulk because we are going to use patches there also.



In fig.16 below we are getting ready to create a curved wall section. Draw out a brush the size of the area you want and in the desired texture, then go to the curve menu and select bevel.


The brush will become a curve. You will need to rotate it through the z-axis and move it into position....but wait it's all wire-frame! This is because the bevel in back to front. With the bevel selected press Ctrl i to invert it. Move the patch so it is exactly in place in the corner with the end resting right up against the ends of the textures wall brushes. Now to fit the texture. With the bevel selected hit shift s, this brings up the patch properties window (shown in fig. 17). Press natural. Does the patch texture now align with the wall texture? If not try rotating it 180 degrees by using the rotate step option.


Fig. 18 below shows another bevel being created to match the trim along the bottom of the wall. If we made one big bevel for the corner it would result in t-junction errors where the two brushes that make up each wall met the single edge of the bevel. Therefore it is necessary to stack bevels so that the edge of the bevel is exactly the same height as the brush it joins. The most simple method of creating the 2nd bevel is to clone the first and resize it the same way you would resize a brush, then move it into place. With the bevel selected click on the new texture and use patch properties to fit it as before.


Fig. 19 below shows another more advanced approach of altering the shape of a patch. Select it, then hit v to bring up vertex mode. By clicking over the little green dots you can select one or more vert and drag it into the required position. When vertex editing patches press Ctrl g after each move to ensure the verts are aligned to the grid.


Right, what about the floor and ceiling? We could just texture the visible sides of the brush, but the portion behind the bevel would never be seen, so this is wasteful. We are going to cap the bevel and place the cap directly on top of the caulk brush. Select the texture you want, select the bevel. Choose to cap the selection, then choose bevel (fig.20)


Deselect the bevel and top patch, or press Tab until you have selected the bottom cap. Delete this cap. Select the top cap (you may need to press Alt 6 to hide the caulk texture) and bring up the patch properties window (fig. 21). Hit cap to align the texture on the cap (You do this for aligning the texture on the caps we made in the earlier section also)


Clone the cap, retexture it as floor, invert it and position it on the floor, then align the texture as above

If you turn off caulk (Alt 6) your hall way will now look like the one below in fig. 22.


In the next tutorial we will cover detail and structural brushes, laying out an entire level and fitting geometry into the room we made in the first tutorial.