Allow exceeding t-junction limit in VBSP #1563
Open
+27
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A problem that many modern maps have to deal with is the dreaded
Too many t-junctions to fix up!error. T-junctions are formed to avoid visual seams in touching geometry. The limit is typically hit by heavy usage offunc_detailgeometry touching the world, or water brushes. Many modern TF2 maps tend to hit this error due to higher density of brush detail.In VBSP, the limit is dictated by
MAX_MAP_PRIMITIVESandMAX_MAP_PRIMINDICESwhich are both 65536. ("Primitives" is what the fixed up geometry is called internally). Unfortunately, the BSP format stores primitive indexes as unsigned 16-bit integers, which means that these limits cannot be raised without modifying the BSP format, and therefore breaking backwards compatibility.Rather than a fatal error when hitting the limit, this PR modifies the behavior to issue a warning and continue compiling. In practice, this doesn't appear to have significant side effects, and it's certainly better than having to reduce
func_detailusage or convert them to entities etc. This is also better than using-notjuncor-nodetailcracksparameters, as this allows most of the seams to remain fixed.Note: VBSP++ implements this change, and it has been battle-tested publicly on many maps.