Area Portals


Cpl. Punishment
09-24-2007, 05:51 PM
I'm not sure why, but every time I add more than two area portals in my map, Source crashes and gives me this error: "portalnum > numareaportals." With two areaportals, it works fine, but any more and it won't load.

My compile log is attached.

Furyo
09-24-2007, 06:38 PM
Cause you have leaks.

Brush 68649: areaportal brush doesn't touch two areas

Brush 18449: areaportal brush doesn't touch two areas

Brush 18449: areaportal brush doesn't touch two areas

Brush 20018: areaportal brush doesn't touch two areas

Brush 20018: areaportal brush doesn't touch two areas

B@D
09-24-2007, 06:43 PM
According to this

Brush 68649: areaportal brush doesn't touch two areas

Brush 18449: areaportal brush doesn't touch two areas

Brush 18449: areaportal brush doesn't touch two areas

Brush 20018: areaportal brush doesn't touch two areas


your map has a leak between the portals somewhere you must remember the whole area from where the 1st portal starts to where the second one ends has to be air tight no leaks at all .

Cpl. Punishment
09-24-2007, 08:08 PM
Why would it compile and load fine for two area portals but not the third?

B@D
09-25-2007, 07:44 AM
because the leak is between the 2nd and 3rd portal

[SAS]==Dirty_Harry
09-25-2007, 12:07 PM
Load the pointfile to help locate the leak. They can be difficult to understand if you aren't use to using them but once you can read the pointfile and understand the basic rules of area_portals they are a very useful tool to have. Just pick a point on the red line and follow it carefully along it's length until you find the leak.

Remember the area_portal must touch world geometry on all four sides. It can not touch func_detail as it will leak. Look for where the red line passes between the area_portal and any world geometry.

I also noticed from your log that you have some models that are being deleted from your map. This is because you have them set as porp_static when they should be prop_physics.

You also have some no draw on terrain surfaces, but I don't have an answer for the following errors

Warning: invalid neighbor connection on displacement near (-4224.00 -896.00 -32.00)
Warning: invalid neighbor connection on displacement near (-4224.00 -896.00 -32.00)
Warning: invalid neighbor connection on displacement near (-4224.00 -896.00 -32.00)
Warning: invalid neighbor connection on displacement near (-4752.00 -320.00 0.00)
Warning: invalid neighbor connection on displacement near (-4752.00 -320.00 -32.00)
Warning: invalid neighbor connection on displacement near (-4224.00 -320.00 -32.00)
Warning: invalid neighbor connection on displacement near (-4224.00 -320.00 -32.00)

Cpl. Punishment
09-25-2007, 03:44 PM
Thanks everybody for the help. I was planning on getting rid of the nodraw issues (really!) after I finished with the basic layout. By world geometry, do you mean that it must touch four separate brushes? For example, I'd like to have an area portal as people are coming over a wall. There would be houses on either side, and the wall below, but nothing above. Is that kosher?

because the leak is between the 2nd and 3rd portal

That's weird.... the third portal has never been in the same place twice. :confused: I guess I'll have to load up the point file like Dirty Harry said.

yodapower
09-26-2007, 09:30 AM
here's a visual I made quickly

this is how I use areaportal on outside maps to create areas

your areaportal MUST touch brushes (not displacement, not func_detail, not_func_lod or whatever) so hide all items that aren't blocks brushes and that cannot be seen by VIS (keep skybox brushes) and then close your areas from top skylid to bottom ground (even if it goes through displacement)

within an area (consider that the areaportal is a wall) and check that there is no way of leaking away (imagine you fill in this area with water... it has to be completly closed off)

do the same with the next area and so on... you should be able to get rid of those leaks

load the pointfile to see the redline.. it will lead you to the leak... (beware that the leak is not at the beginning or at the end of the red line but BETWEEN! so just follow the redlint until it goes in a hole and THERE YOU GO YO GOT YOUR LEAK!)


once youv'e done that recompile and check it out... sometimes you may have multiple leaks so you have to reload the pointfile until there aren't any left.




Warning: invalid neighbor connection on displacement near (-4224.00 -896.00 -32.00)


