GtkRadiant Editor Manual: Page 5.1

# GtkRadiant Editor Manual

# Tools 2: Working with Brushes

The geometry brushes are the basic building block of the Quake III Arena engine. These are the tools to make them work for you.

## Geometry Brush Handling Tools

Create New Brush
While mouse1 clicking over the main map window (or any open map window) drag the mouse pointer across the grid. A brush will be created that has the height of the current map grid size. If you have the "snap to grid" function set in your preferences, the brush will start and stop on gridlines. The texture will be either the default texture (if none has been selected) or the most recently used texture. For all these functions, you will first need to select a brush in either the Map or Camera windows.

Resize Brush
This will change the shape of the brush by moving its component faces.
In the Camera or Orthograpic Windows. Click outside the selected brush on the side you want to pull. With the mouse 1 button depressed pull in a direction away or towards the brush. The brush will change size in that direction.

Move Objects
This will move the brush around in the world, without changing its shape.
In the Camera or Orthograpic Windows. Select the brush. Click on the selected brush. With the mouse 1 button depressed move the brush around the map to the position you desire.

Mirror Objects
There are three separate actions here. They mirror objects along either X, Y, or Z-axes. A menu command and toolbar button controls each. The six flip and rotate toolbar commands are the second grouping (from the left) on the toolbar. The rotate command for the same axis is always next to the flip command.

Flip X (Menu: Modify > Flip > Flip X)
(Toolbar: Leftmost button)
Flips brush along x-axis.
Flip Y (Menu: Modify > Flip > Flip Y)
(Toolbar: left of center button)
Flips brush along y-axis.
Flip Z (Menu: Modify > Flip > Flip Z)
(Toolbar: second button from the right)
Flips brush along z-axis.

Rotate Objects
There are three separate actions here. They rotate a brush in 90 degree increments around a brush's X, Y, or Z axes. Both a menu command and toolbar button controls each action. The six flip and rotate toolbar commands are the second grouping (from the left) on the toolbar. The flip command for the same axis is always next to the rotate command for the same axis.

Rotate X
Rotates brush around the x-axis.
Rotate Y
Rotates brush around the y-axis.
Rotate Z
Rotates brush around the Z-axis.

Arbitrary Rotation
The Rotate commands accessed from the toolbar all rotate selected objects 90 degrees; no more, no less. Arbitrary Rotation allows the user to set angles individually for the X, Y, and/or Z-axes. Enter a number value for each axis you want to rotate. Value can be positive or negative. After the values are entered, select OK. This rotates the object and closes the pop-up window.

Arbitrary Scale
With Scale you can enlarge or reduce a brush, patch, or group of brushes and patches. You choose the axes to scale (X, Y, or Z) and the factor of the scale. The scaling factor can be different for each axis. Selecting this option brings up a tool window. The size of the brush or group of brushes is multiplied by the numbers in the boxes adjacent to the X, Y, or Z axes. Leave the value as 1 and no change occurs. If the value is a decimal less than one, the size of that axis shrinks. If the value is greater than 1, it grows. Hit OK to activate the scaling function with you chosen values. Undo functions with this effect.

Move Tool
Press the "W" key to enter the 'Move' tool. The move axes are shown. Left Mouse clicking on a part of the axes (in the orthographic or camera windows) and dragging will move the selection. Movement can be constrained to the X, Y or Z axes by dragging the red, green or blue arrows.

Rotate Tool
Press the "R" key to enter the 'Rotate' tool. The rotation sphere is shown. The centre of the sphere is the center of the selection and the axis around which it will rotate. Left Mouse clicking on a part of the sphere (in the orthographic or camera windows) and dragging will rotate the selection. Rotation can be constrained to the X, Y or Z axes by dragging the red, green or blue circles.

CSG Operations
CSG stands for "Constructive Solid Geometry". The two functions here, CSG Subtract and Make Hollow, calculate the removing of sections from that geometry and breaking solid brushes (not curve patches) into smaller pieces. Although they are convenient to use for some operations, they often do things that the user may not care for. These "side effects" can include breaking brushes into inconvenient parts, cutting up adjacent brushes, and creating hard to find and remove micro brushes.

Subtract

When you select this, the selected brush or brushes subtract its volume from all the geometry that contacts it. The cutting brush is not removed.

Design Note: Region off together the brushes that will be cut and the brushes which will be used for cutting. This keeps other brushes in the map from being affected by the action. It's also a good idea to save just before doing the action, so the user can "back up" to an earlier version.

Hollow

When the user selects this, the sides of the highlighted brush are turned into separate brushes. The thickness of these brushes is equal to the grid size.

Design Note: This works best with rectangular brushes. The edges of the created brushes overlap each other.

Merge

When the user selects this, the highlighted brushes are turned into a single, convex brush. If the result of the merge would not create a convex brush, an error message is shown.

Examples: Example "A" shows two brushes can be merged together. Example "B" shows two brushes that cannot merge.

