Questions about area portals


Propaganda
10-31-2006, 08:01 AM
I noticed they have 2 states, open or closed. If they are left open how then do they work? If they are left closed, do I need to trigger them somehow? I know they can be left closed and tied to entities like a door or something. I noticed in the map de_train, which used portals quite a bit, the areas beind the portals are black from a certain distance, meaning nothing is being rendered behind them. Then as you get closer to the portal whatever is behind it starts to fade in. Would this be a closed portal with a trigger?

Furyo
10-31-2006, 12:48 PM
I'll try and be concise but you can read more into it on the wiki

open areaportals: Only renders what the player needs to see through the areaportal, not the whole vis leaf. Client side

closed areaportals: Never renders anything until the player goes through the areaportal brush. If you can find a way to make it work in a mp map, please tell me. :)

areaportalwindows: This is what you refered to last in your post (fade to black). This is a closed areaportal that opens up as the player gets closer to the actual brush. The transition can be made by using a func_illusionary brush, with either the black tool texture (the one you mentioned) or a white one if your level should be a sunny one for instance. You can also use a custom texture of course (I made a grey one to work with the fog in dod_rive, making it a tool texture).

Bottom line: Don't trigger your portals, or that will take server performance away to calculate what is being seen by each player. Areaportals in a MP map should always be open, or areaportalwindows. Again if you find a place where an always closed areaportal can be used, be my guest, but as far as I know, all portals sealing off an area would need to stay closed at all times to make it work. If one of those is set to open, the always closed one becomes opened.

Dash
10-31-2006, 03:25 PM
Originally posted by Furyo
[B]closed areaportals: Never renders anything until the player goes through the areaportal brush. If you can find a way to make it work in a mp map, please tell me. :)

A good example are dark vents and small dark tunnels...

Propaganda
10-31-2006, 04:12 PM
Originally posted by Furyo
areaportalwindows: This is what you refered to last in your post (fade to black). This is a closed areaportal that opens up as the player gets closer to the actual brush. The transition can be made by using a func_illusionary brush, with either the black tool texture (the one you mentioned) or a white one if your level should be a sunny one for instance.


So I need a func illusionary tied to the func areaportal window brush?

Propaganda
11-01-2006, 08:00 AM
Never mind I fiured it out thanks.

Dustin Diamond
11-03-2006, 08:54 AM
Shouldn't proper use of hint brushes make areaportalwindows useless?

Furyo
11-03-2006, 09:56 AM
No, because as soon as the player is in a leaf that can see that hint, then what's beyond it will be rendered fully. If you use an areaportalwindow, what's beyond it will be rendered when the player is within the distance set in the properties of the areaportalwindow. Meaning you as a mapper can further control when/what to render things.

If you take the example of a very foggy map, with an open field, you may want to start rendering the end of the field once you have walked across it for some time, instead of rendering the whole field all at once, as would happen with a simple hint.

Dustin Diamond
11-03-2006, 05:33 PM
Originally posted by Furyo
If you take the example of a very foggy map, with an open field, you may want to start rendering the end of the field once you have walked across it for some time, instead of rendering the whole field all at once, as would happen with a simple hint.

True, but in that case your z-clip distance should take care of the clipping, since you'll never see through all that fog anyway.

Reason i'm asking is I was going through my map trying to find any place where i could possibly add an areaportalwindow for further optimization and i just cant find one. Instead, I've used hint brushes to more effectively limit what is rendered. Perhaps they would be more fitting in a smaller map with tighter corners.

I'm just arguing that if the leaf a player is in can see another leaf that shouldnt be drawn, then it seems like you should use a hint brush to limit the vis, not an apw. I'm just playing Devil's Advocate. To each his own :)

on second thought, does light still shine through closed apw's? I'm mean does light shine OUT from it. I dont care about what's behind it.

Gurney Halleck
11-07-2006, 05:30 AM
A little off thread but I have another question about the hanging skybox bits, used to seal and divide area portals from one another. Following the Flash example in the SDK, I used thin skybox brushes along the ridges and edges of roofs to seal the APs. I also found the nodraw appears to have the same effect. Does it matter, in this instance, which one is used?

Cheers

Propaganda
11-07-2006, 09:37 AM
I don't think it matters Gurney, a brush entirely textured with no draw will block vis, as will a brush textured with skybox. As long as i renders ok I don't think it matters, but I may be wrong, someone with more experience mapping may know more on this.

[SAS]==Dirty_Harry
11-07-2006, 10:44 AM
I've not tried it but the only thing I can suggest is that the nodraw brush will stop anything behind it being drawn which I would guess means the skybox behind it as well, you may also end up getting the "Hall of Mirrors" effect that you won't get with skybox.

If you look at the Flash.vmf you can see that they also used the "Clip" brush to seal between the roofs and skybox.

Furyo
11-07-2006, 12:05 PM
The clip brush will only block the players in game, not visibility. A nodraw brush will block visibility but will also block the player when playing.

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.