vis, areaportals, hint brushes and visibility

vis, areaportals, hint brushes and visibility

Re: vis, areaportals, hint brushes and visibility Posted by Liberal.Nyulism on Thu Feb 24th 2005 at 3:30am
Liberal.Nyulism
67 posts
Posted 2005-02-24 3:30am
67 posts 227 snarkmarks Registered: Jan 7th 2005 Occupation: exec Location: USA
I have a map with a sewer system that functions very similarly to the tunnels in CS_MILITIA, where one end of the underground tunnel is near the spawn, there are muliple exits in the middle of the tunnel, and the other end comes out behind the opponent's spawn. This means that the sewers touch most of areas of the map.

Using mat_wireframe, I can see that the sewers are rendering almost all the time, despite the fact that they should almost never be visible.

When I close the sewers in with area portals, I get a set of errors for each func_areaportal, saying that it "doesn't touch two areas". There is a .LIN file created.

If I follow the .LIN file, it makes a complete circuit of the map. It crosses into one sewer entry, and out of another sewer entry, both of which have area portals covering them. (and therefore, I don't understand the algorithm like I thought I did.)

Is it possible that there is a volume limit to the size of any area covered by an area portal, and once you use an area portal, you have to manage the space around them?

The map doesn't have leaks. The areaportals to not cross water. They are covered on all sides by the areaportal texture. They all snugly fit in rectangular openings that are on the grid. They are all func_areaportal, set to Always Open. When the map renders, despite the "Open" setting, the areaportals are transparent, and show through to void, although once you cross through them they work fine.

I've used hint brushes, and they do not stop vis from rendering the sewers despite the fact that they are never visible except under very specific conditions.

Thanks in advance for any help.

(I wish we could prune the VIS tree the same way we make mods to the NAV tree. It would be difficult, but interesting. And it would give us the control we need over our maps.)

[edit: changed On to Open)
Re: vis, areaportals, hint brushes and visibility Posted by Joe-Bob on Thu Feb 24th 2005 at 3:55am
Joe-Bob
180 posts
Posted 2005-02-24 3:55am
Joe-Bob
member
180 posts 77 snarkmarks Registered: Dec 3rd 2004
The symptoms you're getting make it seem like you built a giant box
around the sewers. That's a bad idea, if you did it. Also,
if you're getting a leak, VIS won't run anyway. Thus, no matter
how well you constructed your level, everything will display at once.

As far as fixing that leak goes... areaportals must completely close
off an area, and the inside area may not touch the outside. The
inside area may as well be its own map, and any leak in that will be
treated the same as a leak to the void.
Re: vis, areaportals, hint brushes and visibility Posted by Liberal.Nyulism on Thu Feb 24th 2005 at 6:17am
Liberal.Nyulism
67 posts
Posted 2005-02-24 6:17am
67 posts 227 snarkmarks Registered: Jan 7th 2005 Occupation: exec Location: USA
I didn't build a dummy-box around the sewers. There is some other limitation to vis and areaportals... something like volume enclosed, or lin-distance, or something of that nature.

Anyway, I cannot get vis to stop rendering the sewers. Hints, areaportals, nothing.

I was wondering if it's that the ladder brushes extend up and down into both spaces?

Any ideas please. This is exasperating. I need to get about 10% of a performance increase out of this map, and it's all because I'm getting areas rendered that are out of sight.
Re: vis, areaportals, hint brushes and visibility Posted by fishy on Thu Feb 24th 2005 at 8:50am
fishy
2623 posts
Posted 2005-02-24 8:50am
fishy
member
2623 posts 1476 snarkmarks Registered: Sep 7th 2003 Location: glasgow
can you seal off one area using 2 seperate areaportals?

i've not used them yet, but it sounds from your description that they might work independantly from each other. i'd try streaching one so that it covered both entrances to the sewers.

and on a hl1 related note, large func_brushes were never handled well, and would often be rendered when they shouldn't have been. you've not got big entity brushes, or lots of smaller stuff in the sewers all tied to the same entity, have you?
Re: vis, areaportals, hint brushes and visibility Posted by keved on Thu Feb 24th 2005 at 1:44pm
keved
252 posts
Posted 2005-02-24 1:44pm
keved
member
252 posts 515 snarkmarks Registered: Jan 21st 2005 Occupation: Games designer, Rockstar Leeds Location: Leeds, UK
Could you use noclip to zoom out then take a pic of the shape of your sewer system? How far is it from the sewers up to ground level above? For all we know the sewers could be in a straight line and directly connect onto the ground level above ie with no short section of tunnel to help block vis), in which case visibility won't be blocked and hint brushes won't help.

Posting your compile log may also help - some bsp error messages prevent leak messages from appearing.
Re: vis, areaportals, hint brushes and visibility Posted by SaintGreg on Thu Feb 24th 2005 at 2:32pm
SaintGreg
212 posts
Posted 2005-02-24 2:32pm
212 posts 51 snarkmarks Registered: Dec 3rd 2004
Yeah we need pictures of your map. Without knowing how its constructed we cannot tell you what you did wrong. If you fix the bsp error with the areaportals they should work fine.

Also consider that an always open areaportal will not cull everything to the portal, it will only cull vis clusters to the portal, so if in the sewers you have very large clusters then there will be very little extra culling.

EDIT: i didnt catch it at first but you solved your own problem. The lin file should show a path that goes from one side of there areaportal to another side without crossing another areaportal (and staying within all world gemoetry). Very similar to D3 portals, in order to use an areaportal, (or portal) you need to close off discrete areas with them. In your case each and every exit to the sewer needs to be closed off with an areaportal. This will make the whole sewer one discrete area that can not go from one side of the areaportal to the other. If you did this in doom 3 your whole level would be one BSP leaf. Not good, so you have to make discrete sections out of the portals.
Re: vis, areaportals, hint brushes and visibility Posted by Liberal.Nyulism on Sat Feb 26th 2005 at 10:15am
Liberal.Nyulism
67 posts
Posted 2005-02-26 10:15am
67 posts 227 snarkmarks Registered: Jan 7th 2005 Occupation: exec Location: USA
Yes, that's close to the issue. Thank you.

I closed off all the areas, but the inter-area leak wasn't from an areaportal, but from the geometry between the area portals. I just didn't catch it because the line was so long and circuitous. I got about a 5fps performance increase by better sealing the areas of the map off from openings I wasn't aware of because they were behind an unintuitive func_detail entity.

I made a huge test map of three large areas, connected by six tunnels, and then ran a number of scenarios using areaportals, and leaks between areas. HL3 is great because can get a lin file and a leak warning by exposing your map to the void. But, until you use areaporals, you haven't sealed off areas of your map from each other. Really though, unless you're actually using doors, areaportals seem kind of silly to me, They help seal the level areas off from one another, and help you debug, but most of the Tut's pitch them as advanced hint brushes for controlling vis, but they really don't function well in that capacity.

Desite closing off different areas of the map, I still cannot get the sewers to stop rendering. I'll post the map as a beta in the next week or so, and see what people have to recommend.

-Cheers and thanks for the help.