In SabreCSG, every brush has a set of common properties. Some brush types, such as the Prism, have expanded functionality from these settings. To access these settings, select a brush and view it in Unity’s Inspector window. Many of these values can be changed through the tools described in the Brush Tools page or through shortcuts.
Add and Subtract Modes
The most important property of all brushes is its mode. This can be set to either Subtract or Add. When building the level geometry from the CSG brushes, SabreCSG starts working from first brush under CSGModel to the last. A brush in additive mode will add a volume to the level geometry, which by default is void and empty. A brush in subtractive mode will subtract from any additions that came before it. If a brush in add mode intersects with a brush in subtract mode, the final geometry depends on the order that these brushes appear in the Hierarchy.
In the hierarchy, additive brushes are denoted by a blue plus sign, while subtractive brushes are denoted by an orange minus sign. In the scene window, additive brushes will appear blue, while subtract brushes will appear orange.
Brushes in subtractive mode can only subtract from previously added brushes; you cannot subtract from nothing. Because of this, the first brush in the under CSGModel in the Hierarchy must always be in add mode. If the first brush is in subtract mode, SabreCSG will display a warning in the scene view and if a build is attempted SabreCSG will automatically change the brush to additive.
The recommended way of changing brush mode is not through the inspector however, you can change a brush’s mode with the keyboard shortcuts A and S for “add” and “subtract” respectively. You can also change a selected brush’s mode from the SabreCSG main toolbar.
Prisms and other Brush Types
Other settings include a brush type allowing you to change a cube to a cylinder for example, and a side count if the brush is a prism. If you change the brush type or prism side count, click the Reset Polygons to regenerate the polygons.
If you want to change the scale of a brush by means other than the standard tools, the brush properties includes a field for this. Enter a scale value either as a single decimal (e.g. 3) or provide a scale triplet (e.g. 3,1,2). To apply the scale modifier, click the Rescale button. This is especially useful for prisms and cylinders, since it allows you to increase the radius without needing to individually move vertices, or for turning new cuboid brushes into predefined spaces.
Importing Brushes from Meshes
You can also replace the polygons on a brush by importing geometry from meshes built in external tools. To do this drag a mesh from the Unity Project window onto the mesh field then click import. It is important to make sure that the mesh has keep quads turned on (you can find this on the model importer that the mesh comes from), otherwise the brush polygons will be triangulated which is more difficult to work with than quads.
Keep Quads should be set on the ModelImporter
Next page: SabreCSG Settings