Shokunin
2015-02-17 05:09:45 UTC
Hello everyone,
I'm a long time lurker who is on the verge of completing a mod I've been
working on for a couple years. I've run into a very strange performance
problem that has me completely stumped and I think I need some help.
This only occurs on the final chapter of my mod when playing completely
through in one sitting. It's only about 1-1.5 hours so I expect this to be
fairly common. (I hope!) When the final map loads performance drops
dramatically (< 10 fps) due to dynamic light rendering according to the
+show_budget breakdown, but again this only happens when playing through
the whole mod from the beginning (3 map transitions + background map in the
main menu).
There are no env_projectedtexture lights on, no light_dynamics on, and no
normal lights or light_spots with custom appearances on. If the map is
loaded directly there are no performance problems.
Even more strange, by pure luck I've found out by setting the cvar,
r_unloadlightmaps 1, performance is immediately recovered. I can't find any
documentation on what exactly this does and it appears to be an engine cvar
so I can't look at the code to debug. Sometimes leaving that on for 30
seconds then setting it back to 0 keeps the performance, sometimes it needs
45 seconds, sometimes it needs 90, sometimes it needs more.
-Can anyone at valve or on the list help me?
-Would anyone know what exactly r_unloadlightmaps does? It seems obvious,
but I can't see any difference in any of the lightmaps or lighting.
-Can I leave r_unloadlightmaps set to 1 as a work around?
I'm still using Source SDK 2007 since I've added hundreds of code changes
and I really want to avoid switching to 2013, plus I'm basically done at
this point minus this one issue. I've also applied all the code changes to
the env_projectedtexture entity as suggested here:
https://developer.valvesoftware.com/wiki/Env_projectedtexture/fixes
TBH, some of the fixes listed on that page are a bit above my knowledge,
I'm afraid I've created some performance or memory leak that way. Thanks!
Any help would be greatly appreciated!
I'm a long time lurker who is on the verge of completing a mod I've been
working on for a couple years. I've run into a very strange performance
problem that has me completely stumped and I think I need some help.
This only occurs on the final chapter of my mod when playing completely
through in one sitting. It's only about 1-1.5 hours so I expect this to be
fairly common. (I hope!) When the final map loads performance drops
dramatically (< 10 fps) due to dynamic light rendering according to the
+show_budget breakdown, but again this only happens when playing through
the whole mod from the beginning (3 map transitions + background map in the
main menu).
There are no env_projectedtexture lights on, no light_dynamics on, and no
normal lights or light_spots with custom appearances on. If the map is
loaded directly there are no performance problems.
Even more strange, by pure luck I've found out by setting the cvar,
r_unloadlightmaps 1, performance is immediately recovered. I can't find any
documentation on what exactly this does and it appears to be an engine cvar
so I can't look at the code to debug. Sometimes leaving that on for 30
seconds then setting it back to 0 keeps the performance, sometimes it needs
45 seconds, sometimes it needs 90, sometimes it needs more.
-Can anyone at valve or on the list help me?
-Would anyone know what exactly r_unloadlightmaps does? It seems obvious,
but I can't see any difference in any of the lightmaps or lighting.
-Can I leave r_unloadlightmaps set to 1 as a work around?
I'm still using Source SDK 2007 since I've added hundreds of code changes
and I really want to avoid switching to 2013, plus I'm basically done at
this point minus this one issue. I've also applied all the code changes to
the env_projectedtexture entity as suggested here:
https://developer.valvesoftware.com/wiki/Env_projectedtexture/fixes
TBH, some of the fixes listed on that page are a bit above my knowledge,
I'm afraid I've created some performance or memory leak that way. Thanks!
Any help would be greatly appreciated!