there is no answer for that m8, it's something due to a displacement problem the only solution is to uncheck all displacement and add them one by one until you find the one that is causing this. delete it and rebuild it.

but this is not a major error and does not prevent the map from running (if it's the only error left...)


good luck!

[SAS]==Dirty_Harry
09-26-2007, 10:35 AM
Yes that is kosher.

As Yodapower said and explained very well in his diagram. In that case you would run the area_portal so that it touches both houses on either side of the wall, and bring your skybox down to meet the roof of the houses to completely seal the area, then you would have to have it touching the top of the wall and the underside of your skybox so long as the wall isn't func_detail. If it is you would have to run the area_portal through the wall to the floor of your map.

fishy
09-26-2007, 11:41 AM
If there is any way possible for some small flying insect to get from one side of the areaportal to the other side, then you have a problem. Whether it flies over it, around it, or from one end of the map to the other to find the smallest gap to get through, it's all the same; areaportal leak.

Cpl. Punishment
09-26-2007, 06:21 PM
Ok, I think I understand now. I just have one more question.... if my areaportal goes through a displacement into a brush, will that cause a leak?

yodapower
09-27-2007, 02:53 AM
Ok, I think I understand now. I just have one more question.... if my areaportal goes through a displacement into a brush, will that cause a leak?

No it won't as long as your area portal is touching your brush and there is no gap between it and the brush.

don't care about displacement: they are just ignored by VIS hammer when it runs the map....

you don't need to turn them on to run your map to find a leak....

(I always turn them of when I'm checking for leaks because you cannot properly see how your areaportal sticks to your brushes)

another thing: when you are looking for a leak turn your grid to the smallest unit (1 unit) so you can see if you have a gap or not...

don't just think that your walls are stuck to one another... check them out with the smallest grid and zoom in closely.


func_details, func_lod and props are added AFTER the map has been cut and chopped into VISleaf ... so don't even care about them at the beginning... just make your cube brushs (wich will be your buildings), skybrushes above them just on top and area portals to divide your outdoors area in smaller areas.

think of the passages you want to be able to throw things above (like some walls and building): those should be inside an area or should have an areaportal above them. everywhere else where you don't need to be able to go (or throw things above) just stick skybox brush on top to the celling... you'll save loads of FPS and source engin will love you!!

I changed the diagram for you so you can see how displacement and fuinc_details can be placed

Cpl. Punishment
09-27-2007, 05:51 AM
That's perfect! Thanks Yoda.

Gurney Halleck
09-27-2007, 06:08 AM
Be careful when using a solid brush with a skybox texture cutting through the func_detail, i.e. roof in Yoda's pic. You'll get some crazy shadows on the func_detail/roof. If it can't be seen while in game, it won't be a problem. And if that's the case, the func_detail can be a nodraw texture. If you're optimizing the map for better FPS, look at using the hint brush - almost as powerful as the area portal.

yodapower
09-27-2007, 06:24 AM
Gurney Halleck => oups yeah you're right I forgot to mention that...

Cpl. Punishment => to add to Gurney's comment:

as long as it cannot be seen it allright...

best is to try and see whether it shows up ingame or if it can be cleaverly hidden behing some sort of prop (a treetop for example!)

keep in mind that if you have to choose between a awsome visual effect and 10 to 20 FPS gain ==> always go for FPS.... because if you manage to hide a small ugly shadow on top of a roof... no one ingame will even notice it's there... because they are playing... not looking every inch of your map....

it's all about tricks! look at some official maps closely and you'll see that some details aren't perfect but help gain FPS

for example: try and look very far away in official maps... watch props such as lamposts or boxes for instance see how sometimes they fade in and out at a distance they shouldn't... well do you ever notice it when you play the map? no because you are looking way up at about 400 units and don't care if a lampost appears in the distance of 2000 units do you? so why bother to make them appear so far... it use source's engin for nuts! were you could keep FPS high...

another example: watch behind trees.. you'll notice that sometimes trees hide ugly details.... but never mind!!

as Gurney said do use hints as well inside areas, even in outside areas..... it does help a lot.

placing them at corners around buildings, and usualy I use them horizontaly (2 times above a human's hight) it helps not to draw second floors for example.

hope it'll help U ;)

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.