Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Blastfrog

Merging sectors: a worthwhile optimization?

Recommended Posts

I'm curious about something when it comes to making maps to be viewed in software rendering. If identical sectors within a room are merged (I don't care about unrelated rooms across the map), does that increase or decrease* the framerate? Or does it make no difference?

Despite running on a 3.7GHZ processor, I've been getting some framerate issues in Eternity with complex portal rendered areas when making the engine run at 60 tics per second without interpolation. I'm probably gonna have to get someone to optimize the code when my project is far more progressed than it currently is, but I'd like to squeeze out what performance I can in the meantime.

*Obviously this doesn't apply to BSP (at least in the same way) but recursive rendering in the pre-BSP version of Doom would definitely slow it down and would be more efficient to split it into multiple sectors.

Share this post


Link to post

Not really, unless merging sectors means you can reduce the number of subsectors, because that's the fundamental map structure that the game is concerned with drawing.

Share this post


Link to post

I do it to monster teleport-closets. It's easier to modify the property of one sector and have it apply to all of them. Also when I need to duplicate certain architectural fixtures.

And if you need to back out of your decision, just draw lines over the pesky sector in DB2 and you have a brand new independent sector again.

Share this post


Link to post

I don't think there's any performance difference that you get from merging sectors. But it is useful to merge a number of identical but separate sectors so that you can tweak their appearance a lot quicker by just adjusting one sector instead of selecting all and then adjusting them. Just have to be aware of sound propagation like printz said. And that a moving sector's sound will play from the center of the sector's total bounding box.

TheCupboard said:

And if you need to back out of your decision, just draw lines over the pesky sector in DB2 and you have a brand new independent sector again.


Or enter Make Sectors Mode (M) and click on the area in question. Also works for enclosed void areas.

Share this post


Link to post

Are there any automated ways of merging identical sectors btw? Yesterday I needed to lower to lowest floor a room with about 100 sectors (mostly ceiling detail). After lots of merging I managed to bring the number down to about 20 but it took some time to find all identical sectors and I wish it was possible to do via simple script or something.

Share this post


Link to post

DeepSea will do it; probably not a good option. But SRB2 Workbench can also merge all identical sectors, and will do so with regular maps (has done so far, at any rate).

Share this post


Link to post

I could be misremembering (this was years ago), but I once experimented with this idea. There was a map which had a ton of small metal pieces on lava and merging them did improve the frame rate (can't remember by how much). My theory there is since about 100 identical tiny sectors were removed cache hits improved.

But unless we're talking a massive reduction in close proximity, it shouldn't make a difference as far as the renderer is concerned.

Share this post


Link to post

In the case of maps with a lot of identical control sector references, you can benefit from merging. At least where 3d floors are concerned. Not sure how important that is these days. But back when I worked on stuff like that it was pretty important for people with slower computers.

Share this post


Link to post

I am pretty sure any portal-related slowdown is probably cache misses from checks being done against the portal clip window. It's *not* a free operation. Removing sectors inside the portal is not likely to make a huge difference.

Share this post


Link to post

While I'm not under the impression that sector mergers will affect your frame rate, merging similar sectors will reduce the map's file size by a small amount. This is generally important for vanilla maps that are scraping up against the save game limit.

Share this post


Link to post
exl said:

Or enter Make Sectors Mode (M) and click on the area in question. Also works for enclosed void areas.

That's wicked! Thank you!!

Share this post


Link to post
Quasar said:

I am pretty sure any portal-related slowdown is probably cache misses from checks being done against the portal clip window. It's *not* a free operation.

Could you please explain in further detail? Is it possible to optimize or is the performance as good as it's going to get? I might have to be more conservative with my portal usage if there's little chance of optimization.

To note, I'm not asking you or SOM to optimize it (though that'd be nice), but rather if it's theoretically possible to optimize by anyone with enough skill and determination.

BlueFeena said:

While I'm not under the impression that sector mergers will affect your frame rate, merging similar sectors will reduce the map's file size by a small amount. This is generally important for vanilla maps that are scraping up against the save game limit.

When attempting an ill-fated conversion of Chex Quest to the 32X engine, this was my only option to get the map to even start without a crash. Thankfully, many, many sectors were redundant. I gave up because it was a shitty project anyway.

As for my current project, I'm not too concerned with file size, though I'd like to keep it confined to under 700MB total (to fit on one CD). With my content plans, I'll probably be fine.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×