Clipper
If you think of this tool as being near the same as the miter box that a carpenter uses to cut wood or moldings, then you are not far from the truth.

Placing Clip Points
Clip points are placed in the map views by two methods:

The figure below shows a square brush that has been "clipped" from the lower left (point 1) to the upper right (point 2). The editor creates a line between the first point and the second point. The piece to be kept when the brush is cut is always created in a clockwise direction from the line (assuming that the first point is the center of the "clock")

In a two-point clip (shown here), the cut occurs perpendicular (at a 90 degree angle) from the plane of the map view. Adding a third point, and adjusting its position in a different map view can change the angle of the cutting plane. This will take practice to master.

Toggle Clipper
This toggles the Clipper function on and off. After completing a cut, the tool remains active and must be toggled off before another brush is selected.
Clip Selection
If the "clip selection" action is completed the portion of the brush outside the clipper plane will be discarded and the rest will remain. A new face is added to the brush, which is given the currently active texture.
Split Selection
If the "split selection" action is completed the brush will be split into two brushes.
Flip Clip Orientation
This permanently changes which side is kept and which is discarded, by flipping the clipper plane.

Make Detail
In Quake 2, this is a per-face flag. In Quake III Arena, it is used on the brush itself. Detail makes a brush non-structural. This means that it cannot be used to seal the hull of the map world. Don't use it for wall, floors, or ceilings. If it is used as a hull, the map will "leak" when compiled. But it can be used on things that jut out away from the walls (as long as there is a structural brush behind it).

Detail has two beneficial effects:

1. Detail brushes are less likely to cause additional cuts to occur in non-detail brushes that they touch ... thus reducing triangle counts. This can help reduce frame rate.

2. When the compiler does Vis, it breaks the world up into many small volumes. Any break in the surface of the box that forms a room creates additional volumes that must be. Detail brushes don't create these breaks. Therefore, using them speeds up compiling.

