Viewing frustum
View on WikipediaThis article needs additional citations for verification. (August 2014) |
| Three-dimensional (3D) computer graphics |
|---|
| Fundamentals |
| Primary uses |
| Related topics |



In 3D computer graphics, a viewing frustum[1] or view frustum[2] 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.[2]
The view frustum is typically obtained by taking a geometrical frustum—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 viewports typically used in computer graphics.[3][4] Some authors use pyramid of vision as a synonym for view frustum itself, i.e. consider it truncated.[5]
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.[6] 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 volumes surrounding the objects rather than the objects themselves.
Definitions
[edit]- 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 angle (in the 'y' direction), as well as an aspect ratio. 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 for rendering transformation in a graphics pipeline.
References
[edit]- ^ Kelvin Sung; Peter Shirley; Steven Baer (6 November 2008). Essentials of Interactive Computer Graphics: Concepts and Implementation. CRC Press. p. 390. ISBN 978-1-56881-257-1.
- ^ a b "What Is a View Frustum?". Microsoft. 15 August 2012. Retrieved 1 January 2022.
- ^ Ranjan Parekh (2013). Principles of Multimedia (2nd ed.). Tata McGraw-Hill Education. p. 413. ISBN 978-1-259-00650-0.
- ^ Karen Goulekas (2001). Visual Effects in A Digital World: A Comprehensive Glossary of over 7000 Visual Effects Terms. Morgan Kaufmann. p. 409. ISBN 978-0-08-052071-1.
- ^ Isaac V. Kerlow (2004). The Art of 3D: Computer Animation and Effects. John Wiley & Sons. p. 185. ISBN 978-0-471-43036-0.
- ^ "View Frustum Culling". lighthouse3d.com. 15 April 2011. Retrieved 11 June 2014.
Viewing frustum
View on GrokipediaglFrustum function, which takes parameters for the left, right, bottom, top, near, and far boundaries to construct the projection matrix.[1]
In the rendering pipeline, the viewing frustum plays a crucial role in the perspective projection transformation, mapping 3D world coordinates to normalized device coordinates for display on a 2D screen while simulating realistic depth perception through perspective division.[1] It also enables frustum culling, an optimization technique that tests scene objects against the frustum's planes—often using bounding volumes like axis-aligned bounding boxes (AABBs) or spheres—to discard invisible elements before sending them to the GPU, significantly reducing draw calls and improving performance in real-time applications like video games and simulations.[2][5]
Fundamentals
Definition and Basic Concepts
In computer graphics, the viewing frustum is the three-dimensional region of space that may appear on the screen, formed by a perspective projection from a virtual camera; it represents the pyramidal volume bounded by clipping planes, defining what is potentially visible.[1] This region is shaped like a truncated pyramid, with its apex at the camera position and extending outward to encompass the field of view.[6] The key components of the viewing frustum include the near plane, which sets the minimum distance from the camera to avoid rendering objects too close (such as at a distance of 0.1 units); the far plane, establishing the maximum distance beyond which objects are clipped (often set at 1000 units or more); and the four side planes—top, bottom, left, and right—delimited by the horizontal and vertical field of view angles, typically 90 degrees or less to simulate realistic sight.[1] These parameters ensure that only geometry within this bounded volume is processed for projection onto the two-dimensional viewing plane.[6] This concept draws an analogy to human vision, where the frustum mimics the eye's field of view: distant objects appear smaller and converge toward a vanishing point, while elements outside the boundaries, akin to peripheral limits, are excluded from rendering to optimize computation.[1] In terminology, while a "frustum" in pure geometry denotes the portion of a pyramid or cone between two parallel planes—a truncated solid without specific projection context—the "view frustum" is camera-specific, tailored to graphics rendering pipelines.[7][6]Historical Development
The concept of the viewing frustum emerged from foundational work in interactive computer graphics during the 1960s, rooted in projective geometry and early 3D modeling efforts. Ivan Sutherland's 1963 Sketchpad system, developed at MIT, introduced interactive manipulation of graphical elements, laying the groundwork for perspective views in digital environments, though initially focused on 2D. By 1968, Sutherland's pioneering head-mounted display system explicitly incorporated perspective projection to simulate 3D spatial viewing, defining a bounded volume of visibility that prefigured the frustum as a core element of virtual camera models.[8][9] In the 1970s, the viewing frustum gained practical significance through advancements in hidden surface removal and early graphics hardware, particularly in applications like flight simulators that demanded efficient rendering of 3D scenes. The founding of Evans & Sutherland in 1968 by David Evans and Ivan Sutherland marked a key milestone, as the company developed specialized hardware for real-time perspective projection and view volume management, enabling immersive simulations with bounded visibility regions. Arthur Appel's 1969 ray-casting algorithm at IBM addressed hidden line elimination by tracing rays within a defined projection volume, an early implicit use of frustum-like boundaries for visibility computation.[10] Subsequent algorithms, such as Watkins' 1970 scan-line method and the 1977 Weiler-Atherton polygon clipping technique, formalized clipping against the view frustum to resolve occlusion in polygonal scenes, integrating the concept into the emerging graphics pipeline. These developments were prominently discussed at inaugural SIGGRAPH conferences starting in 1973, where sessions on projection volumes and visibility highlighted the frustum's role in efficient rendering.[11][12] The 1980s saw the viewing frustum transition from experimental software implementations to standardized components in professional graphics systems, with adoption in standards like the Programmer's Hierarchical Interactive Graphics System (PHIGS). The release of OpenGL 1.0 in June 1992 by Silicon Graphics revolutionized its formalization, introducing the glFrustum function to explicitly define the frustum parameters—near and far planes, and left, right, bottom, and top clipping boundaries—centralizing it in the cross-platform graphics pipeline. Microsoft followed with Direct3D in 1995, incorporating similar frustum-based projection and clipping mechanisms. By the late 1990s, the shift to hardware acceleration culminated in GPUs like NVIDIA's GeForce 256 (1999), which integrated frustum clipping into the fixed-function pipeline for real-time performance, transforming software-based culling into efficient, dedicated circuitry.[13][14]Geometry and Mathematics
Frustum Shape and Parameters
The viewing frustum in computer graphics is a convex polyhedron that represents the portion of three-dimensional space visible to a virtual camera under perspective projection, forming a truncated pyramid with six faces: two parallel rectangular planes (the near and far clipping planes) and four connecting trapezoidal side planes.[15] This geometric structure arises from the convergence of sight lines from the camera's eye point through the boundaries of the projection plane, resulting in a shape that expands linearly from the near plane to the far plane.[15] Key parameters define the frustum's boundaries and scale. The horizontal field of view (FOV_h) and vertical field of view (FOV_v) specify the angular extent of the visible scene in the horizontal and vertical directions, respectively, typically measured from the camera's optical axis.[16] The aspect ratio, defined as the width-to-height ratio of the near plane (often matching the display's aspect ratio), relates FOV_h and FOV_v such that .[17] Additionally, the near plane distance sets the closest clipping boundary from the eye, while the far plane distance establishes the farthest, both measured along the camera's negative z-axis in eye coordinates.[16] The volume of the frustum, useful for certain spatial computations in graphics algorithms, is calculated using the formula for a pyramidal frustum:Projection Matrices
In computer graphics, projection matrices transform 3D coordinates from eye space into clip space, enabling the perspective projection that defines the viewing frustum. These matrices operate on points represented in homogeneous coordinates, which extend 3D points to 4D vectors to facilitate affine transformations and perspective division. The fourth component is typically set to 1 initially but becomes after projection, allowing post-multiplication division by to simulate depth-based scaling.[19][20] The standard perspective projection matrix, as used in OpenGL via functions likegluPerspective, is derived for a symmetric frustum defined by vertical field of view (FOV), aspect ratio, near plane distance , and far plane distance . Let . The matrix is:
Applications in Computer Graphics
View Frustum Culling
View frustum culling is a visibility determination technique employed in computer graphics rendering pipelines to discard entire objects or groups of objects that lie completely outside the viewing frustum, thereby reducing the number of draw calls and alleviating computational load on the vertex processing stage.[22] By testing simplified representations known as bounding volumes—such as spheres or axis-aligned bounding boxes (AABBs)—against the frustum boundaries prior to submitting geometry to the graphics hardware, this method prevents unnecessary processing of off-screen elements, leading to substantial performance gains in complex scenes.[22] The core algorithm involves classifying a bounding volume relative to each of the six frustum planes, which define the near, far, left, right, top, and bottom boundaries of the viewable region.[22] For a given plane defined by the equation $ \mathbf{n} \cdot \mathbf{x} + d = 0 $, where $ \mathbf{n} $ is the unit normal vector pointing inward and $ d $ is the plane offset, the signed distance from a point $ \mathbf{x} $ to the plane is computed as $ \mathbf{n} \cdot \mathbf{x} + d $.[22] If the distance is negative, the point is inside the half-space; if positive, it is outside. The volume is deemed outside the frustum if it lies entirely on the outside of any single plane, fully inside if it resides within all planes, and intersecting otherwise, in which case it requires further processing or rendering.[22] In practice, these six frustum planes are typically extracted from the camera's combined view-projection matrix using the Gribb-Hartmann method. This efficient technique derives the plane equations directly by adding and subtracting specific rows of the 4x4 matrix (and normalizing), avoiding the need for trigonometric computations from FOV and near/far parameters. It is particularly popular in real-time applications and game engines due to its speed and numerical stability. Testing bounding volumes against these planes varies by shape for efficiency. For spheres, which are simple and isotropic, the test adjusts the plane equation by the sphere's radius $ r $: compute the signed distance $ c $ from the sphere center to the plane, classifying the sphere as outside if $ c > r $, inside if $ c + r < 0 $, and intersecting otherwise.[22] Axis-aligned bounding boxes (AABBs), more tightly fitting for many objects, require evaluating the extrema along the plane normal. This involves projecting the AABB's min and max vertices onto the normal direction to find the farthest points: the negative-extremum vertex (n-vertex, minimizing $ \mathbf{n} \cdot \mathbf{x} $) and positive-extremum vertex (p-vertex, maximizing $ \mathbf{n} \cdot \mathbf{x} $). The signed distances $ a = \mathbf{n} \cdot \mathbf{v_n} + d $ and $ b = \mathbf{n} \cdot \mathbf{v_p} + d $ are then used: outside if $ a > 0 $, inside if $ b < 0 $, and intersecting if $ a \leq 0 $ and $ b \geq 0 $.[22] Precomputing these extrema or using look-up tables for common normals can further optimize the process.[22] To handle large-scale scenes efficiently, hierarchical culling organizes objects into spatial data structures such as bounding volume hierarchies (BVH) or octrees, where parent nodes encompass child bounding volumes.[22] Traversal begins at the root, testing the parent's volume first; if outside, the entire subtree is culled without examining children, while fully inside subtrees may bypass detailed tests.[22] This top-down approach amortizes costs over many objects, particularly effective in expansive environments. In practice, view frustum culling can eliminate a large portion of a model's geometry in large scenes, such as architectural or outdoor models, significantly boosting rendering performance. For instance, optimized implementations have demonstrated speedups of 3-10x in polygonal scenes with thousands of nodes compared to naive methods.[22] A basic pseudocode implementation for testing an AABB against a single frustum plane illustrates the classification logic:function classifyAABB(plane_normal, plane_d, aabb_min, aabb_max):
# Compute n-vertex (min projection) and p-vertex (max projection)
v_n = [aabb_min[i] if plane_normal[i] > 0 else aabb_max[i] for i in 0..2]
v_p = [aabb_max[i] if plane_normal[i] > 0 else aabb_min[i] for i in 0..2]
a = dot(plane_normal, v_n) + plane_d
if a > 0:
return OUTSIDE
b = dot(plane_normal, v_p) + plane_d
if b < 0:
return INSIDE
return INTERSECTING
To classify the full frustum, iterate over all six planes and aggregate results: return OUTSIDE on the first such detection, INTERSECTING if any plane intersects, else INSIDE.[22]