Build Settings

Rebuild Properties

To access the settings used for building CSG brushes into meshes, select the CSGModel in the Unity’s Hierarchy view. You will then see the CSG Model component on the inspector, with a fold for build settings. In the build settings you’ll see a list of check boxes. These allow you to change some of the parameters used by SabreCSG. Note that changing these settings requires a rebuild for the final meshes to be updated.

Generate Lightmap UVs enable this to used baked lighting with the built meshes

Recalculate Normals – enable this to force Unity to recalculate the normals after mesh generation from each triangle. This is rarely needed and enabling this will make all built geometry faceted.

Generate Tangents – must be enabled for standard bump mapping shaders

Generate Collision Meshes – must be enabled for the final mesh to have collision.

Some of these settings will increase build times in complicated levels, so you may find it helpful to disable some settings while working on the level. For example, disabling the collision pass will typially halve the build time and may be useful while working on some areas of the level.

Exporting .OBJ Files

You can also export the built geometry as an OBJ file for use in external art tools from the build properties by clicking the Export OBJ button. SabreCSG exports the built polygons as n-sided faces preserving quads and making it easier to work with in art tools.

Next page: Brush Properties