Portal rendering
From Wikipedia, the free encyclopedia
In computer-generated imagery and real-time 3D computer graphics, portal rendering is an algorithm for visibility determination. A game level might contain many graphical polygons; only a few of which may be visible on screen at a given time. Visibility determination allows the renderer to decide which of those fall into that category and thus reduce rendering time.
A Portal System is based on using the partitioning of space to form generalizations about the visibility of objects within those spaces. Regions of map space are divided into polygonal, generally convex, areas called Sectors. Adjacent Sectors are linked to one another via shared dividing polygons termed Portals.
For example, in a computer game, the game area might be divided to several sectors. These sectors would be then connected to each other by small openings such as doors or windows. These openings are referred as portals. When the sector behind a portal needs to be drawn, the only parts that are visible are the parts that can be seen through the portal. Therefore, the sector can be clipped against the portal boundaries to remove overdraw.
The use of portals simplifies the game engine's task of determining visible areas and objects from any given point of view of the level and simplifying rendering by allowing it to use each portal as a viewing frustum for the area it leads to. Ideally, portals are formed of confined areas (like doors or tunnels), connecting two complex areas of the level, where each of these areas would be enclosed in such a polygonal body.
Portals are best suitable for indoor scenes such as mazes. Outdoor scenes do not usually have door-like objects that would clearly separate one sector from another.
One of the first computer games to use portal rendering was Cybercon III.