Hi, folks.
I recently found some useful information about brushes and the way Hammer treats them when it compiles. Have you ever received the MAX_MAP_BRUSHSIDES error because you have too many brushes?
Taken from the page on MAX_MAP_BRUSHSIDES on the Source wiki:
Imagine a brush is like a prop in that it has an invisible bounding box. I don't know if this is actually the case or if it's a learning aid. It's probably something to do with the way the engine works.
Basically, if a brush face isn't parallel with any grid line, i.e. it's diagonal, it can cause the brush to take on one extra 'brush side' in the form of a bounding box side. If a face is parallel, then that side of the bounding box will be merged in to the face.
Here are some examples. The blue shape is the brush, and the green shape is a representation of the brush's bounding box. Bear in mind the numbers below the image also reflect the 3D faces that this 2D image doesn't show, those being the brush faces on the back and front.
Where a brush side isn't taken up by a parallel face of any length, the bounding box side will count towards the total.
In the following image I didn't work out the total brush sides manually. I compiled an empty, cordoned map with a single point entity and the compile log showed 36 brush sides. I then compiled the map with each of these constructions in turn and subtracted 36 from the reported number of brush sides in each compile log. The numbers below the image should be the accurate number of brush sides for each construction.
This doesn't stop with complex brushwork. If you have been using the vertex editing tool to 'mitre' the corners of brushes so they meet up nicely, that will generate one extra brush side per non-parallel, diagonal face. It sounds minor, but it could rack up. Consider the pros and cons.
Thanks,
Matty
I recently found some useful information about brushes and the way Hammer treats them when it compiles. Have you ever received the MAX_MAP_BRUSHSIDES error because you have too many brushes?
Taken from the page on MAX_MAP_BRUSHSIDES on the Source wiki:
The term "brush sides" is a bit misleading, if you've paid attention to your brush sides in hammer before, you may have noticed the compiled result was higher.
This is because when compiling, it includes the bounding box of a brush, which can be up to an additional 6 brushsides per brush. If a face is lined up with the edge of the bounding box(meaning not angled in any way) it will not add an additional brushside.
Example: A 5 sided pyramid shaped brush with the bottom face lining up the bottom of the bounding box. While the brush itself is only 5 sides, it will count as 10. The 5 extra brushsides come from the bounding box.
As rule of thumb for figuring this out easier. 6 + angled faces = brushsides per brush
Imagine a brush is like a prop in that it has an invisible bounding box. I don't know if this is actually the case or if it's a learning aid. It's probably something to do with the way the engine works.
Basically, if a brush face isn't parallel with any grid line, i.e. it's diagonal, it can cause the brush to take on one extra 'brush side' in the form of a bounding box side. If a face is parallel, then that side of the bounding box will be merged in to the face.
Here are some examples. The blue shape is the brush, and the green shape is a representation of the brush's bounding box. Bear in mind the numbers below the image also reflect the 3D faces that this 2D image doesn't show, those being the brush faces on the back and front.

Where a brush side isn't taken up by a parallel face of any length, the bounding box side will count towards the total.
- 6x brush faces, 0x bounding box sides = 6 total brush sides.
- 5x brush faces, 2x bounding box sides (right and top) = 7 total brush sides.
- 6x brush faces, 4x bounding box sides (all four sides) = 10 total brush sides.
- 6x brush faces, 1x bounding box sides (top) = 7 total brush sides.
- 7x brush faces, 0x bounding box sides = 7 total brush sides.
In the following image I didn't work out the total brush sides manually. I compiled an empty, cordoned map with a single point entity and the compile log showed 36 brush sides. I then compiled the map with each of these constructions in turn and subtracted 36 from the reported number of brush sides in each compile log. The numbers below the image should be the accurate number of brush sides for each construction.

- 146 total brush sides.
- 143 total brush sides.
- 112 total brush sides.
This doesn't stop with complex brushwork. If you have been using the vertex editing tool to 'mitre' the corners of brushes so they meet up nicely, that will generate one extra brush side per non-parallel, diagonal face. It sounds minor, but it could rack up. Consider the pros and cons.

- 14 brush sides.
- 12 brush sides.
Thanks,
Matty
Last edited: