Level Editor/Workflows/Brushes and CSG
Brushes are the building blocks of a level: solid shapes made of flat faces that you draw, cut, carve and reshape. This page explains how to build with them, and the CSG (constructive solid geometry) operations that carve and join them.
Building blocks
- Draw shapes with the shape tools: Box for most things, Prism for odd outlines, Cylinder and Sphere for round ones, Stairs, Spiral Stairs, Spiral Tower and Arch for ready-made structures, Path Brush for curving walkways.
- Reshape them: move corners and edges, push, pull, extrude and inset faces, clip them with a plane, add edges with Loop Cut.
- Arrange them with Move, Rotate and Scale, the 2D views, and the Tools menu (Align, Distribute, Array Duplicate, Transform).
A good habit: block the whole map out with plain boxes on a coarse grid first, play it, and only then add detail.
Subtract (carving)
Edit > Subtract Brush (CSG) cuts the shape of one brush (the cutter) out of others: a doorway out of a wall, a window, a tunnel through a hill of brushes.
- Draw the cutter where the hole should be, overlapping the brushes to carve.
- Select the brushes to carve first, then the cutter last (Shift+click). The last one selected is the cutter.
- Choose Edit > Subtract Brush (CSG). The status line says Brush subtracted.
With fewer than two brushes selected it says Select 2+ brushes (active brush = cutter). Spheres cannot take part. The result is one undo step.
The carved brush keeps its materials. A cut can split a face into several pieces; Edit Face still selects the whole face with one click, and Weld Coplanar Faces joins the pieces back where possible.
Merge
Edit > Merge Brushes joins two or more selected brushes into one brush. With fewer selected: Select 2 or more brushes to merge.
Hollow
Tools > Hollow... (Ctrl+H) turns a solid brush into walls round its inside: the fastest way to make a room. See Hollow.
Groups and merging at export
- Put each building or area in a group (Ctrl+G) to keep the map tidy and move it as one.
- By default every still brush is welded at export to the brushes it touches, so flush joins leave no line in the baked lighting (Weld On Export on brushes and groups).
- A group with Merge On Export joins all its brushes into one mesh at export, removing the hidden faces between them.
Special brushes
A brush can be more than solid geometry; see Brush:
- Collision only (a clip): invisible but solid.
- Team gate: solid to all but one team.
- Zone: a volume the gamemode reacts to (Zone).
- Sound volume: ambient sound in an area (Sounds).
Collision
In the game every brush collides as its own shape. When it is not a simple convex shape (after carving, or an arch), the export splits it into convex pieces that fill it exactly.
- If a brush cannot be split, the export log says convex decomposition failed... Simplify or split this brush. Split it into simpler brushes, or rebuild it.
- A brush so flat it encloses no volume (encloses no volume: it gets no collision) has no collision: give it some thickness.