Huge framerate drop on map reload ... ??

Discussion in 'Mapping Questions & Discussion' started by Loc_n_lol, Sep 23, 2009.

  1. Loc_n_lol

    Loc_n_lol L10: Glamorous Member

    Messages:
    726
    Positive Ratings:
    273
    Ok, this one's causing me nightmares... :bored:

    I have this map I'm working on. When I launch the map right after starting the game, I get more or less an average 150 FPS, which I consider good given my config.

    However, if I load any other map (especially a big one, say hydro or meridian...), then reload my map, suddenly I'm down to 30 fps (unacceptable), while looking exactly at the same place as before... ?
    This seems to wear off over time or if I mess up enough with the camera in spectator mode. FPS then return to their normal value.
    Note that my fps are still affected by what I'm looking at, so for exampe staring at a wall in a closed room would net me 300 fps, while going outside the map and looking at it in its entirety would give me about 15 fps...

    This problem didn't occur on the previous version of my map. Considering what has changed (mostly texturing and lighting), I tried to remove various stuff to see if it was related. removing water and returning to dev textures changed nothing but removing all lights except the light_env seems to get rid of the problem... Though that's not really an acceptable solution.
    Not running vrad and having the map fullbright also prevents this fps drop.

    Does anyone have a clue what could have gone wrong with my map ? :confused:
     
  2. Cameron:D

    Cameron:D L6: Sharp Member

    Messages:
    363
    Positive Ratings:
    146
    Are you using any light_dynamic's?
    These make a large performance impact.
     
    • Thanks Thanks x 1
  3. Loc_n_lol

    Loc_n_lol L10: Glamorous Member

    Messages:
    726
    Positive Ratings:
    273
    Nope. Only static lights.
    What I really don't get is why it only happens if I load the map after another one...
     
  4. Washipato

    Washipato L3: Member

    Messages:
    149
    Positive Ratings:
    96
    Open +showbuget (sv_cheats must be on) and take a screenshot somewhere. Then reload the map to get the fps drop and take a screenshot from the same position that you took the first one. Compare them or post them here.

    I should give us an idea of what is the problem
     
    • Thanks Thanks x 1
  5. Loc_n_lol

    Loc_n_lol L10: Glamorous Member

    Messages:
    726
    Positive Ratings:
    273
    Good idea, here goes :

    [​IMG]
    [​IMG]

    Mat_ThreadedEndframe.

    Err... yes ? Pleased to meet you ?... :facepalm:
     
  6. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    Happens to me sometimes when I alt-tab between apps (despite the game running in windowed mode) and my FPS drops all the way down to 20 FPS until I join a team.
     
  7. Washipato

    Washipato L3: Member

    Messages:
    149
    Positive Ratings:
    96
    Never heard about it before :mellow:. There is no information in google neither.

    Perhaps it has something to do with multiple cores compatibility, but Im just guessing
     
  8. Loc_n_lol

    Loc_n_lol L10: Glamorous Member

    Messages:
    726
    Positive Ratings:
    273
    Seems so.

    I disabled multi-core rendering, now the huge spike is on dynamic light rendering.
     
  9. Washipato

    Washipato L3: Member

    Messages:
    149
    Positive Ratings:
    96
    Didn't you say that you only had static lighting? Are you sure you dont have any entity, like a point_spotlight, creating dynamic lights?
     
  10. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,527
    As I explained to him in the chat, dynamic light rendering includes more than light_dynamic (which actually doesn't even work in TF2, same with that part of point_spotlight), and includes anything that doesn't have static light data. prop_dynamic, players, physboxes and other such things all count towards it.
     
    • Thanks Thanks x 1
  11. Loc_n_lol

    Loc_n_lol L10: Glamorous Member

    Messages:
    726
    Positive Ratings:
    273
    Last edited: Sep 23, 2009
  12. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,527
    I was interesting the the texture budget for when the OTHER thing was spiking :/ mat_threaded is obviously something to do with the material system.
     
  13. Loc_n_lol

    Loc_n_lol L10: Glamorous Member

    Messages:
    726
    Positive Ratings:
    273
    :facepalm:

    ok...

    Before :

    Global
    Per-frame


    After:

    Global
    Per-frame

    I'm not sure what to make of it though...
    My textures occupy more memory when it's running fine ?
     
  14. Loc_n_lol

    Loc_n_lol L10: Glamorous Member

    Messages:
    726
    Positive Ratings:
    273
    I got it.


    Note to self : never ever give a name to a light just to keep track of it. :facepalm:
     
  15. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    Pretty sure you can use HammerID to keep track of things. :p
     
  16. Cameron:D

    Cameron:D L6: Sharp Member

    Messages:
    363
    Positive Ratings:
    146
    Mat_threaded is to do with multicore rendering IIRC
     
  17. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,527
    I had assumed both. Anything mat_* is usually the material system.