MAX MAP BRUSHSIDES: Difference between revisions
Miltonmonkey (talk | contribs) mNo edit summary |
No edit summary |
||
(13 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
'''MAX_MAP_BRUSHSIDES''' occurs when your map exceeds the | {{DISPLAYTITLE:MAX_MAP_BRUSHSIDES}} | ||
{{LanguageBar}} | |||
'''MAX_MAP_BRUSHSIDES''' occurs when your map exceeds the maximum defined brush face amount. | |||
The current limit is '''65536''', | The current limit is '''65536''', due to the engine internally using 16-bit integers (also known as "shorts") to count the number of brushsides. The maximum value of a 16-bit unsigned integer is 65535 (2^16), hence the limit. | ||
There is no fix for this without | There is no fix for this without changing the brushside structure in the engine to use 32-bit integers. | ||
{{note|The BSP format already stores brushsides as 32-bit integers, so such a change wouldn't break compatibility with existing maps.}} | |||
== Hammer/Compiled brushsides discrepancy == | |||
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 (required for [[QPhysics]]), 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 | |||
== Instance discrepancy == | |||
Putting angled geometry in an instance will '''lower''' brushsides. This can be easily observed by compiling a rotated building in the main map, then in an instance, and comparing the brush side count. It is unknown why this works, but it messes up some [[QPhysics]] calculations. | |||
==External links== | |||
* [https://tf2maps.net/threads/reducing-map-brush-sides-via-brush-shape-manipulation.25949/ TF2Maps.net Article on Reducing "Brush Sides"] | |||
[[category:Level_Design]] | [[category:Level_Design]] |
Latest revision as of 12:04, 13 July 2025
MAX_MAP_BRUSHSIDES occurs when your map exceeds the maximum defined brush face amount.
The current limit is 65536, due to the engine internally using 16-bit integers (also known as "shorts") to count the number of brushsides. The maximum value of a 16-bit unsigned integer is 65535 (2^16), hence the limit.
There is no fix for this without changing the brushside structure in the engine to use 32-bit integers.

Hammer/Compiled brushsides discrepancy
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 (required for QPhysics), 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
Instance discrepancy
Putting angled geometry in an instance will lower brushsides. This can be easily observed by compiling a rotated building in the main map, then in an instance, and comparing the brush side count. It is unknown why this works, but it messes up some QPhysics calculations.