How avoid BSP errors?

Tutorials and discussions about Mapping - Introduce your own ones!
User avatar
Feralidragon
Godlike
Posts: 5391
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: How avoid BSP errors?

Post by Feralidragon » Wed Sep 22, 2021 1:58 am

Swanky wrote:
Tue Sep 21, 2021 10:47 pm
Feralidragon wrote:
Tue Sep 21, 2021 2:40 pm
...long not very interesting monologue...
...I could go to lengths about why I don't care about a rounding issue on a mathematical problem that was left in the engine. As a mapper, you want practical solutions and even if Hourences was wrong in what he perceived, I valued his pointers into the right direction for many years and many, many maps. So you could spend more time iterating on the issue or fix it; as a mapper the problem is most often man-made and the solution often as simple as "build clean, transform your brush or order to last". Doesn't fix everything, granted, but from personal experience most other issues only come into place on big enough maps with many non-conform surfaces (such as terrain maps) where the rounding actually makes a difference (after rounding up / down).
Fair enough.

I am not trying at all to diminish his contributions to the community, but the fact remains that his tutorials can no longer be considered to be accurate, yet people are still actively using them as a base to try to understand and solve their issues, so my opening paragraph was essentially me throwing the towel in trying to even attempt to explain (again, and to the same people, mind you, not the community in general) why myths are myths, why Hourences tutorials should not be considered accurate anymore, etc, because I have done a lot of that already in other threads with the same people involved, so it was more of a rant if you will.

As for my explanation around the rounding issues and whatnot, it's an explanation aimed for those interested in understanding why stuff works the way it works, and one of the main reasons why problems arise if you do certain things.
At least for me, knowing this helps a lot in planning the map in such a way that it abides by certain rules to prevent 99% of all possible issues, to the point of not having to spend more than a few minutes fixing BSP issues.

Obviously, those who will still insist in the "old ways" anyway and still faithfully follow old tutorials, and often spend hours/days/weeks trying to design maps and fix BSP issues in the old way, are clearly NOT the target audience for that explanation, so they can just skip it and move along.

User avatar
Aspide
Average
Posts: 36
Joined: Wed Jun 09, 2021 12:13 am

Re: How avoid BSP errors?

Post by Aspide » Wed Sep 22, 2021 3:08 am

Wow, thanks Feralidragon. I had no idea of the internal process of BSP, so reading your explanation was mind blowing. Yes Hourences's tutorials are outdated, but I still have a lot of respect for his work. (I still have a bone to pick with him after the torture of playing Ortican in Unreal difficulty!!!), anyway I'm glad that someone truly understands BSP, I know I don't... :mrgreen:

Fun fact: I always make sure that the brushes of my maps are align to the grid because it's easier to organize all the environments together, not because of the calculations of the engine, so ironically i was following one of Feralidragon's advices all along.
Somewhere in Nevada...

Buggie
Masterful
Posts: 715
Joined: Sat Mar 21, 2020 5:32 am

Re: How avoid BSP errors?

Post by Buggie » Wed Sep 22, 2021 3:23 am

If any interested, investigation is over. Full report available on girhub: https://github.com/OldUnreal/UnrealTour ... -924521126

In short: Do not use invisible surfaces (invisible collision hull, Brush.PolyFlags & 1 == 1, or manually set for surface). Use empty masked texture for that.

OFC this issue fire not always, but better follow this rule and be happy for sure, rather in one day after some map change face issue. Especially after release, when it find not you.

Automatically merged

Live example from other map: viewtopic.php?p=131565#p131565

User avatar
sektor2111
Godlike
Posts: 5536
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How avoid BSP errors?

Post by sektor2111 » Wed Sep 22, 2021 8:30 am

Here is my "Investigation"...
MH-HP2-GrandStaircaseV3_bug3_hp2_crop9.7z
Invisible Collision is just Invisible and colliding.
ImOnIt.png
And... I removed PrePivot floating numbers. It's just a damn "cube", it doesn't need anything else but... fine tuning.
You do not have the required permissions to view the files attached to this post.

Buggie
Masterful
Posts: 715
Joined: Sat Mar 21, 2020 5:32 am

Re: How avoid BSP errors?

Post by Buggie » Wed Sep 22, 2021 10:08 am

Not really solution at all. i open map, press rebuild all and see black wall.
scr_1632301376.png
Any attempt "fix" this issue by change position or size of brushes not really fix anything. Just mask issue, make BSP in way, which not show this error.
This is not a permanent and can be destroyed in any time. As example map 2040: 291 invisible surfaces, no dead spot at all, for DM final version.
But attempt fix missing surface, start produce dead spots which "travel" by world.

It is like minefield. If you lucky you can run over it and not notice it. But next day you run little different and blow up.
You do not have the required permissions to view the files attached to this post.

User avatar
Feralidragon
Godlike
Posts: 5391
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: How avoid BSP errors?

