Discussion in 'Mapping Questions & Discussion' started by Spike, Mar 1, 2009.
How many areaportals do you have per map?
How do I check?
as few as possible but as many as needed.
Agreed. You can't ask questions like this, it is all too dependent on your map.
In every doorway that leads to or breaks up a large room (s). But you must be careful that you don't see though too many at once.
Well, my current map is just a bunch of pillars if space, with floating spawn rooms made with glass walls, and 4 doors leading out so, probably 2 or none.
EDIT: Since I'm wrong, and still learning and reading that really good optimization guide, I'm taking the smart people's advice and saying that I have 0 area-portals.
PS. I don't really have area's to portal too do I?
Mar, yours has zero. Areaportals are manually created by the user and triggered by a trigger.
For those who do not understand: http://developer.valvesoftware.com/wiki/Areaportal
Anything I would be saying would be a mere repetition.
I need an exact numnber. I have 4 and it's just the first stage. Is it ok?
spike: areaportals aren't like that.
example: if you have a spawn room with 2 doors on opposite sides and 1 window, you will have 3 areaportals. the door areaportals you'll tie to the door entity too, so it's closed when not in use.
if you have a big open area, for example my map CTF_underside - in the middle part, you will have zero areaportals generally.
think of it like this: area portals break up your map into different areas.
or large warehouse/traindepot and the corridors on the sides.
if you have a small room in the middle of that traindepot, you're probably better off not putting areaportals on it.
also you can reduce number of areaportals with a bit intelligent design of the map - areas of the map that aren't able to see many other areas, and aren't able to support large numbers of players fighting there (like the entirety of badwater blu spawnroom, which is about 4-5 rooms really) don't need a single areaportal.
also, you don't need an areaportal where the opening can only be seen close up on one side, and hasn't much detail on that side (e.g. spawn room doors in badwater), simply because on one side you aren't going to be hiding much with the areaportal, and on the other, there's not much to hide in the 1st place.
i suppose if you really want a rule of thumb, use areaportals for every major building on your map. and more importantly use areaportals between two areas of high detail/high action, but not in a case where the areaportal basically sits 1/2 down a large room, as it won't have any positive results here.
hope that helps.
I believe you can't do this in TF2 (same with open/close with door) because it screws with the multiplayer aspect of the game. Besides, they work fine without triggers.
Yeah I know how areaportals work, I just want to know the average of them on a map. I'm not using them to block doors or buildings since my map doesn't have any building. I've divided my map on some parts with areaportals for optimizating reasons (huge open areas).
Also I was wrong with areaportal number, I've 8 on first stage. Just want to know the average number so it doesn't affect server/client performance.
I think Valve made areaportals in that way on CP well, at least, there's one areaportal for each base door.
And they doesn't work without triggers, areaportalwindows are the only ones doesn't need triggers, normal areaportals need to be triggered.
Also I don't understand the multiplayer thing, areaportals works half-client side, I mean they need to be triggered by the server, but only works on activator, so if you close an areaportal, that doesn't mean another player will see it closed.
The areaportals can be opened and closed by triggers but if it is triggered to open it opens for everyone. For this reason the only ones you really want to be triggering are ones within doors that open and close like cp_well. When the door is closed the areaportal can be closed because you can't see through it anyway because of the door prop. Other areaportals such as in doorways with no door should be left always open. This helps with performance because it only renders geometry with direct line of sight to the player through the areaportal, compared to the usual method of rendering everything that the visleaf you are in can possibly see. For this reason it's a good idea to use them in doorways to prop heavy rooms.
According to this website, areaportal visibility is individual for each player:
Areaportals are based on the player's view angle. So if the player can't see directly into an area portal then the portal is closed.
func_areaportals don't need triggers, just leave them set to open. It doesn't stop rendering geometry behind them, you'll still render the next visleaf.
the visleaf is what blocks the terrain.
the area portal stops any objects beyond it from rendering. This can be a major help when there are tons of object polys that would render without the areaportal. If there aren't many objects you don't really need it.
It's best to use as few as possible. So if you have 3 windows along a wall make it one open area with one areaportal, then make the brushes between windows func_details. That's better than 3 portals (one per window).
The problem is when one player triggers it open because they are close to it and another far away hasn't opened it. This has to do more with windows though.
func_areaportalwindows can be triggered based on distance.
So a close player could see where a far away player is, the far away player would see an opaque window. Thus one has an advantage.
Door triggers open when the door opens. Both players see the door open, so portals triggered by doors are fair game because each players view is blocked by the door. This is done in spawn rooms, you can ususally see it in spectate mode when someone goes through a door or if you fly through a door. You'll get a brief skybox flash.
I'm separating a huge area with areaportals, full of displacements and props.
I did the areaportals and triggered them, when closed it blocks everything behind it (geometry and models). When I'm aproaching the area I trigger it to open.
Just putting an areaportal there causes this to happen:
That's what should happen when I'm next to the corner of the cliff. Triggering it where I want works.
That's not true according what I've tested above :\
My question is:
-If a player triggers an areaportal to close (because he's far away from it), would another player next to the areaportal see it closed?
-Having 20 on a big map like dustbowl (size) is ok? Or would it affect performance?
He's saying if player A closes the areaportal it doesn't make everything on the other side disappear for player B if he's wondering around behind it. Player A will stop rendering everything on B's side and B will stop rendering everything on A's side. It can't be closed for A and open for B though. Areaportalwindows can because they are based on proximity but as already stated it isn't wise to use them in multiplayer games. You could use them for detail rooms but if you don't do it right it becomes really noticable, like the tape room at the beginning of pl_repository.
2. As far as i'm aware it's only costly when you have a bunch of them visible at once so it's doing a lot of calculations of what you can and can't see on the fly.
Can you post an overhead of the area? From what i can understand it sounds like it will work fine as always open.
These are the important ones
An 'always open' non triggering area portal will NOT DO what your first screen shows UNLESS it leaks. If so it will close off what's behind it like you see there.
You will see an 'area portal does not touch both sides' error when compiling, but if you don't have a leak to void the map will still save and run. If you load the portal file it will give you a red line for leaking areaportals.
I think the triggered one in the second pic just doesn't work at all or something.
The purpose is to block MODELS. That could help alot with all your trees, but it might be as simple as fade distance settings too.
The problem with very large area portals is they don't block much view.
if you have a small hole in a wall 1x1 units and it is area portaled, any objects that can't be seen directly through that hole won't be rendered. If the portal isn't there they will be.
If you make that hole 512x512 you'll be able to see through it from almost any angle because it's so large, so it's gonna have little benefit.
You raeally need to us
to see what good a portal is doing. And it needs to be sealed on all sides so you don't see what you have in that first screen.
Separate names with a comma.