Does the map load faster when you optimize it?

Bunker Junker

L3: Member
Jul 28, 2017
141
38
I've been noticing that when my maps are getting more complex, they take longer to load just to test them out. (No surprise there.) So I've been wondering if there was a way to make it faster. I've noticed that I never optimize my maps, so I'm wondering if a map loads faster for testing if you optimize it.

Just need an answer for this one, thanks.
 

Mess About

L7: Fancy Member
Jan 16, 2017
404
178
by load map you mean in-game when you type [map yourmapname] in the console and wait for it to load?

or you mean the compiling time?
 

Mess About

L7: Fancy Member
Jan 16, 2017
404
178
Compiling time.

yes it is
without optimization, hammer has to "calculate" pretty much everything on your map and it's gonna take a very long time

watch this tutorial by Crash
View: https://www.youtube.com/watch?v=c59rK9Wxr7I

Also you might want to cut your map into small part with skybox + areaportal, make it easier to compile,
hammer won't have to figure out what you can see on last CP, when you're standing on first CP, it's just a waste of time
open any decompiled official maps and you'll see it, like in cp_granary for example
 
Last edited:

Bunker Junker

L3: Member
Jul 28, 2017
141
38
yes it is
without optimization, hammer has to "calculate" pretty much everything on your map and it's gonna take a very long time

watch this tutorial by Crash
View: https://www.youtube.com/watch?v=c59rK9Wxr7I

Also you might want to cut your map into small part with skybox + areaportal, make it easier to compile,
hammer won't have to figure out what you can see on last CP, when you're standing on first CP, it's just a waste of time
open any decompiled official maps and you'll see it, like in cp_granary for example

Well that explains why it takes forever for a map with a lot of details to load for me. Thank you for your time.

And if you don't mind, mind linking me to some downloads on official maps? I want their VMFs so I can really get what you're talking about.
 

Idolon

they/them
aa
Feb 7, 2008
2,105
6,106
It depends on what kind of optimization you mean. Some optimization techniques (func_detail, visclusters, good/clean brushwork techniques, lightmap optimization) will speed your compile time up, but others (hint brushes, mostly) will slow it down.
 

RaVaGe

aa
Jun 23, 2010
733
1,210
There are two kind of optimization.

  1. In-game optimization
  2. Compilation time optimization
In-game optimization can ruin your compilation time. As Idolon said, using hint brushes will slow down a lot your compilation time simply because you might create more visclusters than vvis would do on it's own.

If you can't optimize the two, opt for the in-game optimisation (basically more visclusters).

The topic is actually extremely wide and complex, but you have to understand that optimizing your compilation time might screw the in-game optimization if you don't know what you're doing.
 

Crash

func_nerd
aa
Mar 1, 2010
3,315
5,499
There are two kind of optimization.

  1. In-game optimization
  2. Compilation time optimization
In-game optimization can ruin your compilation time. As Idolon said, using hint brushes will slow down a lot your compilation time simply because you might create more visclusters than vvis would do on it's own.

If you can't optimize the two, opt for the in-game optimisation (basically more visclusters).

The topic is actually extremely wide and complex, but you have to understand that optimizing your compilation time might screw the in-game optimization if you don't know what you're doing.

Agree wholeheartedly with all of this, except to clarify it's visleafs that are created, not to be confused with the func_viscluster entity which is another whole can of worms when it comes to balancing compile time vs in game optimization.
 

henke37

aa
Sep 23, 2011
2,075
515
Then again, the visleaves are clustered into visclusters. Usually with just one leaf per cluster.
 

RaVaGe

aa
Jun 23, 2010
733
1,210
Agree wholeheartedly with all of this, except to clarify it's visleafs that are created, not to be confused with the func_viscluster entity which is another whole can of worms when it comes to balancing compile time vs in game optimization.

Yup, miswording here ^^, it's preferable to speak about visleaves than visclusters indeed :) even if vvis is merging the leaves into clusters during the compilation.

Also note that the amount of calculation is determined by the amount of portals and not by the amount of leaves.

VBSP create the leaves.
VVIS is determining the visibility, that's what take most of the time.

https://developer.valvesoftware.com/wiki/Visibility_determination
 
Last edited:

Bunker Junker

L3: Member
Jul 28, 2017
141
38
Well this isn't confusing at all..


(Thanks for the extra details, will be looking more into this.)