Originally posted on Planet Unreal by Tomasz 'Millennium' Jachimczak
Mirrored here for archival purposes
A Brush is really a 3D shape that is used to create the environment that the player will be able to travel in. A brush can take many properties, which are described in the brushesreference section of this file, but put simply a brush is a 3D shape that is used (most commonly) with other brushes to create the level.
If you are coming to the Unreal Editor from another 3D application, you may know the term Mesh, which would be a close relative of the brush. In the Unreal Engine, a mesh is slightly different, but the main concept is the same.
A Brush may technically be any 3D shape (from the primitive shapes such as Cube, Cone, Sheet etc through to complex shapes such as stairs, mountains, anything imaginable) inside the editor.
Brushes are used in conjunction with CSG Operations, which will turn the information that the brush holds (about size, position, shape etc) into something that is visible (or invisible for that matter) and interacts with the player in some way, like blocking them, showing a texture, creating a Zone Portal or providing a set of stairs to reach the platform above them.
There are many different types of brushes, but they are all related in their native information about the 3D world that they are used to create. The only exception is the Active Brush, which is used to create the other brushes with and does not actually influence the level in any way.
This shows the types of brushes available in their default colors. The numbers correspond to more information on each type in the list below. There are two images of each brush type, the top image shows the brush as unselected, and the lower image shows the selected brush. For more information regarding brush types, read the brush reference section in this file
Active Brush This is the brush used to create all the other brushes in the Unreal Editor.
Subtracted Brush This is a solid brush that has been subtracted.
Added Brush This is a solid brush that has been added.
Non Solid Brush This brush has been added as a Non Solid.
Semi Solid Brush This is a semi Solid Brush.
Mover Brush This is a brush that can move inside the environment.
The Active Brush is a special type of brush. It is the only brush actor in the Unreal Engine that does not actually influence the final environment in any way. It is a go-between tool used to create other brushes. The Active Brush is highlighted in red, and never actually has any solidity.
It can be well described like a mould used to create a brick. The mould itself does not get used when building a wall, but rather is used to create the bricks that will finally be used to make the wall.
When a CSG Operation is performed, the Active Brush is used, and the properties that it has (size, location, rotation etc) are used to create a new brush in it"s place. The Active Brush can then be used to create the next brush through the next CSG Operation. However, not all properties can be set in the Active Brush. For example, the Active Brush does not contain information on the texture to be placed onto the brush surfaces(This is not entirely true, but for the time being, assume that it only contains information as to the physical shape, size and location of the brush).
Unlike other brushes in the Unreal Editor, the Active Brush can be changed on the fly, with new size settings, location information and as soon as a CSG Operation is performed, these settings are used to create the new brush. While the Active Brush does start as a cube, but can be any shape at all. It is not limited in any way. Through the use of the Brush Building Tools in the Unreal Editor, almost any shape can be made through the Active Brush.
The Added Brush calls the Additive CSG Operation, filling an area previously taken out with the Subtractive CSG Operation (it fills back solid space to an area inside a subtracted brush). Placing an Added Brush into an area that is already solid is meaningless, as it will not double fill the area.
The Added Brush is a solid brush, and will create solid space where there is void, thus blocking the player from movement in the solid space.
The Added Brush will only change after a rebuild has occurred, as it relies on the CSG Operation to create the effect that it has, and CSG Operations only occur during the rebuild itself.
The Added Brush like all other brushes (except the Active Brush - which is a special editor brush) takes its form from the Active Brush when a CSG Operation is performed.
To place a Additive Brush into your level, shape the Active Brush and place it where you want the Additive Brush to be, then click the Add button. (shown below).
This will create the Additive Brush.
The Brush Order is very important. Because brushes in the Unreal Engine are ordered, the BSP cuts are made following the brush order. Most commonly, there are two brushes that combine to create a final shape. Firstly the subtractive brush, then the additive brush. This seems simple, as the order is as follows:
The Subtractive Brush is first, creating the basic shape of the room to be created, then the Additive brush follows, creating the additional features for the room.
However, there is often the need for more than two brushes to make up a particular shape. Another example would be the following:
We want a simple room, with a pillar in the middle of it, with a hole in the pillar that a player can see through.
While the order of brushes is not often an issue, complex maps and possible display problems can sometimes warrant the need to change the order of brushes. The Unreal Editor will automatically set the order of brushes based on the order that they are created in making editing much easier, but the concept of brush order is an important one, so lets explain it in more detail.
This example shows the room described above, and shows the potential pitfalls if the order of the brushes is not correct. Reading through this example will explain just how the brush order will affect the environment and what is created.
Brushes in a CSG environment can have a few settings for Solidity. The Solidity of a brush defines how it interacts with a player and what effects it has on the environment as the engine is rendering it, and the BSP (Binary Space Partition) as the level is played.
Many of the brushes that are used will be Solid. This means that they not only make BSP Cuts (This is explained in more detail in the article titles Introduction to BSP) but they either block the player (Additive CSG Operations) or allow the player passage (Subtractive CSG Operations). If you would like to know more about CSG Operations, read the articles on Constrictive Solid Geometry in the Introduction to Editing Section of this file.
A Solid Brush is the only type of brush that will create a BSP Cut, and allow the player to collide with the brush, meaning that any brush that is subtractive (creating a place for the player to walk) has to be Solid.
A Non Solid brush type can be added to the level, but it will not block the player in any way. A Non Solid brush will also not make any BSP cuts. This means a few things:
Firstly, it means that a non solid brush is will most often be used as a decoration of sorts. It can only be placed inside a Subtractive Solid Brush. Putting this type of brush anywhere else will have no effect. Why? Because the brush is Non Solid, it doesn´t make any BSP cuts, and without BSP cuts, it will not create an area for the player to move within.
Secondly it means that a Non Solid brush reduces the Node Count of the level because it does not make BSP cuts. This can be important in the final framerate of the level when it is played.
Lastly, it means that a Non Solid brush can be used as a Zone Portal very well. For more information regarding Zones and Zone Portals, refer to the Zonesinformation within this file.
A Semi Solid brush is really a mixture of the Solid and Non Solid brush types. It takes properties of both. It can block a player or actor (e.g. a bullet) and it doesn´t make BSP cuts to the level (From information on Non Solid Brushes, you should see that because it doesn´t make BSP cuts to the level, it will reduce the Node Count in the level). However, because it doesn´t make BSP cuts to the level, you should also see that it can only be used as an Additive Brush. A Semi Solid brush however cannot be used to close off a Zone. It is also a Dark Horse as far as brushes are concerned, as it can cause problems with player collision at times. Semi Solid Brushes should be used with caution
Mover Brushes are a special type of brush in the Unreal Engine. They are brushes that are actually able to move within the Engine during play. This makes them unique from the other brush types, which are static. Mover brushes do not create BSP cuts hence they do not complicate the BSP tree in a level (That is good for framerate!) They can however block a player (and do so be default) though they can be set to not block anything.
A Mover brush is made by creating the shape using normal Additive and Subtractive brushes, then Intersecting the Active Brush with the shape to form a single brush from the (often) complex shapes wanted for the mover brush. (Intersecting Brushes is explained thoroughly in the Unreal Editor Reference Section, within the Intersection/Deinterserction topic). Using this method is also the only way (though Epic is looking at this matter) to assign a texture to the mover itself. Once the brush itself is created, the Add Mover button (shown below) can be used to place the mover within the level.
Creating a mover is explained in much more detail in the movers section of the Unreal Editor Reference in this file.
To place a Mover Brush into your level, shape the Active Brush and place it where you want the Mover Brush to be, then click the Add Mover button. (shown below).
This will place the Mover within your level.
The Non Solid brush creates a shape that, while visible does not block a player or any other actors. A common example of a non solid brush is the surface of a pool of water. The surface is visible, there is a texture on it, but it does not block the player in any way. Non solid brushes can be any shape or size.
Non Solid brushes do not make any BSP cuts, and are therefore beneficial to framerate. Due to the fact that Non Solid brushes cannot block the player or any other actor, they are always used as Zone Portals, creating an invisible barrier between two zones, though not actually stopping the player in any way.
Changing a Non Solid brush will only be visible in the 3D view after a rebuild has occurred. A Non Solid Brush, like all other brushes, (except the Active Brush - which is a special editor brush) takes its form from the Active Brush when it is created in the environment.
It is important to note that any sheet brush that is created is always created as a Non Solid brush, even if it is placed into the level via pressing one of the other CSG Operators (like Add or Subtract). The sheet brush can actually even be displayed in a blue color (normally defining added brushes) or any other color, but is automatically treated as a Non Solid. This is especially important to remember when creating a shape that you want as a sheet (like a fence, or grilled floor) which in itself will not block the player, but the player should be blocked when trying to walk through. If this is the case, an Invisible Collision Hull can be used to give the impression that the sheet is in fact blocking the player. However, it is noteworthy to remember not to place the Invisible Collision Hull directly over the sheet, as this often causes BSP errors, resulting in display problems.
To place a Non Solid Brush into your level, shape the Active Brush and place it where you want the Non Solid Brush to be, then click the Add Special button. (shown below).
This will open a dialogue window (shown below). Select Non Solid from the Solidity options presented, and click OK. This will then create the Non Solid Brush.
In the Unreal Engine, a Subtracted Brush creates an area of void, which the player is then able to move in. As any environment in the Unreal Engine starts off as solid space, at least one subtracted brush MUST be included in any level that is playable, as without it, there would be no physical space for the player in the environment.
This is a Solid Brush, and it makes BSP cuts to the level. A Subtracted Brush that is placed within a solid area will create a hollow area. However, if it is placed within another hollow area, it will not create a double subtracted area, but in fact has no further effect.
This brush type is used in conjunction with the Subtractive CSG Operation.
The Subtracted Brush will only change after a rebuild has occurred, as it relies on the CSG Operation to create the effect that it has, and CSG Operations only occur during the rebuild itself.
The Subtracted brush, like all other brushes (except the Active Brush - which is a special editor brush) takes its form from the Active Brush when a CSG Operation is performed.
To place a Subtracted Brush into your level, shape the Active Brush and place it where you want the Subtractive Brush to be, then click the Subtract button. (shown below).
This will create the Subtracted brush.
Semi Solid Brushes are a special brush class, somewhere between Non Solid brushes, and Solid Brushes. It is a special class, because it takes attributes from both of those brush types. It will block a player, and it will block actors, but at the same time, it will not create BSP cuts, and it will not block a zone.
Semi Solid brushes do not create BSP cuts, nor do they call the CSG Additive Operation (meaning that the area within them is technically still void, though it blocks the player from entering it) which means that a Semi Solid brush can only be an additive brush. This brush cannot be used to create a new room within a solid space, it can only be used to create a blocking shape within an area that the player can already get to.
As a Semi Solid brush does not make any BSP cuts, it can well have a beneficial affect on framerate. Even though the engine will still have to display the brush, because it does not make BSP cuts, it often means that the brush itself is simpler for the engine to display, and that in turn means that the area around it can be simpler for the engine to render.
Semi Solid brushes are most commonly used as either decorations inside an area, or they are used to create parts of a level that do not require BSP cuts (for example, a pillar, or piping running along a wall). This is because of the lower BSP complexity that they confer upon the level due to lack of BSP cuts (This really is very important!).
To place a Semi Solid Brush into your level, shape the Active Brush and place it where you want the Semi Solid Brush to be, then click the Add Special button. (shown below).
This will open a dialogue window (shown below). Select Semi Solid from the Solidity options presented, and click OK. This will then create the Semi Solid Brush.
Constructive Solid Geometry Operations are used in conjunction with Brushes to construct the environment.
The most commonly performed CSG Operations are Addition and Subtraction. Both place a new brush into the environment. When this new brush is placed into the environment, it uses the current shape, position and rotation (and all the other properties) of the Active Brush (see the entry for the Active Brush in the Important Concepts section of this file for further information on the Active Brush). Once the CSG Operation has been performed (e.g. Additive, Subtractive etc) the Active Brush is recreated, allowing for the next operation. After an operation has been performed, changing the Active Brush will not affect it in any way. Only through changing the brush that was placed in the operation can the area be changed.
An Additional Operation converts the Active Brush into a new Added Brush, filling the area enclosed within the bounds of the brush with solid (impassable) area. In a solid space, this has no real effect, however in an empty space, this creates an impassable area in the shape of the brush.
A simple example of an Additive operation would be a pillar standing within a large open area. The large open area is "subtracted", leaving space for the player, then the pillar is "added" creating an impassable area that blocks the player in any situation.
A Subtractive Operation creates the opposite effect. It converts the Active Brush into a Subtracted Brush, leaving the area inside it empty (thus allowing a player to be inside that area). Within a solid space, a subtractive operation creates a void that the player is able to pass through. Creating a Subtractive Operation within an area that is already solid is meaningless - empty space cannot be subtracted from to get any effect.
A good example of a Subtractive Operation would be a cave. The area around it is completely solid and impassable, yet the area within the rock is subtracted, allowing passage.
The Unreal Editor uses Constructive Solid Geometry (CSG), which is a concept (or design plan) for building a three dimensional world. This concept uses brushes, which are like building blocks for the final three-dimensional environment (or level depending on choice of terminology).
A Brush is the name given to a 3D shape, which is used to define what a player can see, where they can walk, and how the world is presented to them. These brushes are often small parts of the entire environment, and are used most commonly as individual segments of the entire environment.
In the Unreal Editor a "blank" or empty environment is actually a totally solid cube. This means that the first brushes that are used are subtractive brushes. This means that they subtract the solid space within the environment, leaving a void that players can move within.
Constructing a room that a player can walk within is very simple with CSG. Remembering that the world starts as a huge solid (filled) shape, it is a simple matter of creating a cube (or any other 3D shape) and subtracting it. This will leave a void in the shape of the brush that was used, and the player will be able to move within that area.
This method of construction also means that to create a simple room, it only takes a single subtracted brush, rather than creating a floor, 4 walls and a ceiling (assuming that a cube is made). The brush then has 6 surfaces (faces) that can be individually textured to suit the environment.