Can't find leak in func_areaportal

Discussion in 'Mapping Questions & Discussion' started by Xam100, Dec 27, 2020.

  1. Xam100

    Xam100 L1: Registered

    Messages:
    10
    Positive Ratings:
    0
    Hello!
    I know this problem got brought up alot: Brush #: areaportal brush doesn't touch two areas. I know it means my area isn't sealed by func_areaportal completely. What I wanted to know is, is there a way to actually know where the leak is?

    I've narrowed down the leak to one room, but no matter what I do, no matter how sure I am to have sealed the room with areaportals, it's never good enough. I've hit a wall and don't know anymore how to fix this problem. I've tried loading a pointfile to no avail, and the brush numbers don't tell me anything new.
     
  2. Bull

    aa Bull

    Messages:
    193
    Positive Ratings:
    151
    Can you tell / show us what happens when you try opening the pointfile?

    Aside from that, do you see any errors in your Map > Check For Problems area?

    Finally you could post your compile log to something like https://pastebin.com/ for us to check out - this helps us diagnose what's going on.
     
  3. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,292
    Positive Ratings:
    858
    Areaportal leaks usually generate pointfiles, but the pointfiles are often buggy and unhelpful, drawing a line in random directions rather than actually pointing to the leak. There is one solution I've found for locating areaportal leaks, by turning the areaportal leak into a normal leak:
    1. Make a copy of your map file, you probably don't want to do this in your original file.
    2. Hide or delete all entities in your map, except for areaportals.
    3. Convert all your areaportals into map-sealing world geometry.
    4. Locate the leaking areaportal and the two areas it is intended to separate. Purposely create a leak to the void in one of these areas, and place an entity such as info_player_teamspawn on the other side of the areaportal. This entity should be the only entity in your map currently.
    5. Compile. You should encounter a normal leak, and the generated pointfile should draw a line from the one entity you placed, through the areaportal leak, and into the void leak that you purposely created, showing you where the areaportal leak is.
     
    • Thanks Thanks x 1
  4. Xam100

    Xam100 L1: Registered

    Messages:
    10
    Positive Ratings:
    0
    Nothing, the pointfile/red line simply does not appear.

    Nothing, apart from the usual "there's no player start".

    Here it is: https://pastebin.com/QrwU6zxg

    Thanks, I'll give it a try!
     
  5. Kill_the_Bug

    aa Kill_the_Bug

    Messages:
    1,776
    Positive Ratings:
    374
    1. Always go with first brush indicated in the list as it triggers all the other leaks
    2. convert the indicated brush into a world brush put a different on it a recompile, sometimes this will trigger a new path for the red line and will show you where the actual leak is.
    3. Fix leak, remake the area portal in step 2

    edit - only run the compiles with world geometry (+ sky and /or black textures that seal your map from the void) and area portals on, ie. turn of func_details, all entities (except area portals), props etc. etc
     
    • Thanks Thanks x 1
  6. Xam100

    Xam100 L1: Registered

    Messages:
    10
    Positive Ratings:
    0
    Thanks to all, that helped solve the problem!

    Now there's something else though, I hope it's okay if I use this thread instead of making another...

    Some shadowy lines have appeared through the map on the ground, forming some sort of grid. I don't know what could it be.
    Another problem I have is with spawn doors, they seem to be open even when they are closed (as in, you can look through them) and the red circle that should signal "no access" appears even when it's on the spawn doors of my own team.

    I don't know exactly what I did wrong, I followed the tutorials to the letter and yet... I thought fixing the areaportals might've been the solution, but apparently wasn't.
     
  7. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,292
    Positive Ratings:
    858
    Screenshots of the problems would be very helpful.
     
  8. Xam100

    Xam100 L1: Registered

    Messages:
    10
    Positive Ratings:
    0
    Sure! Here they are.

    The shadowy lines that appear on the ground:
    [​IMG]

    The spawn door, it's supposed to be closed here:
    [​IMG]

    Finally, the red circle that appears on my own team's door, I can go in just fine though:
    [​IMG]
     
  9. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,292
    Positive Ratings:
    858
    Those lines appear on displacement seams whenever a map is compiled with fast VRAD. Switching to normal should fix that issue.

    What does the door look like in Hammer?

    Make sure the func_respawnroomvisualizer has its associated respawn room set correctly, and that the respawn room is set to the correct team.
     
  10. Xam100

    Xam100 L1: Registered

    Messages:
    10
    Positive Ratings:
    0
    Like this:
    [​IMG]

    It does, the spawn room actually works perfectly, the only problem appears to be with the doors (they do keep out the enemy team however).
     
  11. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,292
    Positive Ratings:
    858
    That areaportal. Is it closed or linked to the door?

    Are there any other entities which share the name of the respawnroom entity? (If the name is bold in Hammer, the answer is yes.) If the respawnroom shares its name with any other entity, then the visualizer might link up with the wrong entity.
     
    • Thanks Thanks x 1
  12. Xam100

    Xam100 L1: Registered

    Messages:
    10
    Positive Ratings:
    0
    It's linked to the door.


    Thanks again, that was it! It was a name shared with another entity, now it works just fine!
     
  13. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,292
    Positive Ratings:
    858
    Unlink it. Closed areaportals will block stuff within their volume from rendering in addition to stuff behind them, which is likely what is causing the door to appear open.
     
    • Thanks Thanks x 1
  14. Xam100

    Xam100 L1: Registered

    Messages:
    10
    Positive Ratings:
    0
    Thanks! That solved it!

    Thanks a lot for the help, now the map is free of errors! :)
     
  15. henke37

    aa henke37

    Messages:
    2,044
    Positive Ratings:
    490
    In short, don't allow people to look at closed area portals. Ensure that there is always geometry blocking people's view. Such as a door prop. And check both sides.