3D computer graphics
3D computer graphics, sometimes called Computer-generated imagery, CGI, 3D-CGI or three-dimensional Computer-generated imagery, computer graphics, are graphics that use a three-dimensional representation of geometric data (often Cartesian coor ...
, a viewing frustum or view frustum is the region of space in the modeled world that may appear on the screen; it is the
field of view
The field of view (FOV) is the angle, angular extent of the observable world that is visual perception, seen at any given moment. In the case of optical instruments or sensors, it is a solid angle through which a detector is sensitive to elec ...
virtual camera system
In 3D video games, a virtual camera system aims at controlling a camera or a set of cameras to display a view of a 3D virtual world. Camera systems are used in video games where their purpose is to show the action at the best possible angle; m ...
.
The view frustum is typically obtained by taking a geometrical
frustum
In geometry, a ; (: frusta or frustums) is the portion of a polyhedron, solid (normally a pyramid (geometry), pyramid or a cone (geometry), cone) that lies between two parallel planes cutting the solid. In the case of a pyramid, the base faces a ...
—that is a truncation with parallel planes—of the pyramid of vision, which is the adaptation of (idealized) '' cone of vision'' that a camera or eye would have to the rectangular
viewport
A viewport is a polygon viewing region in computer graphics.
In computer graphics theory, there are two region-like notions of relevance when rendering some objects to an image. In textbook terminology, the ''world coordinate window'' is the area ...
s typically used in computer graphics. Some authors use ''pyramid of vision'' as a synonym for view frustum itself, i.e. consider it truncated.
The exact shape of this region varies depending on what kind of camera lens is being simulated, but typically it is a frustum of a rectangular pyramid (hence the name). The planes that cut the frustum perpendicular to the viewing direction are called the ''near plane'' and the ''far plane''. Objects closer to the camera than the near plane or beyond the far plane are not drawn. Sometimes, the far plane is placed infinitely far away from the camera so all objects within the frustum are drawn regardless of their distance from the camera.
Viewing-frustum culling is the process of removing from the rendering process those objects that lie completely outside the viewing frustum. Rendering these objects would be a waste of resources since they are not directly visible. To make culling fast, it is usually done using
bounding volume
In computer graphics and computational geometry, a bounding volume (or bounding region) for a set of objects is a closed region that completely contains the union of the objects in the set. Bounding volumes are used to improve the efficiency ...
s surrounding the objects rather than the objects themselves.
Definitions
;VPN: the view-plane normal – a normal to the view plane.
;VUV: the view-up vector – the vector on the view plane that indicates the upward direction.
;VRP: the viewing reference point – a point located on the view plane, and the origin of the VRC.
;PRP: the projection reference point – the point where the image is projected from, for parallel projection, the PRP is at infinity.
;VRC: the viewing-reference coordinate system.
The geometry is defined by a
field of view
The field of view (FOV) is the angle, angular extent of the observable world that is visual perception, seen at any given moment. In the case of optical instruments or sensors, it is a solid angle through which a detector is sensitive to elec ...
angle (in the 'y' direction), as well as an
aspect ratio
The aspect ratio of a geometry, geometric shape is the ratio of its sizes in different dimensions. For example, the aspect ratio of a rectangle is the ratio of its longer side to its shorter side—the ratio of width to height, when the rectangl ...
. Further, a set of z-planes define the near and far bounds of the frustum. Together this information can be used to calculate a
projection matrix
In statistics, the projection matrix (\mathbf), sometimes also called the influence matrix or hat matrix (\mathbf), maps the vector of response values (dependent variable values) to the vector of fitted values (or predicted values). It describes ...
graphics pipeline
The computer graphics pipeline, also known as the rendering pipeline, or graphics pipeline, is a framework within computer graphics that outlines the necessary procedures for transforming a three-dimensional (3D) scene into a two-dimensional (2 ...