Make Structural
Structural is the Default State for brushes. Textures that are not manipulated by shader scripts to be transparent or non-solid) do not change this. Essentially, this is a change-it-back command for Make Detail. It removes the detail flag from the brush. This surface WILL block Vis when the map is compiled (so long as there isn't shader content that says otherwise).

Func_Group
Technically, this is a b_model (brush model) entity. However, it's a great way to manage and handle related groups of map components for ease of selection. To use, select the brushes and patches you want to group and then open the Entity window (press "N"). Click on the entity list sub-window and type in "F" to move to the top of the "funcs". Double-click on Func_Group and all the brushes and patches selected are bound together into a group. Select one and you select them all.

Find Brush
Find brush allows you to locate a brush in the map by its identifying number. As the map is built, the editor assigns identification numbers to each map component. For brushes (and patches) these include an Entity number and a brush number. For any brush that is not part of a brush model (b_model), the entity number is zero (0). Each b_model will have it's own number.

When the compiler outputs error messages in the console and junk.text file, an identification number will call out brushes with problems. Be prepared for them. Even when you do things right, you will get error messages.

Selecting Find brush pops up a dialogue window with two fields. The first field is the entity number. For most brushes, this will be zero. The second number is the brush's individual number. Selecting "OK," jumps the 2D map window(s) to the selected component and hi-lights it.

## Brush Menu Commands

The Brush menu lets the mapmaker convert a selected brush into a brush of a different shape. Most of the commands change the number of sides that the brush possesses. It will also change the brush to a single color. There are individual commands for three through nine sides. The brush will be given the number of sides indicated by the command (Plus top and bottom). The "top" facing is always relative to the view in which it is created. The sides are always at right angles to the view facing.

Poly-Sided Brushes

Primitives
Primitives are pre-defined shapes other than squares.

Prism…

This command opens a dialogue window. You can enter a number of sides in the field from 3 to 64. Select OK to execute the command.

Cone…

This opens a pop-up dialogue window that lets you enter an arbitrary number of sides. The height of the cone is equal to the Z height of the brush. The cone is always made with its axis along the Z-axis. At first, the radius of the base of the cone appears to be unrelated, or at least unevenly related to the XY dimensions of the brush from which it is transformed. However, if you make a four sided brush, the point to point "diameter" of the resulting pyramid is equal to the longest XY dimension of the brush. Starting the same size brush as you used for the four-side cone, an eight-sided cone fits neatly within the volume of the four-sided cone, four of its sides congruent with the side planes of the four-sided cone. Do the same for a 16 sided cone, and the same again for both a 32 sided cone. However, the number of sides seems to max out at 56.

Sphere…

This opens a pop-up dialogue window that lets you enter an arbitrary number of sides. The maximum number of sides, which the editor seems willing to handle is 32.The diameter of the sphere, is roughly equal to the length of the longest XY side of the brush from which it is transformed. Attempts to create spheres with more faces than 32 may result in the brush disappearing and becoming infinitely tall. Use Undo to back up from this or hit backspace to discard the brush.

## Moving Selected Brushes

Moving the Brush
These keys move the brush around the map in discrete map grid increments.

Move Selection Down
Each press moves the selected map component down along the Z-axis by one grid position (at current grid setting). Not affected by current 2D-map view.

Move Selection Up

Each press moves the selected map component up along the Z-axis by one grid position (at current grid setting). Not affected by current 2D-map view.

Nudging the Brush
These keys move the brush around the map in discrete map grid increments. The movement is in terms of the selected window, not in terms of XYZ coordinates.

Nudge Down
Each press moves the selected map component "down" the map view by one grid position (at the current grid setting). The movement is relative to the selected map view, not XYZ coordinates.

Nudge Up

Each press moves the selected map component "up" the map view by one grid position (at the current grid setting). The movement is relative to the selected map view, not XYZ coordinates.

Nudge Left

Each press moves the selected map component "left" the map view by one grid position (at the current grid setting). The movement is relative to the selected map view, not XYZ coordinates.

Nudge Right

Each press moves the selected map component "right" the map view by one grid position (at the current grid setting). The movement is relative to the selected map view, not XYZ coordinates.

Snap Selection To Grid
If you are using the map grid to keep brushes in alignment, this is a great tool. Rotated brushes and brushes that have had their vertices tweaked can have vertices that no longer lie on map grid intersections. This snaps the vertices to align with the grid. Be warned that snapping to large grids may be hazardous to the health of your brush (Snap and it's gone! But that's what UNDO is for).

## Efficient Brush Building Techniques

Developed from a Quake 3 World online posting by Astrocreep

Compiling a map is a necessary evil. It takes time, it ties up your processor, and in the early phases of map construction, comes up with construction errors as often as not. Nothing you can do about that … except the time thing. It is possible, through more careful construction (or perhaps reconstruction) to significantly reduce both map and bot compile times, and reduce map and .bsp file sizes (the latter being important for downloads). The following is based on reports written by Astrocreep that documents his extensive work to streamline the compile on one of the id sample maps.

Brush Construction
It cannot be overstressed. If you want shorter compile times and small file sizes, efficient brush construction is "critical" in building your map. There is one rule that stands above all:

DO NOT OVERLAP BRUSHES AT ANYTIME.

No matter what you have to do to build your map, do not overlap brushes. Overlapping means that all or parts of two or more brushes share the same physical space. If brushes overlap, you can expect to add time to your compiling, and add size to your .map, .bsp and, .aas file sizes.

Efficient map construction means that all brushes butt up against each other, but never intersect.

Brush Counts
The sample map to be reworked on had 1,100 brushes in it. Without changing the layout or appearance of the map, Astrocreep was able to remove 110, or 10% of the total brush count.

Learn how to do more with a single brush than with multiple brushes. Evaluate your map after you complete initial construction phases on all or part of it. Pick a part of the map, look at the layout and ask yourself if you could do that with fewer brushes. In all likelihood, nine times out of 10, the answer will be yes.

If you make a structure out of three brushes (or whatever) and have the same floor height and ceiling height (in some cases heights can be different), look at it in the "top view". Can you draw a line from each vertex and not cross out side of those three brushes? If you can, then that grouping of three can become one brush instead of three.

Example: here's how the engine might look at this.

Using 3 square brushes, you have 18 faces (with a texture mapped on each side) to be calculated. This doesn't take into consideration the number of in-game triangle faces that those brushes may generate. Even if two-thirds of those faces are not being drawn, they are still being calculated by both the compile process and the bot navigation compile process.

As compared to:

Using one brush (filling the same area), you have only 6 faces to be calculated. Here, you are compiling only a third of the total geometry. It should go faster.

Efficient map construction means using fewer brushes to build the world.

Caulking
It is possible to even further reduce the number of brush faces being calculated by applying a special non-drawing, but "solid" texture called "caulk" (common/caulk) to surfaces that cannot be seen in the game. When seen in the editor, this texture is a bright garish pink. In the game, it does not draw at all. Apply caulk to any brush face that either doesn't form the "shell" of the world or can't be seen by a player during play. Doing this may not improve your map's frame rate, but since your are telling the compiler that as many as five of the six faces on a square brush don't have to be calculated, it should have some significant effects on compile times. As long as you do not have any brushes that "share" the same space, caulking brushes should help reduce compile times. However, if you use caulk on a brush that "shares" the space of another, your compile time and all file sizes will actually increase.

Astrocreep compiled the test level nearly 200 times, many of those times were when he moved just a single brush, just to see what would change. Caulking seems to help the -light phase of compiling the most.

Efficient map construction means caulking all unseen brush faces.

Miscellaneous Tips
Lights: You can further improve compile times by careful use of lights. Entity lights, especially LOTS of entity lights can reduce compile time. If you need to reduce compiling time even more look to this.

Clip brushes: Clip brushes that have more than two sides not touching another brush appear to increase compile times.

Hint brushes: Use these only if you need to resolve a vis problem. Using them can significantly add to compile times.

Back | Home | Next