The Tarquin Extruder Builder Brush
I would like to show you a powerful and easy-to-use builder brush that everyone should know:
Yes, easy to use. No, really, once you get over the many options with strange and intimidating names, you will recognize this intuitive builder brush can save you a lot of time.
The Tarquin Extruder Builder Brush draws a polygon, whose vertices you place one by one, then extrudes it along a path made of key points you have entered, letting you make quick pipes, wires, borders or tunnels. It also makes texturing much easier by keeping a texture wrapped on the surfaces of the resulting brush.
The last version of the Tarquin Extuder Builder Brush was released by Tarquin in may 2001, and it is both ancient and widely unknown, like most custom UnrealEd tools. This is a shame and has to change. Though Tarquin declared it "still at the experimental stage" when it was last updated, it is perfectly stable and can be used with no risks.
Where to Find It and How to Install It ?
Since the demise of all the PlanetUnreal websites and the subsequent vanishing of Tarquin's website, the original links and tutorials by the creator of the tool itself are lost. Fortunately, the tools themselves are still widely available through various hosting sites. You can download the Tarquin Extruder Builder Brush at the bottom of this page, choosing the one corresponding to the game you want to use it with. The UT99 version works with UnrealEd 2.0, 2.1 and 2.2 but not with UnrealEd 1.0. It will work with Unreal if you are using the latest unofficial patch.
Once the file is downloaded and unzipped, put the BBTarquinExtrude.bmp file in System\editorres folder of your Unreal Directory, and the .u file into the \System folder. Then, open Unreal.ini, UnrealTournament.ini or UT2004.ini (or any other variation depending on the game you are using) with a text editor and search for the "EditPackages=" lines; there should be a bunch of those in the middle of the file, in the [Editor.EditorEngine] chapter. At the end of this list, add the line EditPackages=TarquinExtrudeBuilder, save and close.
This will tell UnrealEd to search and process the TarquinExtrudeBuilder.u file the next time you open it, and the tool will thereafter be available. Now, launch UnrealEd. The Tarquin Extruder Builder Brush (from now on abbreviated as TEBB), is available under the usual builder brushes as a purple snake-like tool.
How Does It Work?
Right-click on the tool to open the truckload of properties shown earlier. If you try left-clicking on it, you should receive a warning saying that you need at least two PathPoints. We will see why later.
The two most important properties of the TEBB are the ShapePoints and PathPoints lists. Each list can contain up to 16 (0-15) points to define a shape and a path along which to extrude it. Under these two are the ShapeFactor and PathFactor, both set by default to 64. These two parameters set how many Unreal units long "1" is in the lists. For example, drawing a square shape to be extruded along a path means you will need 4 points with coordinates along the lines of 000,100,110,010, each set of three numbers representing the coordinates of a vertex on the X, Y and Z axes.
In this case, a point with the coordinates X = 0, Y = 1, Z = 0 will be placed 64 units away from the brush's pivot on the Y axis if ShapeFactor is set to 64. Likewise, if the path calls for the shape to be extruded on "4" along the X axis, the shape will be extruded along 4 x 64 = 256 units. Of course, you can set non-integers as an input value, like 0.5 to move a vertex 32 units away instead of 64. It also means you can easily double of halve the scale of a brush by halving the ShapeFactor, or its path with the PathFactor.
The 0,0,0 point is the position of the pivot of the brush. Usually, the pivot will thus be blended with your first vertex (which is at coordinates 0,0,0 too by default), but you can also decide to put your first vertex on another position, with the pivot clearly distinguishable from it. It should not be very useful in most cases though.
Under the Factors is the ExtrudeType parameter. EX_ThirdWay and EX_Tangential seem more or less similar, but EX_Transational is quite different. Using Tangential and ThirdWay usually results in the shape being rotated appropriately to face the path, and then extruded. This means the shape will always be facing (at each point of its path) the next point, and each part of the "snake" will have the same width. Corners will also be nicely defined:
This image is taken in the top viewport. Though the shape is defined on the X/Y plane, the brush is rotated to face the direction of its path and drawn on an Y/Z plane instead. Notice how the bend is elegant and balanced, the shape itself always facing its next direction. Now, if we change this to EX_Translational:
It transforms into a chaotic mess of vertices and edges. Why? The shape is a trapezoid on the X/Y plane translated solely on the XY plane. If we analyse the brush, we can see that what we have is precisely what we asked for:
Notice in blue the three successive positions of the original shape which is translated but never pivoted or rotated. In order to have a better result, the shape should not be defined on the X/Y plane but on the Y/Z plane, so that it would face the direction of the first part of the path. Where the shape should bend, a translational extrusion will keep the same polygon and only translate it: move all of its points to the new position and link them to the previous stage as is. Tangential and ThirdWay, on the other hand, will bend the end of each section and allow the shape to be of equal width at each point. Most of the time, Tangential is preferable, but some cases could occur where Translational may come in handy.
Under the ExtrudeType, ShapeSource allows you to choose between 3 basic shapes: Square (with each vertex separated by 1, so adjust you ShapeFactor), Circle, a circle-like polygon with 8 edges, which can be used for tubes, pipes or tunnels, MrPointy, which is a complex shape made of two crossing arrows (better used as a way to remember which axis is X or Y or Z), and finally, Vectors, which lets you draw a shape by placing its vertices in ShapePoints. By default, this setting is set to SO_Square, so if your new shape seems to be ignored, take a look there. Right under it is PathSource. This important parameter defines the reference position for PathPoints. By default, this parameter is set to SO_Vect_Abs(olute); in this case, each PathPoint will be positioned relatively to the origin (the pivot) of your brush. SO_Vect_Rel(ative), on the other hand, means each PathPoint is relative to the previous PathPoint in the list:
As you can see here, the blue set shows three points with their coordinates relative to the origin of the brush (the 0,0,0 point): they use absolute coordinates. The second vertex is only "7" away from the origin on the Y axis, but the third is "12" away from the origin on the Y axis and "8" on the X axis. The red set has relative coordinates: each vertex is defined by the position of the previous one. The second vertex is still "7" away from the origin on the Y axis, but the last vertex is 8X and 5Y away from the previous vertex: its position is not determined by the position of the origin but by its predecessor's.
Both methods have pros and cons. Absolute coordinates allow you to adjust part of your brush without affecting other sections of it, while any change to any point in the relative system will change the position of all subsequent PathPoints. However, relative vectors are easier to calculate and handle. What system to use is a matter of opinion and situation.
PresetMetrics is an array which operates in conjunction with the ShapeSource parameter. When using the predefined Square shape, only the [0], [1], [2] and [3] fields are taken into account: [0] sets the breadth of the square on the X axis, [1] determines its width on the Y axis. These numbers are multiplied by the value of the ShapeFactor property to create the original polygon. PresetMetrics [2] and [3] are used to offset all vertices on the X and Y axis.
When using the Circle setup in ShapeSource, [0] is the number of sides of the full circle. Note however that going above 16 will give you increasingly mangled results. [1] is how many of these sides are actually used. This lets you create semi-circles (or a quarter of a circle, etc.); [2] and [3] are still offset settings on the X and Y axis, but now, [4] allows you to chose if the cylinder is "aligned" (1) or not (0). An "aligned" cylinder is built differently (you can try this on a normal cylinder to understand the effect).
ClosedPath is also a very important setting: if your shape has at least three PathPoints, you can set this property to true and the last PathPoint will automatically be linked back to the origin, creating a loop. If less than three PathPoints are used, the TEBB will refuse to build the brush.
MergeCoplanars is exactly what it says on the tin: say you have a long extruded tunnel with no height variation; the floor will be made of as many coplanar faces as there are sections of the path. This parameter, if set to true, will merge these faces into one, giving better lighting and texture alignment.
SheetPolys makes the brush consist of only sheets. It will be visible from both the inside and the outside, will not have caps and will have no collision. This setting is of limited interest.
InvisibleFinal is a tricky function: it builds the brush according to your path, but will not build the final section. This is useful in that it allows you to end your brush with the last section oriented however you want, as if another PathPoint was computed but not joined:
From left-to-right, a normal shape with two points, the same with a third point added, and finally the second shape with InvisibleFinal. As you can see, the last section is not drawn but the last visible section has its extremity rotated accordingly.
The next two parameters, Randomiser and RandomiserCaps, can be used to add a random displacement to vertices at each PathPoint. By entering a value (for example 0.5) in the field corresponding to an axis, all vertices along this axis will be randomly displaced by a random number (in this example, between 0 and 0.5) on the selected axis. The Randomiser settings affect vertices at each step of the path while RandomiserCaps affects only the vertices of the shape at the beginning and end of the path.
Maths determines how the path is computed. Because no "official" documentation remains, its effects are mysterious, but it is better to leave this one to MA_Quaternion, as Matrix is known to cause some problems.
GroupName is an unimportant parameter that defines the name of the group to wich the created brush is added. Finally, _COMMAND contains a variety of useful commands to be activated when clicking "Build". C_None is inactive and selected by default. C_ResetPath and C_ResetShape are by far the most useful ones as they allow you to reset the PathPoints and ShapePoints lists on build (by setting all their values to 0 for you). C_ShowShape will create the shape as a 2D sheet, which is useful at the first stage, when creating the shape, to see the result of your work without having to give it a dummy path. C_ShowJoint creates only the joints, in other words, it draws the polygon itself at each PathPoint:
C_MoveShape, C_ScaleShape and C_RotShape will respectively offset, scale and rotate the shape according to the parameters of the _Parameters field. With C_ScaleShape, parameters [0] and [1] will define the factor by which the shape is scaled on the X and Y axis. With C_MoveShape, they will define how far the shape is offset on the X and Y axis. With C_RotShape, only parameter [0] is useful and will define by how many degrees the shape is rotated. Note that contrarily to all UnrealEd customs, this is done with real degrees (180 being a U-turn) and not UnrealEd degrees (where 65536 is 360°).
C_MakeArc could work much like the Revolve tool of the 2D Shape editor, but it does not. Instead, it makes a circle or part of a circle out of your polygon in a convoluted manner. It requires at least three PathPoints as the three last points of the path are used to create the arc through roundabout computation. I will let Tarquin's description speak for itself:
"The builder looks at the last three PathPoints; call them A,B,C in order, so C is the very last PathPoint. The arc will start at point A. B and C are used for information about the size and orientation of the arc and will be over-written. B is taken to be the centre of the arc, and C is a point 1/4 of the way around the full circle. Another way of looking at it is that line AB goes from 12 o'clock to the centre of the clock face, and BC from the centre to 3 o'clock.
Note that if these two lines are of different lengths the arc will be a piece of an ellipse rather than a circle."
Long story short, the three last PathPoints are used to set, in that order: 1) The last position of your current shape. It acts as the orange vertex in the 2D Shape editor, the center of the brush; 2) The center, or pivot, around which the arc revolves. It acts as the green pivot in the 2D Shape editor; 3) A point arbitrarily set as a quarter of a complete circle.
The C_MakeArc command also uses the _Parameters fields: [0] is the number of sides for 360°, [1] is the number of sides used and [2] allows you to choose between "aligned" (1) or not (0). So if you set in [1] a value which is a quarter of the one you set in [0], you will have a quarter of a circle, starting in A, ending in C and revolving around B. If you set [1] to be a half of [0], you'll have a semi-circle and C will be precisely in the middle of it, etc. As Tarquin points out, if AB and BC have unequal lengths, your "circle" will have more width than length (or the other way round), and you'll have an ellipse.
Finally, the C_MakeMirror command allows you to mirror all your existing points from the last PathPoint you set:
Parameter [0] can be used: it will decide what happens to the last section of the brush. When set to 0, the last section of the brush is deleted completely and the two halves are joined together at an angle equivalent to the one they would have if the last section was present between them. If set to 1, the last section is preserved: the mirror image starts at its end. If set to 2, the last section is itself mirrored, which means it is doubled and the mirror image comes after it.
Now that you have gone through all these complex parameters with intimidating names, it is time to start using them. We will use only a few basic settings, those you are most likely to use. This tool can be used for advanced technices, but once you feel the need to use them, you should be UnrealEd-savvy enough to mess around with the TEBB without me holding your hand.
Using the Tarquin Extruder.
Take a look at this scene:
The map is DmRiot. Most of the structures here (the windows, the borders), run all around the room and are closed shapes. This is the exact type of situation where you would want to use the TEBB: long borders with many bends, eventually closing in on themselves. Let's make such a room to take advantage of our great tool:
Imagine you need a border or trim to run around the room. It would be a simple square section shape extruded along the walls. We want the trimming to be 32 units high. First, opening our TEBB, let's choose a ShapeFactor of 32. We have no idea what angles or distances we might need for the room, so let's use a PathFactor of 32 too, small enough to be precise, yet high enough not to have to input huge numbers. ShapeSource can be left to Square, and because we will do nothing fancy, set PathSource to SO_Vect_Rel. Before hitting "Build", we need to enter at least two PathPoints. The first one can be 0,0,0, but because we need another, set PathPoint [1] to 0,5,0:
Notice the side of the brush on which the pivot is located. In my case, it is in the upper-left corner. This is important because when bending the shape, some vertices will come off the grid to keep the shape the exact same width on its angled sections:
On this picture, you can clearly see that the vertex (vertices, actually) inside the bend are off the grid, while those on the outside of the bend are still neatly snapped. This is determined by the way your brush is built: all vertices on the side of the origin (the 0,0,0 vertex) will be aligned while those on the other side will be off the grid. If you offset your shape so that the origin is not on the same coordinates as a vertex, all vertices may be off the grid:
In my case, I want the snapped side to be the outside of the border, so that it fits perfectly with the walls. This way, it will be protruding 32 units into the room itself. Because we will be working with X/Y coordinates, it is preferable to make sure the rotation of your builder brush has been reset before entering the first coordinates: right-click on the brush (make one if needed by clicking the Cube Builder Brush) and click Reset => Reset Rotation (or even Reset All). Then, in your PathPoints, leaving [0] as its original 0,0,0 coordinates, set X = 5 in [1]. The brush should stretch from its origin to the right. Put the origin inside your room, in a corner:
From there, your work is only a question of adding successive PathPoints with the right coordinates until it loops back to the corner before your origin. Coordinates can be negative and non-integers: when your PathFactor is 32 and you need to stretch your brush only 16 units in a given direction, you can just input 0.5 on the needed axis. After a few try, PathPoints will start to come naturally to you.
Once you only need one segment, instead of having the brush loop back on itself through PathPoints, simply set ClosedPath to true and hit "Build". The last segment will automatically link the beginning and end of the brush.
Add it and apply a texture. You will notice it already fits nicely (a 90° rotation may be needed, as in my case).
That was fun, what's the downside?
The benefits of the Tarquin Extruder Building Brush are many: the ability to quickly create large complex trims with no effort required to align textures can really speed up the building of a map. It keeps all sections perfectly similar so you don't have to fiddle with texture scaling on sections rotated at 45°. It also means you will use less brushes, making modifications of large rooms easier. Selection will be easy in all viewports. Much less time will be devoted to painfull vertex editing of the same brush over and over again to meet the edges of a room or doorway. You can also easily create wires with curves and such. All in all, the TEBB is a great tool.
What you should remember is that the TEBB will create brushes with several vertices completely off the grid, which may complexify and disturb the BSP cuts of a room. Having too many of such brushes piled on top of each other in a room with an already imbalanced brushwork will result in BSP corruption, HOMs, BSP holes, invisible polys and other such artefacts. Though you cannot do much about it, it should force you to use clean, ordered and aligned BSP snapped to the grid to limit possible troubles. If your basic brushes are sane, extensive usage of the TEBB should not be problematic.