Working with Brushes
Geometry Brush Handling Tools
The geometry brushes are the basic map building blocks of the AnachroRadiant engine. These are the tools to make them work for you.
Creating, Moving, Resizing, and Scaling Brushes
This is the all-purpose deselect key. Use it to back out of operations you don't want to complete or to stop working on a brush or group of brushes.
Create a New Brush(mb1+drag)
While mouse button 1 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.
This command allows you to move brushes in any axis plane within any of the viewports. The Undo command will return the brush to its original position.
These keys move the brush around the map in discrete map grid increments.
Move Selection Up(Keypad PLUS)
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 Up(ALT+UP ARROW)
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(ALT+LEFT ARROW)
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(ALT+RIGHT ARROW)
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.
Think of this as stretching or shrinking brushes. The Undo command will return the brushes to their original size.
Flipping and Rotating Brushes
A menu command and toolbar button controls each command. 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. Flipping will not change the facing on non-brush entities.
There are three separate actions here that control flipping a brush along either X, Y, or Z-axes.
Flip X(Menu: Selection->flip->Flip X)
Flips the selected brushes along x-axis.
Flip Y(Menu: Selection->flip->flip y)
Flips the selected brushes along y-axis.
Flip Z(Menu: Selection->Flip->flip z)
Flips the selected brushes along z-axis.
There are three separate actions here as well. They rotate selected brushes in 90 degree increments around the selected brushes 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. The rotation will not change the facing direction on non-brush entities.
Arbitrary Rotation(Menu: Selection->Rotate->arbitary rotation )
The Rotate commands accessed from the toolbar all rotate affected map components 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. If you don't like the rotation, you can use Undo and the brush will return to its un-manipulated facing.
Free Rotate in Map Window(R)
Press the "R" key. The selected map component(s) turns lavender. The purple square at the center is the center of the selection and the axis around which it will rotate. Left Mouse clicking anywhere in the map or cam window and dragging will cause the selected brushes to rotate. SHIFT + MMB clicking on a 2D map window, will cause the axis square too relocate to the coordinates of the click. Deselecting and reselecting the component returns the center axis to its original position.
Manipulating brushes can be a time consuming and tedious task. But it is an essential task to even create a map.
Edges and Vertices
There are two "drag" functions that involve control points or "handles" on the brush. They allow you to fine tune the shape of your brush by manipulating edge or vertex points along the brush.
Design Note: Drag Vertices is a balky tool at best. It works well if the user is manipulating a triangular brush face, raising or lowering corners of the triangle. Work with care, it is quite easy to pull a brush out of useable (or recoverable) shape.
CSG stands for "Computed Solid Geometry". The two functions, 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(Menu: Selection->CSG->subtract) (shift+U)When you select this, the selected brush or brushes subtract its volume from all the geometry that contacts it. The cutting brush or brushes are not removed. 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.
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. This works best with rectangular brushes. The edges of the created brushes overlap each other. The most common use for this function is to hollow out a box for use as a room.
Merge(Menu: Selection > CSG > Merge) (ctrl+u)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, the following message appears in the editor console: " Cannot add a set of brushes with a concave hull."
Examples: Example "A" shows two brushes can be merged together. Example "B" shows two brushes that cannot merge.
Placing Clip Points
Clip points are placed in the map views by two methods: (Mb1 after Clipper has been toggled on),or (CTRL+Mb2 at any time). Undo does not remove clip points, use the all escape key or untoggle the clipper to remove any placed clip points.
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 in yellow, and 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.
Make Detail(Menu: Selection->Make Detail)
As of 08-25-06 Detail brushes either as a content flag or used on the brush itself does not appear to work. Need to run more tests to see if detail brushes should be completly removed from AnachroRadiant.
In Quake 2, this was a surface flag. In Anachronox, 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(Menu: Selection->Make Structural) (ctrl+shift+s)
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).
You can group brushes together for easier selection or manipulation of multiple brushes. Currently the only way to group brushes together is by selecting the brushes you wish to group then selecting func->func_group entity in the entity dropdown box. More funtionality is being added to this for more ease in creating groups.
Func_Group(Entity Window->Func_Group->Enter) (Dropdown menu->Func->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.
Thumbing through Group Components(TAB)
When you have a Func_Group b_model entity selected, press the TAB key to "thumb" through the component pieces, hi-lighting them individually, one at a time. This allows you to work on part of a multi-piece group without having to work on all pieces
Ungrouping Groups(Menu: Selection->Ungroup Entity)
You can easliy disband a group by either selecting a group or a member of a group and selecting ungroup entity from the Selection menu. More functionality is to be added to this allowing you to remove a single brush or multiple brushes from a group without disbanding the whole group, unless disired.
Find Brush(Menu: Misc->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.
|BuildSpiral||This walks you through the steps of building a spiral staircase. Select a brush, then click on the map to locate the spiral origin. Click again to bring up a dialogue window that prompts you to enter the number of steps, the angle of rotation, and the height of each step.|
|BuildStep||This clones the selected brush and moves it +X 16 units and +Z 8 units.|
You can create your own brush scripts by text editing the scripts.ini file located in the AnachroRadiant root directory. Instructions and a list of brush script commands are located in the file as well.Brush Menu Commands
|3 sided||(Menu: Brush->3 sided)||(CTRL+3)|
|4 sided||(Menu: Brush->4 sided)||(CTRL+4)|
|5 sided||(Menu: Brush->5 sided)||(CTRL+5)|
|6 sided||(Menu: Brush->6 sided)||(CTRL+6)|
|7 sided||(Menu: Brush->7 sided)||(CTRL+7)|
|8 sided||(Menu: Brush->8 sided)||(CTRL+8)|
|9 sided||(Menu: Brush->9 sided)||(CTRL+9)|
Arbitrary sided(Menu: Brush->Arbitrary sided)
This command opens a dialogue window that allows you to manually set the number of sides a brush has. You can enter a number of sides in the field from 3 to 64.
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.
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.
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 time on one of the id sample maps.
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.
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.
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.
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.