Author Topic: Area Portals  (Read 1521 times)

Corporal Perez

  • Stingray
  • Posts: 84
Area Portals
« on: August 08, 2007, 12:41:20 PM »
what are area portals
« Last Edit: August 08, 2007, 12:47:18 PM by y00tz »

Chef-Killer

  • Moderator
  • Autococker
  • Posts: 1312
Re: Area Portals
« Reply #1 on: August 08, 2007, 01:34:01 PM »
func_areaportal:
This is a non-visible object that divides the world into
areas that are seperated when this portal is not activated.
Usually enclosed in the middle of a door.


I think it could be useful for lower r_speeds on big maps, but i don't realy now.

DrRickDaglessMD

  • 68 Carbine
  • Posts: 376
Re: Area Portals
« Reply #2 on: August 08, 2007, 01:45:07 PM »
right now, im going to say 'the work of the devil' (as im having a real ball-ache getting them to work on kungfu).

To make the map efficient to render by the game engine, you need the game to properly recognise what to draw and what not to - depending on if you can see it or not. If something is out of your line of sight, there isn't much point in the game drawing it as it just uses up resources for no reason. As such, it calculates what can be seen and what should be drawn from your point of view. Quake 2 only takes into account solid walls when it does these calculations, so when you make func_door entities they are effectively transparent to the bit of the program that makes the line-of-sight decisions. An area portal (func_areaportal entity) is a brush that should be placed inside the func_door entity to seal up the doorframe completely in order to make the engine recognise that when the door is shut, you can't see whats behind it so it shouldn't draw all the stuff thats behind it. It's triggered by the door, so imagine that it is like a solid block inside the door that immediately dissapears when the door is triggered to open.

The upshot of all this is that when the doors are closed, the game only renders what it can really see, making the task of drawing the room a lot simpler and more efficient.

further info on to make them:
func_areaportal info.
some more stuff.

hope that helps.

- Rick

Eiii

  • Autococker
  • Posts: 4595
Re: Area Portals
« Reply #3 on: August 08, 2007, 02:18:55 PM »
I made two example maps. One showing the upside of areaportals, and one showing the downside.

In ap_whoops, press the button (made of rock) to toggle the second areaportal.

Basically, you can't have any open spaces between the two areas.

EDIT: added .map files to zip.

Corporal Perez

  • Stingray
  • Posts: 84
Re: Area Portals
« Reply #4 on: August 11, 2007, 01:23:16 PM »
Thanks for all your help!  :)