Portals are a powerful mapping feature which allow a variety of rendering effects; they allow an architectural surface to be used as a "window" which can display something besides the texture that would normally cover the surface. Anything from simple fixed plane, to another area of the map can be rendered within these surfaces via the same architecture.
'Portal window' refers to the area of the screen that a portal occupies. For example:
This is a simple map with no portal surfaces, and no portal window.
This is the same simple map with a fixed plane portal applied to the ceiling of the sector. The portal window is outlined in white.
This is the map, but the same plane portal is applied to the ceiling and the far wall. The two surfaces display the same portal, and as such, they share a common portal window (also outlined in white).
All surfaces in a scene that have a common portal will share the same portal window.
A sector off of the main map area which is used by line or sector specials as a model, or as housing for lines which need to be a specific size.
Fixed Plane Portals
Fixed plane portals (as the name implies) render a single, fixed plane into the portal window. The plane is always rendered a the same height and texture offset even when the camera changes it's position.
- 283 Apply fixed plane portals to the ceilings of tagged sectors
- 284 Apply fixed plane portals to the floors of tagged sectors
- 285 Apply fixed plane portals to the floors and ceilings of tagged sectors
The front side sector of the special line is used to generate the plane. The ceiling texture, sector light, and ceiling texture scrolling are all used as attributes for the rendered fixed plane. The absolute height of the ceiling is used as the height of the plane. That is, if the special line front sector has a ceiling height of 64, the plane will always render at 64 units above the camera height. If the ceiling height is 128, the plane will always render at 128 units above the camera height, and so on.
This shows a simple map with a small sector off to the side of the rest of the map. One of the lines in this sector has been given a 283 special which will apply a fixed play portal to all tagged sector ceilings. The height of the dummy sector is set to 128, the blue water texture FWATER1 is the ceiling texture, there is no scrolling applied to the ceiling, and the ceiling height is 128.
Here is what the map looks like in Eternity. Notice the rendered height of the plane is the same as a ceiling 128 units above eye level.
(This article is currently a work in progress)