EarthQuake
9.5 on the Richter!

Posts: 2745
Registered: 05-03 |
peach freak said:
Would the amount of segs be reduced if I merged those little square sectors that lay on each side of the red carpets on the staircases?
Also, the "grand stairway" is suppoosed to resemble the Resident Evil mansion. So yeah, it's a pretty hefty map if you want to see it in full.
No, probably not. If it's how I'm imagining it, you have a staircase, with each step split into three sectors (the middle being carpet), right? So no, merging sectors would not do anything to reduce SEGS (Edit: sorry, nevermind; was not thinking clearly :p). A SEG is a line segment that is generated when the nodebuilder splits sectors in subsectors.
To really understand what's going on here, you need to know that all sectors must be broken down into convex shapes when the nodes are built. So if I had an L-shaped sector, it would have to be divided somewhere and broken into two rectangles. Imagine that it looks something like this:
http://img24.imageshack.us/img24/4166/heht.png
Note this might not be 100% accurate, but it helps to illustrate. In image A, this is what you have when you've just completed your L-shaped map and before you've decided to build its nodes. In B, the nodebuilder is run and decides to break down the sector into an upper and lower subsector so the map can be properly rendered in-game. In C, the nodebuilder takes your map, and saves the NODES, as well as the SEGS and SSECTORS lists (amongst other lumps) into the wad. In the above, the green counts remain unchanged, while red/blue ones are generated (or modified) by the nodebuilder. See the blue lines? Those are your segs. The linedefs don't change, but the nodebuilder keeps track of where the linedefs were split and stores them as SEGS. There are two SEG limits: the maximum viewable at once, and the maximum there can be in the entire map (which is a lot).
To reduce the number of SEGS in a particular scene, you have to pretty much guess how sectors are split and avoid cases where undesirable splits will occur, or just do it by trial and error. Imagine your sectors not as the shapes they appear as, but how they might be arranged into smaller rectangles. You can sometimes align your sectors in a way where they are not split into multiple subsectors, but this is harder than it seems.
Merging sectors does not matter in your case, because those sectors will still be split into smaller subsectors, and if they are already convex, there is nothing you can do other than simplify the geometry that is viewable at any given time...
Edit: Hold on, looking at the map :p
Meh, actually it won't let me download it. Just downloads some image file instead... I suspect GrayGhost is correct though. If you get rid of the "carpet" it will drastically reduce the SEG count for that area. Another suggestion would be to increase the step height, reducing the need for too many steps.
Last edited by EarthQuake on 12-27-11 at 05:17
|