I cannot understand Areaportals

Discussion in 'Mapping Questions & Discussion' started by Cookie^, Sep 15, 2014.

  1. Cookie^

    Cookie^ L2: Junior Member

    Messages:
    75
    Positive Ratings:
    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. :( :(
     
  2. nightwatch

    aa nightwatch

    Messages:
    640
    Positive Ratings:
    446
    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.
     
  3. Cookie^

    Cookie^ L2: Junior Member

    Messages:
    75
    Positive Ratings:
    2
    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?
     
  4. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,739
    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
     
  5. nightwatch

    aa nightwatch

    Messages:
    640
    Positive Ratings:
    446
  6. RaVaGe

    aa RaVaGe

    Messages:
    723
    Positive Ratings:
    1,020
    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.
     
  7. ZeSpice

    ZeSpice L2: Junior Member

    Messages:
    94
    Positive Ratings:
    33
    I know a little bit more than nothing about areaportals... But, .bsp or even good screenshots is enough for understanding, i think.
     
  8. wareya

    wareya L7: Fancy Member

    Messages:
    493
    Positive Ratings:
    172
    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:

    [​IMG]
    [​IMG]

    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.

    [​IMG]

    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:

    [​IMG]

    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.
     
    • Thanks Thanks x 2
  9. Cookie^

    Cookie^ L2: Junior Member

    Messages:
    75
    Positive Ratings:
    2
  10. Cookie^

    Cookie^ L2: Junior Member

    Messages:
    75
    Positive Ratings:
    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?
     
  11. wareya

    wareya L7: Fancy Member

    Messages:
    493
    Positive Ratings:
    172
    Yes or no. Do it or use hint brushes effectively.
     
  12. Cookie^

    Cookie^ L2: Junior Member

    Messages:
    75
    Positive Ratings:
    2
    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
     
  13. wareya

    wareya L7: Fancy Member

    Messages:
    493
    Positive Ratings:
    172
    What you should do is func_detail like half of what isn't func_detailed already. Especially stuff in the roofs.
     
    • Thanks Thanks x 1
  14. Cookie^

    Cookie^ L2: Junior Member

    Messages:
    75
    Positive Ratings:
    2
    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
     
  15. RaVaGe

    aa RaVaGe

    Messages:
    723
    Positive Ratings:
    1,020
    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.
     
    • Thanks Thanks x 1
    Last edited: Sep 15, 2014
  16. Cookie^

    Cookie^ L2: Junior Member

    Messages:
    75
    Positive Ratings:
    2
    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:
     
  17. Cookie^

    Cookie^ L2: Junior Member

    Messages:
    75
    Positive Ratings:
    2
    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 16, 2014
  18. nightwatch

    aa nightwatch

    Messages:
    640
    Positive Ratings:
    446
    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)
     
  19. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,739
    The vmf is now a 404?