Post by Feralidragon » Wed Sep 22, 2021 11:09 am

Yeah, in this case it ended up being a very specific bug related with invisible BSP surfaces, I had never seen that kind of bug before.
And it doesn't matter whether the brush is solid, semi-solid or non-solid, the issue is independent from the brush solidity.

You can fix it by setting the surface as a portal, which closes the zone up and prevents the void leak, but yeah, it's not ideal.

The main map itself overall is built in a very bad way by the original mapper, but that alone wasn't the reason for this particular issue.
But in one of the cases, changing some of the near brushes from solid to semi-solid fixed the issue for those as well, so it also goes down to how the cuts are being performed across these areas too.

User avatar
sektor2111
Godlike
Posts: 5536
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How avoid BSP errors?

Post by sektor2111 » Wed Sep 22, 2021 7:47 pm

Purpose of stage is testing if bug is there not for rebuilding it, maps generally are aiming game-play not editing them X times. To me it doesn't do any black thing but it needs polishing post-build and it works normally. At a moment in whatever random map by removing lights from void all lightning build went perfect... Probably Editor is not loving to work in void for no reason - just my thoughts...
If whatever random stage of a map does ugly stuff, it's not like it's always impossible to fix it. If someone else is rebuilding map for some reasons, it goes messed up, I witnessed such stages not once. Yes, in random moments when more maps are opened one by one I can see some shadows which are going vanished in a fresh Editing session. Lightning can go messed up in time in Editor. It's not like map won't work in run-time stage, Editor is not 100% relevant according to game facts. You might not see if a mover is flickering through a wall unless you want to look at polys. Run-time tells the real story.

:facepalm: :lol: I forgot Bot Support here...

Automatically merged

And some of my BSP issues.
MH-Sk_Godz
- I've imported some of those happily shared "prefabs", and then after re-building map I got a sudden dizziness when I was closer to throw everything;
- After removing that "prefab" all went back into a normal state;
- due to BSPCuts one of skyBoxes went with invisible surfaces on some non-solid mountains in BioSkaarj arena;
- I went to turn SkyBox up side down at once with SkyZone Actor;
- after that map went normal;
- in SkaarjMiniguners area it was needed to move those lamps because... area went messed up due to some pillars, or other reasons when room was crossed by a BSPCut;
- by moving them elsewhere things went normal.

Sometimes you need to know what original mapper was facing and where, for figuring sensitive area and trying to take some measures. It's not like a map with thousands of brushes is easy to manage especially if it's not your work. In MH-Tarmation2 I spent 1+ months for making it somehow usable - it's far from being normal, I can see that in how it drops some frames at random. There were brushes leaking into void and killing player, those being miss-aligned and their vertex numbers were having errors smaller than 0.3. It's not like Editor rounds well everything and Ferali explained what's going on with maths into a machine. This is a sort of lottery which to me is the hard way. It's 1000 times easier to do custom paths (also screwed up by any plain re-build) than wasting ages with a geometry coming from elsewhere and only original map maker knows what was going on at random.

Red_Fist
Godlike
Posts: 1936
Joined: Sun Oct 05, 2008 3:31 am

Re: How avoid BSP errors?

Post by Red_Fist » Sat Sep 25, 2021 6:06 am

"
Sometimes you need to know what original mapper was facing and where, for figuring sensitive area and trying to take some measures. It's not like a map with thousands of brushes is easy to manage especially if it's not your work. In MH-Tarmation2 I spent 1+ months for making it somehow usable - it's far from being normal, I can see that in how it drops some frames at random. There were brushes leaking into void and killing player, those being miss-aligned and their vertex numbers were having errors smaller than 0.3. It's not like Editor rounds well everything and Ferali explained what's going on with maths into a machine. This is a sort of lottery which to me is the hard way. It's 1000 times easier to do custom paths (also screwed up by any plain re-build) than wasting ages with a geometry coming from elsewhere and only original map maker knows what was going on at random."


That is correct, and correct thinking.

LlloL FINALLY a person on Earth who gets it.
Binary Space Partitioning

User avatar
sektor2111
Godlike
Posts: 5536
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: How avoid BSP errors?

Post by sektor2111 » Sat Sep 25, 2021 6:57 am

In BSP stage with that Non-Colliding stuff I have to admit that it might be a problem in Editor's Devs but... I believe it's reinforced correctly by mapping "solution".
Actually I have done an InvisibleCollisionhull dedicated from that special builder and not as a common cube. PolyFlags added in this case was 33 not 32. I don't know if Editor "understands" what you want when you are asking and Invisiblecollisionhull but you have visible surfaces and one single surface invisible. Is that brush visible or it's invisible ? Perhaps I can setup a stage ( already shown by SmeerCat ) in what InvisibleCollisionHull is supposed to be and not other way. Other way is no way and it will be damaging for lightning calculations.