Constructor/DetailBrushes

From TDN

Detail Brushes

The objective of this article is to explain the purpose and proper use of the detail brush in Constructor.

Below you see a screen shot of a simple scene in Constructor. This is an example of a possible situation where using detail brushes is a good idea. The large box could be a building, and the yellow frame would be a window-frame, engaged columns, pipes, etc. Anything that butts right up against the main wall of the building or structure.

Note that the "frame" brushes do not intersect the main brush. They touch it and share a face. Having overlapping brushes is considered by professionals to be sloppy modeling technique.

Image:detailbrushesexample.jpg

When Constructor (or any map editor, using map2dif) exports the DIF, brushes that touch or intersect "cut" each other up into faces (imagine taking two cubes and doing a boolean operation in Constructor - it's similar). When they are rendered in-game, these faces are rendered as polygons.

Faces that end up "inside" the shape, that would not be seen from any angle, get removed via the Hidden Surface Removal procedure.

As you can see below, when we allow these "windowframe" brushes to cut the main brush, we end up with lots of faces (polygons) where one (two triangles) would do fine. Even in this very simple example, we are creating 26 visible faces from 2.

Image:Detailbrushesexample2.jpg

As you can probably imagine, when there are many of these small brushes with different sizes, angles, and alignments, it gets very complicated very fast.

Herein lies the beauty of Detail brushes. Detail brushes do not cut regular structural brushes. So the scene above, as a DIF, would still only have two triangles to draw for the main wall.


Besides saving polygons, there are other reasons to minimize the number of cuts/faces in DIFs:


Light Maps

Sometimes you will see "seams" in the DIF lighting in-game, and these seams will show up at the borders between faces (e.g. the green lines above). Often the combination of using more detail brushes and a smaller lighting scale value in the worldspawn entity will fix these light seams.


Crash on Export

Sometimes, especially when using map2dif, the cutting-up process will get so complex that it will crash the exporter. This manifests in "winding errors" and other cryptic error messages.


Invisible Faces

In Constructor 1.0.2, there was a problem where the Hidden Surface Removal process would sometimes hide surfaces that should not be hidden. Using detail brushes helped mitigate the problem. In Constructor 1.0.3 this issue is fixed.


Lost Functionality

When using detail brushes for an entire scene you will "You lose the ability to portal/zone them".