On the use of outside areaportals


Dustin Diamond
06-20-2006, 12:24 PM
So I've been trying to figure out where to place outside areaportals in my map and I think I must be confused on how to use them. I know how they work for inside areas, and I know it's the same for outside, but placement seems to be odd. Not many guides address using them in mutiplayer for geometry culling. I've looked at the sdk_flash for guidance, as well as some other maps, and I've got to say, it doesn't look like there's much rhyme or reason as to where outside areaportals go. It seems like, "Oh hey, this'll make a nice area, let's block it off." Is that all there is to it?

Also, it seems the use of Hints is getting more and more erratic. Take a look at the criss-crossed mess in Argentan, and then the corner placement in Flash. Has Valve not read the same optimization guides that I have?

ok comp
06-20-2006, 12:33 PM
I'm with you on this, some of the things I see in the official maps are confusing. I'm also curious as to what's up with all those giant trigger brushes that aren't tied to anything as far as I can see. I know I've seen them in Avalanche and Anvil... and I can't seem to figure out exactly what they're there for.

Dustin Diamond
06-20-2006, 12:44 PM
Oh those trigger brushes ARE the outside func_areaportals. VMEX just doesn't handle them correctly and puts them as triggers instead.

ok comp
06-20-2006, 01:03 PM
:eek: I had a feeling it had something to do with the decompiler! Well, this changes everything... I think.

McJewels
06-20-2006, 02:29 PM
I have been placing areaportals to section off rooms, buildings, our large outdoor areas, based on visibility. I have had lots of problems with small leaks in weird places, and area portals touching more than 2 areas. I have pretty much figured it out, so when everything is working, it drastically improves fps.

Imagine your map, and its entire outside area is inside another big building, pull in your skybox as if they were the walls of the building, to box in areas as much as you can. Then portal off outside areas like you would seperate rooms in this big building.

If you set them up right, the game is rendering a lot less stuff.

ok comp
06-20-2006, 02:47 PM
I've been using areaportals for houses as well, but not for large outdoor areas. I read that having too many areaportals in the player's view can actually cause things to slow down... does anyone know at what point this happens? My concern with using outdoor areaportals was that they'd be seen through a window or door that already has an areaportal in it.

nave
06-20-2006, 03:06 PM
Originally posted by ok comp
My concern with using outdoor areaportals was that they'd be seen through a window or door that already has an areaportal in it.

To my understanding, this is something that is almost inevitable and would only be a problem if it were in excess.

Dustin Diamond
06-20-2006, 03:07 PM
Originally posted by McJewels
Imagine your map, and its entire outside area is inside another big building, pull in your skybox as if they were the walls of the building, to box in areas as much as you can. Then portal off outside areas like you would seperate rooms in this big building.

If you set them up right, the game is rendering a lot less stuff.

McJewels: Good advice. I'll try doing that. I've printed out a top-down view of my map with all the skybox walls visible so I can sort of sketch it out first.

ok-comp: From what i've seen, the limit is not 2, or even 3. Many Valve maps have at least 2 areaportals visible from within another. Best guess is try it out and see. The problem is that there is a certain amount of processing power required when looking out an area portal to determine what should be visible. If this has to be done multiple times for all the portals visible, it could get hairy.

Furyo
06-20-2006, 05:51 PM
The max number of areaportals in a map is 1028. So limit isn't a concern cause there's no way in hell you'll reach it.

Dijon once had all buildings accessible, plus areaportals through the streets, and even then I only reached about 250.

At one point though, it all went sour when my areaportals (that had no leaks) started to randomly switch on and off, depending on how I was facing them. That's when I knew the limit had been reached, but I still can't really say if there's a rule of thumb for it.

So basically, until it hasn't screwed up you're fine. The day it screws up, limit your areaportals to the edges of your buildings (not the inside doors for example)

Dustin Diamond
06-20-2006, 06:41 PM
Originally posted by Furyo
The max number of areaportals in a map is 1028. So limit isn't a concern cause there's no way in hell you'll reach it.

Dijon once had all buildings accessible, plus areaportals through the streets, and even then I only reached about 250.

At one point though, it all went sour when my areaportals (that had no leaks) started to randomly switch on and off, depending on how I was facing them. That's when I knew the limit had been reached, but I still can't really say if there's a rule of thumb for it.

So basically, until it hasn't screwed up you're fine. The day it screws up, limit your areaportals to the edges of your buildings (not the inside doors for example)

So are you saying the more areaportals the better? Until you reach the limit? I mean, should I try to section off as many places as possible? or just limit it to a few large areas?

Someth|ngW|cked
06-20-2006, 09:59 PM
Um, just open the SDK_dod_flash .vmf and you can see how to set them up, albe it pretty sloppy it's a good reference

McJewels
06-21-2006, 12:47 AM
I just try to think about where people will or wont be looking around a corner, and try to angle and place all the portals in places that seam to be hiding the portal a bit. After placing a few portals around, and then seeing what models they prevent from being drawn you should get an idea of where to place them based on you map. you'll probably have to move or alter buildings a bit to work around the portals.

Furyo
06-21-2006, 01:54 AM
Areaportals should always be used with "holes" (doors, windows). Absolutely all of them should have one.

Now when it comes to outdoor areaportals (when used) just limit their use to cut off major areas, that'll prevent having to look through 3 or 4 at times, just because your line of sight is pretty big.

Dustin Diamond
06-21-2006, 07:11 PM
I heart func_areaportal.

Well I just tried it out. I threw in some preliminary outdoor area portals to section off one area of my map and ran a full compile. And the result?...fps went up ~20+ in those areas. Hurray! Now to add more!

Ca-Chicken-Soup
06-22-2006, 12:11 AM
What happened to hints anyway? Flash has hardly any, all I can see is the horizontal one. Hints use almost no processing power apparently so why are area_portals all the rage? I'm using hints and they seem to be fine, I'm only using area portals on doors and windows, but that might even slow it down..

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.