Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAX_MAP_BRUSHSIDES, MAX_MAP_PLANES and other brush face count problems when decompiling Black Mesa maps #105

Open
thisis2838 opened this issue Jul 8, 2020 · 4 comments

Comments

@thisis2838
Copy link

I've been doing a project involving modification of Black Mesa's maps and this error has been plaguing my progress. Deleting func_brush's and func_detail's did the trick but that'd render the map unrecognizable.
There's nearly no difference between brushes from decompiled maps and officially released vmf's so I am completely lost on how to resolve this issue.

@thisis2838 thisis2838 changed the title MAX_MAP_BRUSHSIDES and other brush face count problems when decompiling Black Mesa maps MAX_MAP_BRUSHSIDES, MAX_MAP_PLANES and other brush face count problems when decompiling Black Mesa maps Jul 8, 2020
@NetLuiz
Copy link

NetLuiz commented Aug 2, 2020

I have same problem in some CS:GO maps. I add literally nothing to map. I get MAX_MAP_PLANES error. When I delete some brushes or use nodraw to optimize map it compiles without errors.

@rihi
Copy link
Collaborator

rihi commented Aug 2, 2020

I had this problem with high detailed maps as well. I don't quite know what causes it but my guess would be it's because of floating point math/rounding errors.

For MAX_MAP_BRUSHSIDES the wiki states:

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, 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.

In other words, a cube for example only has 6 brush sides. However, if the cube has only the slightest rotation around one axis, suddenly 4 faces don't align with the bounding box anymore. Consequently, this means that now an additional of 4 brushsides are counted towards the MAX_MAP_BRUSHSIDES limit.

When bspsrc decompiles the map, floating point math could cause brushsides to be slightly angled compared to how they were in the original vmf.

Some time ago I already though about ways of fixing this but only came up with vague concepts and never actually implemented anything. So I guess you're sadly out of luck with this problem, as there is currently no fix for it.

@bottiger1
Copy link

This can possibly be fixed by rounding brush coordinates to the nearest integer if the distance is less than some small number like 0.01.

@Kud-Fountain
Copy link

I'd like to bump it up again. Since some of the highly detail maps (like Danger Zone maps and some Vindictus maps) can not be compiled with the decompiled vmfs. Will be very appreciated if @rihi can take time to take a look in it and fix it on 1.4.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants