Optimization of Maps
Quote from Test Subject #54067 on June 2, 2013, 9:37 amI am currently working on an Old Aperture map in the 70's style, meaning everything is open to the sphere, however I am wondering how best to optimize it so it runs well on every computer. I know that brushes that are not necessary or unimportant should be func_details, are there any other strategies? Speaking of optimization, what exactly are visleaves?
I am currently working on an Old Aperture map in the 70's style, meaning everything is open to the sphere, however I am wondering how best to optimize it so it runs well on every computer. I know that brushes that are not necessary or unimportant should be func_details, are there any other strategies? Speaking of optimization, what exactly are visleaves?

Quote from josepezdj on June 2, 2013, 10:08 amWell, here is the bible about it (one of them). Read it and you will understand a lot of things
Well, here is the bible about it (one of them). Read it and you will understand a lot of things
Quote from Ricotez on June 2, 2013, 10:41 amjosepezdj wrote:Well, here is the bible about it (one of them). Read it and you will understand a lot of thingsThat's a very good guide, I used it many years ago to learn about map optimization and the visleaf system. I wasn't aware it was still around.

That's a very good guide, I used it many years ago to learn about map optimization and the visleaf system. I wasn't aware it was still around.

"Duct Tape is the answer."
Quote from Test Subject #54067 on June 2, 2013, 10:46 amjosepezdj wrote:Well, here is the bible about it (one of them). Read it and you will understand a lot of thingsThis seems extremely helpful.
Off Topic: did you see my newest comment on the damask page? I am at a loss for how to get the cube to the bluegel area with the final button.

This seems extremely helpful.
Off Topic: did you see my newest comment on the damask page? I am at a loss for how to get the cube to the bluegel area with the final button.
Quote from User on June 2, 2013, 12:48 pmHmm but i have a Question too, how i can use AreaPortals on Old Aperture Maps or BehindTheScenes Maps S:
I mean, these Levels are Big and you can see the whole Level, and i dont know how to Use an Areaportal on Big Rooms, (Like Spheres).
Hmm but i have a Question too, how i can use AreaPortals on Old Aperture Maps or BehindTheScenes Maps S:
I mean, these Levels are Big and you can see the whole Level, and i dont know how to Use an Areaportal on Big Rooms, (Like Spheres).

Quote from josepezdj on June 3, 2013, 1:21 amThe key here is not "how can I use each and every optmisation element into my level?", but to build my level so I can know in advance how and where to use the optimisation elements. So depending on your map layout and the puzzles, you will be able to use some optimisation elements or others.
It is not mandatory to use areaportals into each level (other than always at the entry and exit doors). If you have a large area maybe you won't be able to use many of them anyway, since they are used to avoid rendering an area that is not in use and the player cannot see or access to. However (I had to learn this from my own mistakes
), the brushes themselves that are not func_details and separate rooms create visleaves in order to avoid rendering everything all the time, so depending on the player position only certain leaves are active in a given moment and the entities inside those are the ones being rendered in that moment. Alternately, you can use the skip/hint brushes to help the engine to know what visleaves can "see" others, reducing the chances that the compile will calculate by default.
For an open map, there's a brush entity you can try apart from skip/hint / no-drawing and func_detailing, the Func_viscluster
EDIT
Test Subject #54067 wrote:Off Topic: did you see my newest comment on the damask page? I am at a loss for how to get the cube to the bluegel area with the final button.Yes I saw it recently... I just replied today, go check it
The key here is not "how can I use each and every optmisation element into my level?", but to build my level so I can know in advance how and where to use the optimisation elements. So depending on your map layout and the puzzles, you will be able to use some optimisation elements or others.
It is not mandatory to use areaportals into each level (other than always at the entry and exit doors). If you have a large area maybe you won't be able to use many of them anyway, since they are used to avoid rendering an area that is not in use and the player cannot see or access to. However (I had to learn this from my own mistakes ), the brushes themselves that are not func_details and separate rooms create visleaves in order to avoid rendering everything all the time, so depending on the player position only certain leaves are active in a given moment and the entities inside those are the ones being rendered in that moment. Alternately, you can use the skip/hint brushes to help the engine to know what visleaves can "see" others, reducing the chances that the compile will calculate by default.
For an open map, there's a brush entity you can try apart from skip/hint / no-drawing and func_detailing, the Func_viscluster
EDIT
Yes I saw it recently... I just replied today, go check it
Quote from User on June 3, 2013, 3:00 pm@josepezdj, Hmm ok i will try the func_viscluster, ^^ But i mean, in large (and open) areas, you can see most of the time the whole Level, (example Old Aperture, because the Chambers are sometimes broken and you can see through when, so you can also see the most visleaves), and im figuring out how i can optimize "that" for slower computers. Do you know what i mean?
@josepezdj, Hmm ok i will try the func_viscluster, ^^ But i mean, in large (and open) areas, you can see most of the time the whole Level, (example Old Aperture, because the Chambers are sometimes broken and you can see through when, so you can also see the most visleaves), and im figuring out how i can optimize "that" for slower computers. Do you know what i mean?

