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

Can too many sectors affect map performance?

Question

I like to play around with lightning on my maps, and I thought of using lots of sector with light gradient to make light sources (such as torches etc) look better in darker areas. Obviously this will require me to draw a lot of sectors around said sources to get the best effect. My question is, will this affect the game performance when playing the map? I know the editor might lag a bit, but I'm worried about the in-game performance.

Share this post


Link to post

8 answers to this question

Recommended Posts

  • 2

Having played around with quite stylised sector lighting, my experience has been that unless you're going really crazy, it shouldn't have a significant effect on performance. Even with lots of gradient lines overlapping each other and/or other parts of map geometry (example), I never really noticed any performance issues when using just the software renderer, aside from the very occasional frame drop. That said, I only ever worked within Doom's traditional light scale - so, 0, 16, 32, 48, 64, etc. If you prefer a more fine-grained scale - so, gradients composed of many very thin bands with very small increments - then perhaps things will be different. I was also fairly careful about using just enough lines to get the effect I wanted; it's easy to go overboard, especially if you're curving lines and being overly liberal with the vertices.

 

It also goes without saying that performance will depend on port and processor power; when it comes to others playing your stuff, you can exert some degree of influence over the former, but zero over the latter.

 

Doom's lighting is an underused resource - good luck!

Share this post


Link to post
  • 1

If you have many different sectors with different properties, yes, it may impact performance. How much will depend on the engine being used and the target hardware, of course. In general I'd expect it to hit software renderers harder because they cannot do any visplane merging if the properties differ.

 

Share this post


Link to post
  • 1

The biggest issue I believe is the amount of detail visible at any one time. If you have crazy detail levels, make sure you section off areas behind void space and doors and things like that. One big room with tons of detail is going to be worse than the same room divided into different sections by unplayable or empty space.

Share this post


Link to post
  • 1

That's basically rght, but some ports (e.g., ZDoom and its offspring) aren't so constrained.

Share this post


Link to post
  • 1

You should look into dynamic lights, as having a TON of sectors is really not good for performance when compared to good use of attenuated spotlights and such...

Share this post


Link to post
  • 0
1 hour ago, durian said:

That said, I only ever worked within Doom's traditional light scale - so, 0, 16, 32, 48, 64, etc. If you prefer a more fine-grained scale - so, gradients composed of many very thin bands with very small increments - then perhaps things will be different.

I remember reading somewhere (I can't remember where) that the Doom engine effectively doesn't realize a difference between very small divisions in lighting, so while it can tell the difference between 176, 192, and 208 (for example), it would be less successful with 176, 177, and 178 (for example). Maybe the engine would still try to render it, you might just not see a difference from it, in which case, your performance would suffer for nothing.

Share this post


Link to post
  • 0

I think it should be stated that, in the end, this is an engine using methods designed to run smoothly on 90s hardware.  Unless you are trying to do a particularly impressive project (or using portals), you can probably assume that it will run relatively well on a newer computer.  If taking time to worry over this means you're not going to have the time to make your project really shine, don't worry about it.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×