I cannot understand Areaportals

Cookie^

L2: Junior Member
Jan 26, 2014
75
2
I've been working on a map for 2 weeks and the only thing to do in order to release it in beta, is optimization.

However, I do not understand Areaportals. I have watched countless tutorials and read countless guides, but all of them show the usage of area portals on very simple maps, made for the tutorial. My map is very big and open and I can only use Areaportals on 1 room. If I seal another room with area portals I get a weird error when I compile the map (something about portalnum > ..).

Anyway, it makes me really sad because I was incredibly excited when I imagined playing it with friends and other players, but no matter how much I try to understand how to use Areaportals on my map, I simply can't do it. This is the first time this has happened to me on Hammer and I am even thinking of abandonding the project I've spent so much time and effort on. :( :(
 
Sep 7, 2012
638
500
Not all maps will benefit hugely from areaportals. Maps with a lot of "outdoors" play area use few areaportals, for example. If you post a download link to your map, I'm sure there are several people here on the site who could instruct you as to where areaportals could be best placed.

That said, there might be other problems with your map that will prevent it from running smoothly, areaportals or no. To some extent, maps must be designed with optimization in mind from the very start if any optimization is to take place. It is possible that your map will not be laid out in a way lends itself well to any number of optimization techniques.
 

Cookie^

L2: Junior Member
Jan 26, 2014
75
2
Not all maps will benefit hugely from areaportals. Maps with a lot of "outdoors" play area use few areaportals, for example. If you post a download link to your map, I'm sure there are several people here on the site who could instruct you as to where areaportals could be best placed.

That said, there might be other problems with your map that will prevent it from running smoothly, areaportals or no. To some extent, maps must be designed with optimization in mind from the very start if any optimization is to take place. It is possible that your map will not be laid out in a way lends itself well to any number of optimization techniques.

It is not about where to place them. I know where to place them, it is just that there are always errors. Could I perhaps post the .vmf here?
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
since this is now your second thread on this issue, please stop making new threads and instead post your VMF so we can help you and put this issue to bed
 

RaVaGe

aa
Jun 23, 2010
733
1,210
I already asked you for some pictures, the only thing you gave me was a simple picture wich show nothing, don't expect people to help you if you don't give the bare minimum.
 

ZeSpice

L2: Junior Member
Mar 17, 2014
94
34
Could I perhaps post the .vmf here?
I know a little bit more than nothing about areaportals... But, .bsp or even good screenshots is enough for understanding, i think.
 

wareya

L420: High Member
Jun 17, 2012
493
191
That error usually means that you have an areaportal leak. An areaportal leak means that an areaportal only opens up to one areaportal... area. Areaportals divide the map up into separate areas, and act as windows into other areas. In order to do this, the compiler has to create very well-defined areas. An areaportal has to open up from one sealed area into another sealed area.

This means that if you have a building in the middle of your map, and you areaportal every door and window and unsealed geometry on it, the inside of the building and the outside of the building are separate areas, but not when you're outside looking past it. Here's an example of that on badwater:

99bc84ce85.jpg

1386800421.jpg


As you can see, they didn't even bother to areaportal beside or on top of the building. When it comes to large, complex, open, outdoor geometry, hintbrushes are generally easier to control than areaportals, and have the added bonus of lowering your compile time when used on such geometry effectively.

bd6e02d03e.jpg


Now, if I were to remove a random one of the areaportals, it would leak and give me a portalnum related error.

Here's another example of something badwater did:

54e1d6c60e.png


As you can see, they skyboxed the roof of that annoying overpass building, put an areaportal in it, and put areaportals in (all one of) its byconnectors.

This and the thing they did where I posted two images at once are basically the only way to areaportal outdoor buildings. Everything basically acts like an independent building or like a wall of areaportals between parts of the map.
 

Cookie^

L2: Junior Member
Jan 26, 2014
75
2
Very useful info, wareya. Does that mean that I should completely seal off a part of the map, even the roofs and the sky so that the map is split into different areas?
 

Cookie^

L2: Junior Member
Jan 26, 2014
75
2
Yes or no. Do it or use hint brushes effectively.

Alright, thanks. I will try doing that tomorrow. Also, if somebody could take a look at the .vmf and give me some tips on how to use Areaportals that would be fantastic! :D
 

wareya

L420: High Member
Jun 17, 2012
493
191
What you should do is func_detail like half of what isn't func_detailed already. Especially stuff in the roofs.
 

Cookie^

L2: Junior Member
Jan 26, 2014
75
2
What you should do is func_detail like half of what isn't func_detailed already. Especially stuff in the roofs.

I watched a tutorial that said func_details should be used on complex brushes like cylinders and spheres, didn't know most brushes (except the one that seal areaportals) should be func_detailed. Any other tips? I really appreciate all the help in these forums! :D
 

RaVaGe

aa
Jun 23, 2010
733
1,210
Three things :

- Never go below the 16 units for you blockout.
- Learn how to use the func_details.
- Do not make a huge skybox surrounding all your map.

https://dl.dropboxusercontent.com/u/4055243/koth_pinetech_b1.rar

Here's how it should be, I didn't even wanted to try to compile seeing how much time vvis will take.

You see now that there's two separate rooms, and it should work if I didn't fucked up.
 
Last edited:

Cookie^

L2: Junior Member
Jan 26, 2014
75
2
Here's how it should be, I didn't even wanted to try to compile seeing how much time vvis will take.

You see now that there's two separate rooms, and it should work if I didn't fucked up.

I know right? Two days ago I wanted to compile it on Normal, so I left it to compile and I went to sleep.. After 8 hours vvis was still compiling.. :bored:
 

Cookie^

L2: Junior Member
Jan 26, 2014
75
2
Three things :

- Never go below the 16 units for you blockout.
- Learn how to use the func_details.
- Do not make a huge skybox surrounding all your map.

Hey, thanks for taking the time to check the .vmf.
You seem to have used areaportals and skyboxes over the buildings that connect the spawn with middle. However, isnt it going to leak below the ground? It is going to be impossible to seal it since there is a displacement for the ground?
Damn areaportals are a pain in the butt, I hate them. :(
 
Last edited:
Sep 7, 2012
638
500
It won't leak below the ground because displacements don't seal the map. The areaportal brushes meet up with whatever you use to seal the map at the bottom (probably nodraw)