Quote from josepezdj on June 4, 2013, 8:40 amTheTobbell wrote:Do you know what i mean?Yeah, I already knew what you meant in the beginning
Even though it's an open area, aren't there any walls in? didn't you make rooms for your puzzles? Well, those walls should divide the player's view then and can be your first optimisation. I'd suggest you to test your map once that it's finished before messing around with optimisation. Then (only when you have compiled at least once) you can check out the portalfile in hammer (Menu > Map > Load portalfile) to see the visleaves in which the compile divided your map... Depending on what you see, you could improve one or other thing... Check out all of those bluen lines and follow them to see their origin. Normally, 90 degrees lines are ok, but other angles are not good (unless that you created them deliberately by using skip/hint brushes because you wanted to introduce a specific division where a couple of corridors meet...) Unless you have a ton of crossing blue lines filling up your map (if this happen check out why are those lines there first, what brushes are creating them, and if those could be tied to func-details), the func_viscluster won't help much...
Also I'd suggest you to decompile one of Valve's open maps (there are many) and check out the optimisation they used... this helps a damn lot
Yeah, I already knew what you meant in the beginning Even though it's an open area, aren't there any walls in? didn't you make rooms for your puzzles? Well, those walls should divide the player's view then and can be your first optimisation. I'd suggest you to test your map once that it's finished before messing around with optimisation. Then (only when you have compiled at least once) you can check out the portalfile in hammer (Menu > Map > Load portalfile) to see the visleaves in which the compile divided your map... Depending on what you see, you could improve one or other thing... Check out all of those bluen lines and follow them to see their origin. Normally, 90 degrees lines are ok, but other angles are not good (unless that you created them deliberately by using skip/hint brushes because you wanted to introduce a specific division where a couple of corridors meet...) Unless you have a ton of crossing blue lines filling up your map (if this happen check out why are those lines there first, what brushes are creating them, and if those could be tied to func-details), the func_viscluster won't help much...
Also I'd suggest you to decompile one of Valve's open maps (there are many) and check out the optimisation they used... this helps a damn lot
Quote from User on June 4, 2013, 2:14 pmThanks for that advice
![]()
So, my Map isnt completed yet, (I didnt started making the Large open Area Map,)
But i thinked about that and how i can optimize that, okay, when its finished, i will ask again if i have another questions ^^
Thanks for that advice
So, my Map isnt completed yet, (I didnt started making the Large open Area Map,)
But i thinked about that and how i can optimize that, okay, when its finished, i will ask again if i have another questions ^^

Quote from josepezdj on June 4, 2013, 5:36 pmTheTobbell wrote:But i thinked about that and how i can optimize thatTHAT is the way
You MUST prethink in all possible optimisation problems while you're mapping, I assure you that is far better than to remake a level or some parts of it again and again because of lagging problems
Just read that guide and keep in mind all the knowledge that you can get from it before building the layout of an open area.. I'm sure it will help a lot to don't regret about the steps you take
THAT is the way You MUST prethink in all possible optimisation problems while you're mapping, I assure you that is far better than to remake a level or some parts of it again and again because of lagging problems
Just read that guide and keep in mind all the knowledge that you can get from it before building the layout of an open area.. I'm sure it will help a lot to don't regret about the steps you take