In
computer-generated imagery
Computer-generated imagery (CGI) is the use of computer graphics to create or contribute to images in art, printed media, video games, simulators, and visual effects in films, television programs, shorts, commercials, and videos. The images may ...
and real-time
3D computer graphics
3D computer graphics, or “3D graphics,” sometimes called CGI, 3D-CGI or three-dimensional computer graphics are graphics that use a three-dimensional representation of geometric data (often Cartesian) that is stored in the computer for th ...
, portal rendering is an algorithm for
visibility determination. For example, consider a 3D computer game environment, which may contain many
polygons
In geometry, a polygon () is a plane figure that is described by a finite number of straight line segments connected to form a closed ''polygonal chain'' (or ''polygonal circuit''). The bounded plane region, the bounding circuit, or the two toge ...
, only a few of which may be
visible
Visibility, in meteorology, is a measure of the distance at which an object or light can be seen.
Visibility may also refer to:
* A measure of turbidity in water quality control
* Interferometric visibility, which quantifies interference contrast ...
on screen at a given time. By determining which polygons are currently not visible, and not
rendering those objects, significant performance improvements can be achieved.
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
Convex or convexity may refer to:
Science and technology
* Convex lens, in optics
Mathematics
* Convex set, containing the whole line segment that joins points
** Convex polygon, a polygon which encloses a convex set of points
** Convex polytope ...
, areas called ''zones'', or sometimes ''sectors''. Adjacent zones are linked to one another via shared dividing polygons termed ''portals''. Approaches that precompute visibility for zones are referred to as
potentially visible set
In 3D computer graphics, Potentially Visible Sets are used to accelerate the rendering of 3D environments. They are a form of occlusion culling, whereby a candidate set of ''potentially visible'' polygons are pre-computed, then indexed at run-t ...
or ''PVS'' methods.
For example, in a
computer game
Video games, also known as computer games, are electronic games that involves interaction with a user interface or input device such as a joystick, game controller, controller, computer keyboard, keyboard, or motion sensing device to gener ...
such as ''
Descent
Descent may refer to:
As a noun Genealogy and inheritance
* Common descent, concept in evolutionary biology
* Kinship, one of the major concepts of cultural anthropology
**Pedigree chart or family tree
**Ancestry
**Lineal descendant
**Heritage (d ...
'', the game area might be divided into several zones. These zones would then be connected to each other by small openings such as doors or windows. These openings are referred to as ''portals''. When the zone 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 zone can be
clipped against the portal boundaries to remove overdraw.
The use of portals simplifies the
game engine
A game engine is a software framework primarily designed for the development of video games and generally includes relevant libraries and support programs. The "engine" terminology is similar to the term "software engine" used in the software i ...
's task of determining visible areas and objects from any given point of view of the level, and simplifies rendering by allowing it to use each portal as a
viewing frustum
In 3D computer graphics, the view frustum (also called viewing frustum) is the region of space in the modeled world that may appear on the screen; it is the field of view of a perspective virtual camera system.
The view frustum is typically ...
for the area it leads to. Ideally, portals are formed of confined areas (like doors or tunnels), connecting two complex areas of the scene, where each of these areas would be enclosed in such a polygonal body.
Portals are best suited for indoor scenes such as mazes. Outdoor scenes do not usually have door-like objects that would clearly separate one zone from another.
See also
*
Antiportal
In computer-generated imagery and real-time 3D computer graphics, antiportal rendering is a way to reduce overdraw (the rendering of detail which will not be in the final image), and in this way to optimize draw speed. Antiportals are the inver ...
*
Binary space partitioning
In computer science, binary space partitioning (BSP) is a method for space partitioning which recursively subdivides a Euclidean space into two convex sets by using hyperplanes as partitions. This process of subdividing gives rise to a represent ...
References
External links
Building a 3D Portal Engine
Computer graphics
{{compu-graphics-stub