Areaportal Error

Discussion in 'Mapping Questions & Discussion' started by Cold, May 25, 2009.

  1. Cold

    Cold L1: Registered

    Messages:
    31
    Positive Ratings:
    5
    I have placed areaportals inside my func_doors. When I try to load my map in TF2 it closes out and I get an engine error that says portalnum > numareaportal or something similar.

    Does anyone know what would cause this?
     
  2. Loc_n_lol

    Loc_n_lol L10: Glamorous Member

    Messages:
    726
    Positive Ratings:
    304
    an areaportal leak. Post or check your compile log (namely the vbsp part)
     
  3. Altaco

    Altaco L7: Fancy Member

    Messages:
    485
    Positive Ratings:
    121
    map -> load pointfile. Your areaportals have to seal off an area entirely.
     
  4. The Political Gamer

    aa The Political Gamer

    Messages:
    4,468
    Positive Ratings:
    1,704
  5. HojoTheGreat

    HojoTheGreat L5: Dapper Member

    Messages:
    206
    Positive Ratings:
    34
    What both guys above say is correct, but to give you a more thorough method of fixing it:

    1. In Visgroups, turn off everything but world geometry. That means turning off props, func_details, lights, etc. Basically anything that will obscure your view of the map, and that does not seal a room.
    2. Run map using Normal BSP, no VIS and no RAD. Make sure Do not run map in game is checked (you do not want TF2 to launch)
    3. Click Map, Load Pointfile (about halfway down the menu)
    4. A red line should appear if you have a leak. With areaportals this line will show you how the two faces of an areaportal are connected/touching. Start at one side of the areaportal and follow the red line all the way until you see where the leak is (usually two brushes not fully touching, or a previously func_detailed brush.
    5. Seal the leak, the repeat steps 2-4 until no Pointfile can be loaded.

    Congratulations, you've fixed your leaks!
    A couple things to note, first, use the SKIP texture on all of the faces that are not being used as Areaportals on an areaportal brush for maximum efficiency.
    Also, don't forget to turn your Visgroups back on before doing a more thorough compile!
     
    • Thanks Thanks x 1
  6. Cold

    Cold L1: Registered

    Messages:
    31
    Positive Ratings:
    5
    Thanks for the quick pointers. The map now loads properly. But it seems they made my fps lower than before. Does that mean I used them improperly? I only put them in doorways to the base.
     
  7. Armadillo of Doom

    aa Armadillo of Doom Group Founder, Lover of Pie

    Messages:
    949
    Positive Ratings:
    615
    How many are you using, exactly? While portals can be very beneficial, they can also quickly become expensive. The main difference between portals and hints is that the former will also block the rendering of entities. As such, it should be used selectively.
     
    • Thanks Thanks x 1
  8. Cold

    Cold L1: Registered

    Messages:
    31
    Positive Ratings:
    5
    There are 5 on the bottom floor and 5 on the top floor. Does that mean it would actually be a better idea for me to remove them if they are that numerous?
     
  9. Armadillo of Doom

    aa Armadillo of Doom Group Founder, Lover of Pie

    Messages:
    949
    Positive Ratings:
    615
    Definitely. That many portals in such a small space is not doing anything good for your map. Think of it this way; portals should only be used to separate main areas. So those 3 blocks which you spoke of earlier? The entrances between those blocks would be good places to stick a portal. But unless it's going to block a significant portion of the geometry and models, you'd be better off using hints. Edit 1: I think you'll find this useful; http://forums.tf2maps.net/showthread.php?t=359
     
    • Thanks Thanks x 1
    Last edited: May 25, 2009