ZDBSP binary map format SSECTORS/SEGS limit?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
DoomerMrT
Posts: 370
Joined: Tue Nov 21, 2006 10:58 am
Location: Budapest,Hungary

ZDBSP binary map format SSECTORS/SEGS limit?

Post by DoomerMrT »

I keep hitting some limit while mapping in binary map format. The SSECTORS and SEGS of the map does not get built.

Map statistics:

21013 Vertices
25853 Linedefs
48082 Sidedefs
5808 Sectors

With these statistics, it is working. Getting somewhat above these though causes SSECTORS and SEGS to be 0 byte lumps inside the wad, rendering the map unplayable. What are the limits of the nodebuilder (or the map format maybe?). BTW, the map has to be in binary (Doom in Hexen) format.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZDBSP binary map format SSECTORS/SEGS limit?

Post by Graf Zahl »

Yes, you are hitting the SEGS limit of 65536 with that map - which makes ZDBSP automatically build extended nodes. Those only occupy the NODES lump which contains all the needed data, the other two will remain empty.
User avatar
DoomerMrT
Posts: 370
Joined: Tue Nov 21, 2006 10:58 am
Location: Budapest,Hungary

Re: ZDBSP binary map format SSECTORS/SEGS limit?

Post by DoomerMrT »

Thank you for the detailed answer :)
User avatar
DoomerMrT
Posts: 370
Joined: Tue Nov 21, 2006 10:58 am
Location: Budapest,Hungary

Re: ZDBSP binary map format SSECTORS/SEGS limit?

Post by DoomerMrT »

I could build the nodes with Zen Node and it appears there are "only" ~59200 SEGS. Doesn't that mean that ZDBSP's automatic extended node building triggers too early? Or it might mean that SEGS are split differently, resulting greater number with ZDBSP?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZDBSP binary map format SSECTORS/SEGS limit?

Post by Graf Zahl »

No, it means that ZDBSP tends to create larger BSPs. Zennode has always been more efficient here, but it's always a trade-off between loss of vertex precision, an unbalanced BSP tree and more data.
User avatar
DoomerMrT
Posts: 370
Joined: Tue Nov 21, 2006 10:58 am
Location: Budapest,Hungary

Re: ZDBSP binary map format SSECTORS/SEGS limit?

Post by DoomerMrT »

That explains it. I had to fix some problems with 1 unit wide sectors where bounding vertexes overlapped to other adjacent sectors after building the map with Zennode. Other than that the map looks fine, just used less SEGS on the cost of precision.
Bauul
Posts: 78
Joined: Mon Aug 29, 2016 4:23 pm

Re: ZDBSP binary map format SSECTORS/SEGS limit?

Post by Bauul »

I had a lot of fun trying to get my head around this just today actually. From what I can work out, there are essentially a series of map-complexity 'milestones' as it were where compatibility slowly decreases in breadth. I might have the details wrong, but from what I've gathered, you're looking at the following:

(Note: these limits apply to all lumps in the data, but the ones I've listed below are the ones that are typically the first to be hit)
  1. Up to 32,768 SEGS: Any map format, any source port (notwithstanding other limits like Visplanes)
  2. 32,768 to 65,536 SEGS: Any map format, but limit-removing source port needed, so excluding only the really hardcore vanilla ports like Chocolate
  3. 65,537 or more SEGS, but 65,536 or fewer Sidedefs: BSP map formats must support extended nodes, i.e. ZDBSP or DeepBSP. Source port compatible with those node builders needed.
  4. 65,536 Sidedefs + a varying amount (depends on map), but 65,536 or fewer Linedefs: GZDoom Builder automatically implements Sidedef compression to try to keep the final number under 65,536. Combined with extended nodes, this is absolutely pushing the limit of BSP.
  5. 65,536 or more Linedefs, or far more than 65,536 Sidedefs: Only UDMF works, and the source ports that support it.
Last edited by Bauul on Thu Sep 08, 2016 9:11 am, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZDBSP binary map format SSECTORS/SEGS limit?

Post by Graf Zahl »

An additional limit for 5. is 65535 linedefs. And this is a hard limit. If it gets exceeded the binary map format won't do it anymore. With sidedef compression this is more likely to occur before the compressed sidedef limit is reached.
Bauul
Posts: 78
Joined: Mon Aug 29, 2016 4:23 pm

Re: ZDBSP binary map format SSECTORS/SEGS limit?

Post by Bauul »

Graf Zahl wrote:An additional limit for 5. is 65535 linedefs. And this is a hard limit. If it gets exceeded the binary map format won't do it anymore. With sidedef compression this is more likely to occur before the compressed sidedef limit is reached.
Thanks! I didn't know how effective the Sidedef compression actually was, so thanks for the information. I've updated my post above for posterity.
Locked

Return to “Editing (Archive)”