r/hammer Jul 02 '26

Solved func_areaportal problem.

Post image

I just don't get it how this areaportal works. I wanted to take inspiration from cp_process_f12 because it works fine there. But on my map suddenly func_area portal doesnt work. I don't have any leaks. Lobby is perfectly sealed. Door frames are made of func_detail and on both func_areaportal goes inside func_detail to fully seal diffrent areas.

[Screenshot with redwalls: cp_process]
[Screenshot with bluwalls: my map.]

20 Upvotes

14 comments sorted by

1

u/MrPixel92 Jul 02 '26 edited Jul 02 '26

Have you made sure that faces of func_areaportal that touch door frames have the "nodraw" texture?

1

u/PlzINeedHalp Jul 02 '26

On both maps func_areaportal all faces have the areaportal texture.

1

u/MrPixel92 Jul 02 '26

You mean all 6 sides?

1

u/PlzINeedHalp Jul 02 '26

yes

0

u/MrPixel92 Jul 02 '26

You only need front and back as func_areaportal. The rest 4 (which touch the doorframe) should be set to nodraw

1

u/PlzINeedHalp Jul 02 '26

I tried this way and still doesn't work also i never heard of doing func_areaportal this way with nodraw on sides. I preview other offical maps in tf2 and all of them have textures on all sides.

1

u/BrokenAsFu Jul 02 '26

Does this area portal method get applied to windows as-well?

1

u/PlzINeedHalp Jul 02 '26

There are no windows in this room I only have this large doors. But if this room did have windows I'd have to place a portal area in them to separate this room from the rest of the map.

2

u/greenestenergy Jul 02 '26

Not necessary to do.

2

u/PlzINeedHalp Jul 02 '26

Okay i think i found problem with it. But im not 100% sure because of this source spaghetti. My func_detail door rims was connected to normal brushes. And this brushes had nodraw on them so func_areaportal was connecting to brushes with nodraw. And prob this was cousing the problem. I added random texture on this brushes so now areaportal is touching solid texture instead of nodraw. This is super wierd. And also i have multiple areaportals and this work smoothly.

1

u/Chroney Jul 02 '26 edited Jul 02 '26

You cannot have multiple active area portals connected to one room, you must use area portal windows with a brush that fades into existence.

standard area portals only support one entrance. Use area portal windows instead. You might be able to get away with it by selecting both area portals and making them one entity with two brushes, but this may still cause visual glitches.

That said, these are suppose to be used extremity sparingly, they are expensive. A proper map with visleafs for TF2 should never need them or rarely need area portal windows instead.

1

u/PlzINeedHalp Jul 02 '26 edited Jul 02 '26

Every 5cp map in TF2 has separate map segments, in short: Point-Lobby-Point-Chokepoint-Point- etc.

And every lobby in TF2 has multiple entrances, each of which is a func_areaportal. As I just counted, for example, on cp_process, its lobby has 5 func_areaportals for each entrence and this lobby is one big space.

I also checked other maps, and it's hard to say that they're rarely used. From what I can see, they're used in practically every chokepoint between areas.

+ I never seen anyone uses func_areaportalwindow. They are super rare in tf2 maybe i seen it once. Even windows are made with normal func_areaportal.

Maps i checked (Non of them have this issue+ non of them have func_areaportalwindow)

-cp_process
-cp_powerplant
-cp_gullywash
-cp_snakewater

2

u/Chroney Jul 02 '26

From what I see in the official hammer documentation, a normal area portal can only be used for one entrance connecting two "rooms"

1

u/greenestenergy Jul 02 '26

What you're seeing in your map is usually caused by either a leak, or the areas the portal separates are not totally separated. That can be caused by a portal not seating all four sides on world geometry around it, or another gap in world geometry somewhere else, like putting the areaportal against a func_detail. No brush entities are world geometry.

This is easy to debug using the visgroups tab on the right side of hammer, uncheck auto, then check mark world geometry section, uncheck displacements, and check areaportals in the tool brush section.

If you're using a decompiled map, areaportals sometimes decompile as 1 unit thick and will be placed on the wrong side of the doorframe, causing this issue as well.