Answered Why are all of the maps on the server recompiled?

Rhapsody

New Member
VIP
Unsure if this should be posted in Q&A or in Suggestions, but I posted it here. I joined this server after not playing Garry's Mod for a few years and noticed something interesting; all of the maps on this server are recompiled (and have _ahg as a suffix to indicate this). Generally this seems to come with more issues than benefits in my opinion, so I'm wondering if there's something that I'm missing. As far as I can tell, the maps are edited to
  • Add new props
  • Add new weapon spawns (and potentially player spawns, but I can't say one way or the other)
  • Remove offending content(?)
The issue with this is that decompiling maps back to .vmf is actually a lossy process and you, nine times out of ten, won't get the same result as the source .vmf file that the map was originally compiled from. In general this will manifest as
  • Things show up when they shouldn't, such as brushes that should be hidden
  • Props and some entities might be shifted from their original placement (as well as geometry, in some cases)
  • Lighting throughout the map might be incorrect in some way
  • Sounds might not be present from the original map (noticeable in the Al's Toy Barn map, which plays music at the spawn location in the original map but not in the recompiled version)
  • Cubemaps won't be loaded properly, leading to checkerboard patterns on glossy/reflective materials and props. Note that this is not an issue with not having certain games mounted, and will happen regardless of the games mounted.
  • Noticeable performance issues due to various optimizations not being carried over from the original .vmf to the recompiled version
The last two are extremely noticeable on a lot of the recompiled maps on this server. For the cubemaps, you can just do 'mat_specular 0' in console to reduce the impact (although this is a bandaid fix), but the performance issues that are introduced are irreconcilable. In general, these performance issues are due to optimizations made on the original map not being carried over when decompiled; this is usually things like certain compiler settings, nodraw not being applied to the correct brush faces (which can heavily affect performance as it adds up), and especially the decompiler not being able to preserve func_viscluster, which is an important optimization tool.

I'd consider making an album noting the differences between the original maps and the edited versions in terms of what's there that shouldn't be, but there's a large amount of maps, a large amount of differences, and the recompilation affects all of the maps on the server in one way or another. If the maps are being recompiled just to add weapon and player spawns, that's a huge waste because the creator of TTT actually has a tool on the workshop specifically to help with this, and it's beyond trivial to add weapon and player spawns with it, without recompiling the map. There's a similar tool for adding prop spawns to the map as well (it's advertised as being for Prop Hunt but it will work with any gamemode).
 
Solution
we want to provide the smoothest experience on the servers, and optimizing maps is part of this.
in addition to your points, maps are edited to:
  • ensure there are enough player spawns
  • not too little/too many weapon spawns
  • ensure no shiny props are in the map (broken cubemaps)
  • removing disturbing content
  • fix exploits
  • optimization
props are usually added for propkilling, which is another level of atmosphere in the gameplay, not "just to add them". they don't really have any effect on the map besides file size for LDR/HDR shadows, and if they do have a big impact (shadow/.VHV file size/.vvd (vertex) file size/texture file size), i usually find a cheap replacement.
there is a lot of LUA running while TTT is...

Rhapsody

New Member
VIP
Thanks for volunteering to do the lengthy mission of recompiling all the maps. You might be able to make some removed maps playable by scubbing Vladimir Putin language off them while you at it
What are you on about? My point is that from an initial perspective they don't need to be recompiled since the reasons I know of can be handled with addons instead. If maps have objectionable content in them, then why are they getting added in the first place?

Ignoring all that, why are you aggro posting?
 

green county health dept

Active Member
Legacy
I’m not even attempting to be aggressive, but if all the maps aren’t compiled there’s either a good reason for it, or it’s too tedious for the limited amount of developmental power to consider doing. If it’s something your soul yearns for max fps and graphical enjoyment, you might have to volunteer your sword and shield and show the add on magic to those seeking answers from the kingdom of add on narnia

My loosely based factual opinion is strengthened further with the loss of maps due to Russian text, as it seems culling the map pool is easier than fixing the offending text
 

Pierogi

Special Properations
Director
Developer
Prestigious
VIP
Legacy
Hey,
First off, thanks for writing up this post. I'll answer this to the best of my ability and leave the more technical stuff to @optimal, since he's the one that does most of the editing.

I ask optimal to edit maps for a variety of reasons. With amsterville, I asked him to remove the advertisements mentioning rape. On volcano, I asked him to edit it to make the windows breakable (they originally weren't). Other maps are just edited to be optimized, both for FPS and download size.

optimal optimizes every map I send, even when I just ask for a minor edit. He also tends to add props in the process. I've never seen him make a map's FPS worse. To the contrary, I've seen him do some pretty incredible improvements to FPS. For example, waterworld actually runs at a playable FPS now.
 

Rhapsody

New Member
VIP
Hey,
First off, thanks for writing up this post. I'll answer this to the best of my ability and leave the more technical stuff to @optimal, since he's the one that does most of the editing.

I ask optimal to edit maps for a variety of reasons. With amsterville, I asked him to remove the advertisements mentioning rape. On volcano, I asked him to edit it to make the windows breakable (they originally weren't). Other maps are just edited to be optimized, both for FPS and download size.

optimal optimizes every map I send, even when I just ask for a minor edit. He also tends to add props in the process. I've never seen him make a map's FPS worse. To the contrary, I've seen him do some pretty incredible improvements to FPS. For example, waterworld actually runs at a playable FPS now.
This is obviously a small sample size, but ttt_alstoybarn_ahg_v2 is a good example of a map that drops a heavy amount of frames between the AHG version and the original (ttt_alstoybarn) version. I easily get nearly double the framerate throughout the map in brief testing. There's other maps exhibit similar issues, but this in particular is one of the more glaring examples just due to the fact that there's decals and sound missing compared to the original. I understand that a lot of work is put in behind the scenes to help with FPS in these recompilations, but in general there will be FPS drops on more complex maps that were recompiled due to the amount of work that was likely put into them to make them performant that was lost in the decompilation process. It's much easier to optimize a map as it's being made as opposed to after the fact.

In any case I understand where you're coming from and that there's not really a good way to handle this; I'd mention asking the original author for the original .vmf, but that's probably not possible for a lot of these maps either due to unwilling authors, them not having the files anymore, or just not being easily contactable.
 

optimal

RICHEST OOTA
Assistant Director
Prestigious
VIP
Legacy
we want to provide the smoothest experience on the servers, and optimizing maps is part of this.
in addition to your points, maps are edited to:
  • ensure there are enough player spawns
  • not too little/too many weapon spawns
  • ensure no shiny props are in the map (broken cubemaps)
  • removing disturbing content
  • fix exploits
  • optimization
props are usually added for propkilling, which is another level of atmosphere in the gameplay, not "just to add them". they don't really have any effect on the map besides file size for LDR/HDR shadows, and if they do have a big impact (shadow/.VHV file size/.vvd (vertex) file size/texture file size), i usually find a cheap replacement.
there is a lot of LUA running while TTT is happening, because it is not sandbox. there is also client animation. the more players, the less FPS, literally. seeing as this affects FPS, most of these TTT maps are very old. editing maps has told me mappers have no idea how to optimize their map properly (its a very easy tell recently).

on to the current map issues, let me just preface this by saying i do not have server access to upload maps, nor do i really care, its all up to Pierogi.
"Things show up when they shouldn't, such as brushes that should be hidden"
hotline miami trigger brushes: this is not a decompilation issue. a simple misunderstanding, let me explain: map was obfuscated, func_buttons were NPC clip tool texture (and i like them to be triggers :^)). appears they were brush geometry along with trigger. i fixed this at the last second, and these last second (more like 15 minute) fixes were not immediately applied.

"Props and some entities might be shifted from their original placement (as well as geometry, in some cases)"
personally, i've never had or seen this happen, probably because i use the awesome epic hammer++.

"Lighting throughout the map might be incorrect in some way"
recently, at least with CS:S Hammer++, you must compile in HDR or the map will be fullbright. you can turn off HDR with mat_hdr_level 0. i've also been learning a lot more about lighting recently, if there's any lighting issues please feel free to make a suggestion. nothing that can't be fixed.

"Sounds might not be present from the original map (noticeable in the Al's Toy Barn map, which plays music at the spawn location in the original map but not in the recompiled version)"
not a decompilation issue: i removed this sound, due to file size, before fixing it in that small window, in which i converted it from .wav to .mp3. side note, VIDE, the best program to pack your map textures, does not always grab every texture, this also missing decals and scripts (soundscapes).

"Cubemaps won't be loaded properly, leading to checkerboard patterns on glossy/reflective materials and props. Note that this is not an issue with not having certain games mounted, and will happen regardless of the games mounted."
not really sure how to remedy this. seems like a clientside issue. i don't have this issue, ever, so i can't really fix it. i have a 100% clean, fresh, vanilla, default gmod. no workshop addons, no server addons (removed everything from \common\GarrysMod\garrysmod\download). some things could be; you're playing on dx81, you have old (pirated) CSS textures, you have textures in some source game messing around with gmod (yes this is possible, try loading a gmod .bsp with that .bsp being located in CSS' \maps\), you could have multiple versions (yes i've fixed 2 others issues with them having multiple gmod installs).

"In general, these performance issues are due to optimizations made on the original map not being carried over when decompiled; this is usually things like certain compiler settings, nodraw not being applied to the correct brush faces (which can heavily affect performance as it adds up), and especially the decompiler not being able to preserve func_viscluster, which is an important optimization tool."
im sorry, but this is just wrong, and far from what's actually happening. as i was starting out mapping maybe a year or 2 ago, it was bhop mapping that intrigued me. i love the maps, seeing what people can come up with, i love aesthetics (and also bhopping heh). first thing people told me was that you should make your map in nodraw, "unseen faces are bad!" they said. you can actually check what's really lagging a map, you can read all about it here (and its not even a cheat command so you can use it on the servers!). in reality, its stupid things like wooden support beams in an attic or garage lagging a map. unseen faces is probably the last thing affecting map performance. and, yes i know about func_viscluster not being preserved which is why i use it in every map i optimize (not actually as important as other optimization tools, pretty much a last-ditch effort to reduce visclusters in open areas of a map).

als toy barn performance issues: you can't expect to get everything right the first time. this is a brand new map, and i usually edit them before they get playtested, then they go live. we didn't have much playtesters (max 5) with this last batch of maps. again, this is nothing that can't be solved or fixed. people really think they understand func_detail, but they don't. you need a certain brain for this stuff, you can't just speak Hammer, you need to speak Source Engine too.

nothing here is really a major issue with recompiling maps, other than reflections missing textures, but i can't fix an error that i don't have. maybe it's due to maps being made before the 2013 steampipe update that broke all the cubemaps, but again my gmod is pretty clear of any random server crap that's downloaded. only have 2 source engine games installed (css/gmod).

try the following console commands: mat_reloadallmaterials, mat_reloadmaterial, mat_reloadtextures, r_flushlod
 
Last edited:
Solution
Top