UDN
Search public documentation
UsingBspBrushes
Using BSP Brushes
Document Summary: Guide to working with BSP Brushes. Document Changelog: Created; maintained over time.Introduction
This document breaks down the use of BSP in level creation. For a run-down on creating levels, please see the Creating Levels page. BSP Brushes are the most basic of the building blocks in Unreal. Conceptually, it is best to think of BSP as carving out and filling in volumes of space in your level. BSP was once used as the primary building block in level design, but now more efficient and differently specialized geometry types have been introduced. However, BSP can still be useful in the early stages of a product, for rapid prototyping of levels and objects. This doc goes over what BSP can be can be used for as well as explaining how to use it. Technically, BSP (Binary Space Partitioning) refers to a data structure that is used to organize objects within a space, and thus it is not semantically correct. A more accurate term for this type of geometry would be CSG (Constructive Solid Geometry). However, the terms BSP and CSG are used interchangeably so just keep that in mind if you come across either of these terms in other docs or in conversation around the water cooler. Also note that how BSP works is slightly different from how it used to work in previous versions of the Unreal Engine. Previously, an empty level was a solid space - in effect an additive space. Now, the level starts out as a subtracted space. What this means is that you no longer need to start out with an initial subtraction when creating your level.Types of BSP brushes
There is a variety of different BSP Brush types you will use:- Builder Brush -- this is the brush from which you will create all other brushes
- Additive -- for any BSP geometry you wish to add to the level, you must use this type. This will most likely be the primary type used to create BSP geometry.
- Subtractive -- the default world space you start with in an empty level is like a giant subtracted space. Subtracted space is the only area that players can freely move around in. Note that in previous versions of the Unreal Engine, the default world used to be a solid space that you needed to subtract out a space from. This is no longer the case.
- Non-solid - most often used as sheets (zoneportals for example)
Creating BSP Brushes
You create the BSP brushes by selecting your primitive, setting the size by right clicking the icon and plugging in numbers into the window that pops up.
Then use the CSG buttons to add
or subtract
the brush. Be careful when subtracting or adding over already existing BSP geometry. To be extra safe you should always Intersect before subtracting and Deintersect before Adding. This will make sure that you do not have overlapping BSP geometry which can confuse the engine.
Also note that you can access many of these brush features from the brush file menu.
You can also use the Add Special Button
to add a variety of non-solid brushes (used for zone portals mainly).
Modifying BSP Brushes
You can modify your BSP brush several ways. The best way to change the actual shape of a brush is to use Geometry Mode, as discussed in GettingStartedWithGeometryMode. It is also possible to modify your brush using the various editor widgets, accessible via the widget buttons:
(the space bar will toggle through the most commonly used widgets).
Finally, you can further edit a brush by right-clicking to access the brush properties, our next topic.
Brush Properties
When you have a brush selected and you right-click anywhere in the editor, a menu will appear that offers a wide variety of features, which are described below. Note that the right-click menu is always accessible, and is context-sensitive, showing different options depending on what you currently have selected in the editor.
Order
Changes the drawing order of the brushes. This is useful if for some reason you have brushes that have been subtracted and added in the wrong order. For example if you've moved a subtractive brush into an additive one that was added later than the subtractive one. The result would be that you wouldn't see the subtraction. So in this case, you'd hit order->last on the subtract, making it the last brush to draw, therefore making the subtract visible in your level.Polygons
- To Brush: Makes the builder brush the same shape as the brush you have selected.
- From Brush: Makes the brush you have selected the same shape as the builder brush.
- Merge: Merges multiple polys on a brush face into as few as possible. The faces must be coplanar, with the same texture and aligned the same for this to work.
- Separate: Reverses a Merge.
CSG
(Note: these only work with added or subtracted brushes)- Additive - changes brush to an added brush.
- Subtractive - changes brush to a subtracted brush.
Solidity
You can change a brush from a solid to a semi-solid or non-solid. Now that static meshes are omnipresent in unreal technology games, semi-solids are obsolete. However they still can be useful early on in a project, for getting rid of bsp holes in prototype maps made with lots of BSP brush geometry.Select
Selects all of whichever brush type you choose.Snap to Grid
Snaps the currently selected brush to the grid. Maps built with many BSP brushes will run a lot more efficiently if the brushes are on as large a grid as possible.Convert to Static Mesh
This allows the user to convert the currently selected brush or brushes to a static mesh. Simply select all of the brushes you want to convert, right-click on one of them (if you right-click on a vertex point, that determines where the origin of the mesh will be!!), select the option and then assign the new mesh a package, a group (optional) and give it a name. You will then be able to open that package in the generic browser, select the new mesh and then place it in the level with the right-click menu. Note that newly-created static meshes will not have collision unless you assign it to them. If the mesh is simple, you can place it in the map right on top of the brushes that you used to create it. Select the mesh & all of the brushes, right-click, and select Save as Collision. This will assign the collision of those brushes to the mesh (double-click the mesh in the generic browser, and hit the pink box to see the collision). If you have a complicated mesh, you may want to build collision that is simpler, to help with framerate.Add Volume
An alternative to the Add Volume button.Align
- Snap to Floor - Moves geometry to the base of the base of the BSP zone that it is within.
- Align to Floor - Aligns to the orientation of the BSP zone that it is within.