Author Topic: What does hurt performance?  (Read 2749 times)

zybork

  • Posts: 400
  • Turrets: +68/-72
What does hurt performance?
« on: May 11, 2010, 11:03:31 am »
When making a map, what does hurt performance? About the following points I am quite sure:

- Not using caulk on any surface no player will ever see.
- Overlapping objects, clip them for Christ's sake!

My question, does it hurt to have for instance a long hallway composed of many smaller segments instead of one big?
The number of point lights does not hurt, execpt of course you don't use 200 instead of 20, or does it?

What else hurts performance and thus is to be avoided? The wiki is not particularly good in that respect.
I have retired from Tremulous. Definetely. If you play a game just because it has become a habit, but u'r only feeling like a kindergarten teacher - well, maybe I am just getting too old (hell, I was a teenager when DukeNukem3D was *new*) - it's probably not a bad idea to just let it be. And I do.

Don't take this personally. Have fun, guys.

UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: What does hurt performance?
« Reply #1 on: May 11, 2010, 01:23:22 pm »
Yes, using caulk is important.
Mostly you just have to avoid having large amount of the map, or both bases, in PVS from any single point. There is a link to a good guide about VIS in Useful mapping links sticky. Basically the whole map area that any entity can reach without going through structural brushes is divided into convex areas, and every area that is visible (ignoring detail brushes and patches) from the any point in the area that you are in, will be rendered by the engine even if it is behind a wall. You can see how your map area is divided by opening the .prt file you get from compile with plugins -> prtview -> Load .prt file. And you can see which areas are actually rendered by using /r_shownormals 1 or /r_showtris 1 in /devmap.

Overlapping brushes don't hurt performance significantly, but they can cause all sorts of weird problems, so avoid overlapping at all cost. I'm not sure what you mean with having a hallway composed of many smaller segments? And I have yet to hear of anyone having performance issues caused by lots of lights. Mostly that would just increase compile time I guess...

zybork

  • Posts: 400
  • Turrets: +68/-72
Re: What does hurt performance?
« Reply #2 on: May 11, 2010, 03:52:46 pm »
I mean, is there a difference if you create a big wall out of 4 brushes instead of one big thing? If you do that, does it affect performance signifacantly? (Imagine the wall being cut in 4 by 2 cuts, and nothing else done to it)
I have retired from Tremulous. Definetely. If you play a game just because it has become a habit, but u'r only feeling like a kindergarten teacher - well, maybe I am just getting too old (hell, I was a teenager when DukeNukem3D was *new*) - it's probably not a bad idea to just let it be. And I do.

Don't take this personally. Have fun, guys.

gimhael

  • Posts: 546
  • Turrets: +70/-16
Re: What does hurt performance?
« Reply #3 on: May 11, 2010, 04:13:03 pm »
I have never seen a situation where the renderer is vertex-bound, so adding a few more vertexes shouldn't hurt.

On modern GPUs it's more important to optimize for good batching, i.e. drawing as many vertexes in one step as possible. The renderer creates one batch per shader (unless you have > 1000 vertexes for a shader), so you should avoid texture spam.


UniqPhoeniX

  • Spam Killer
  • *
  • Posts: 1376
  • Turrets: +66/-32
Re: What does hurt performance?
« Reply #4 on: May 11, 2010, 06:08:11 pm »
gimhael: you mean mappers should just avoid having too many different shaders? Are unconnected faces with same shader in the same batch? Tho it's possible to significantly increase (4x, sometimes a lot more) poly count just by having random useless vertexes all over the place, because of how the faces are divided into polygons at compile.

zybork: Having a couple of cuts won't make a difference, and you are very unlikely to reach a high enough poly count for a while. But on maps as detailed as karith and nexus (and blackout :P) you should already try to remove as many unnecessary vertexes as you possibly can, so people with lower hardware can also enjoy the map.

Another problem could appear if you keep the ceiling/floor in 1 piece, but divide the wall vertically in 2 (or more) faces: sparklies. It doesn't always happen, but often does at T-junctions where a corner/vertex of a brush touches the EDGE of another, then that edge can be seen through, as if there was a very thin gap. If there is anything with high contrast to the wall/ceiling drawn behind such an edge, it will easily stand out. It does not affect performance, just visuals.