Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

A cubemap (also written cube map) is a texture made of six square two-dimensional images that form the faces of a cube centered on a viewpoint. Instead of a pair of 2D texture coordinates, a cubemap is sampled with a three-dimensional direction vector that starts at the center of the cube; the direction selects one face and a texel on that face.[1] Microsoft's Direct3D documentation calls the same structure a cubic environment map and describes it as image data "representing the scene surrounding an object, as if the object were in the center of a cube", with each of the six faces covering a 90-degree field of view horizontally and vertically.[2]

In 1986 Ned Greene argued that projection onto a cube was the best general-purpose representation for environment maps, and cube map textures became part of the core OpenGL API in version 1.3 in 2001.[3][1] In real-time rendering they are used for reflections and skyboxes.[4] In virtual and augmented reality they have additional roles: as a projection format for 360-degree video and panoramas, as a compositor layer type in VR runtimes, and as the format of the environment lighting probes that AR frameworks build from camera images.[5][6][7]

Reviewed 6 October 2026. Claims checked against the cited OpenGL and OpenXR specifications, vendor documentation, Facebook and Google engineering posts, standards documents and paper abstracts. About review dates.

How it works

The six faces correspond to the positive and negative directions of the three axes (+X, -X, +Y, -Y, +Z, -Z). Each texel represents what can be seen from the cube's center in that direction.[8] The OpenGL 1.3 specification defines the lookup: the (s, t, r) texture coordinates are treated as a direction vector, the coordinate with the largest magnitude (the major axis) selects the face, and the two remaining coordinates are divided by the major-axis value to give a 2D position on that face.[1] The specification notes that the q coordinate can be ignored because it only scales the vector without changing its direction.[1]

A cubemap can be loaded from six static images or generated at run time. NVIDIA's developer guidance describes placing a camera with a 90-degree field of view at the object's position and rendering the surrounding scene six times, once toward each axis direction, to produce a dynamic environment map.[8] Direct3D supports the same approach by allowing the cube faces to be render targets, and cubemaps can be mipmapped.[2] The faces can also hold precomputed lighting rather than a plain picture of the surroundings: a blurred or low-resolution cubemap can stand in for reflections on rough surfaces, and a cubemap can store diffuse lighting looked up by surface normal.[8] Greene's 1986 paper had already presented methods for obtaining diffuse and specular surface illumination from prefiltered environment maps.[3]

When each face is filtered as an independent 2D texture, bilinear filtering near an edge cannot reach the neighboring face, which produces visible seams. The ARB_seamless_cube_map extension, approved by the OpenGL Architecture Review Board on 3 July 2009, lets implementations take samples from adjacent faces.[9] Seamless cube map filtering became part of core OpenGL in version 3.2, released on 3 August 2009.[10]

A cube does not sample the sphere evenly. The center of each face is closer to the sphere than its corners, so a standard cubemap spends more pixels near the corners of each face than near the center.[11][12] Several of the 360-video variants described below exist to correct or exploit this property.

History

Environment mapping predates the cube form. James Blinn and Martin Newell introduced reflection mapping in "Texture and reflection in computer generated images", published in Communications of the ACM in October 1976.[13] According to Paul Debevec's history of the technique, Gene Miller and Robert Hoffman's SIGGRAPH 84 course notes, "Illumination and Reflection Maps: Simulated Objects in Simulated and Real Environments", described pre-convolving reflection maps and storing them as perspective images on six cube faces.[14]

Ned Greene of the New York Institute of Technology published "Environment Mapping and Other Applications of World Projections" in IEEE Computer Graphics and Applications in November 1986. The paper proposed a uniform framework for representing world projections and argued that the best general-purpose representation is projection onto a cube. It also compared environment mapping with ray tracing, noting that diffuse reflection and antialiasing of specular reflection, two problems for ray tracing, could be handled effectively by environment mapping.[3] Debevec's history records that Greene combined a 180-degree fisheye photograph of the sky with a computer-generated image of desert terrain to build a full-view environment cube.[14]

HardWare.fr's preview of the NVIDIA GeForce 256, published on 31 August 1999, described cube environment mapping as one of the DirectX 7 functions the chip handled, at a time when other chips used sphere environment mapping, and explained that a cube map avoided the stretched or distorted reflections of sphere maps and did not have to be fully recalculated whenever the viewpoint changed.[15] In OpenGL, the ARB_texture_cube_map extension, with Michael Gold of NVIDIA listed as contact, replaced the earlier EXT_texture_cube_map and was approved by the Architecture Review Board on 8 December 1999.[16] OpenGL 1.3, released on 14 August 2001, promoted cube mapping to the core API, together with a REFLECTION_MAP texture coordinate mode described in the specification as "useful for environment mapping without the singularity inherent in SPHERE_MAP mapping".[1]

Panorama software adopted the cube at about the same time. Apple's documentation states that QuickTime 5.01 introduced a cubic playback engine for QuickTime VR that stores panoramic images as six or more separate images projected onto the sides of a cube, which let viewers look straight up and straight down.[17]

Applications in VR and AR

Skyboxes and reflections

Unity's manual describes cubemaps as "often used to capture reflections or 'surroundings' of objects", with skyboxes and environment reflections as typical uses.[4] Facebook's engineers summarized the same history when describing their VR capture tools: cube maps "have been used in computer graphics for a long time, mostly to create skyboxes (six-sided cubes that are drawn behind all graphics) and reflections".[18]

360-degree video projection

In October 2015, Facebook engineers David Pio and Evgeny Kuzyakov explained that the equirectangular layout used for 360 video contains redundant information at the top and bottom of the image, and that Facebook was remapping uploaded 360 videos to cube maps. They gave three reasons: each face looks like a normal perspective camera view without geometric distortion, so video codecs that assume straight-line motion vectors encode it better; pixels are well distributed with no poles; and each face maps only onto the matching cube face. With the faces arranged in two rows, the result contained "25 percent fewer pixels per frame" than the equirectangular input.[5][19]

In January 2016 Facebook released the source code of its equirectangular-to-cube-map ffmpeg filter and described a further pyramid geometry for view-dependent streaming, in which the base of the pyramid holds the full-resolution field of view and the sides decrease in quality. Facebook said this reduced file size by 80 percent against the original, compared with 25 percent for the cube map.[20] The GitHub repository linked from that post now redirects to Transform360, which its README describes as "a video/image filter that transforms a 360 video from one projection to another", usually from equirectangular to cubemap.[21]

Facebook later introduced offset cubemaps, which map the sphere onto a cube with the virtual camera shifted toward the back so that more pixels fall in the viewing direction. Kuzyakov described the layout as part of Facebook's dynamic streaming optimizations in February 2017, and an April 2017 post reported that applying the offset only in the horizontal plane kept vertical lines intact.[22][12] Researchers at SUNY Binghamton and Tsinghua University reverse-engineered the Oculus version from downloaded video frames. They found that Oculus encoded each frame at 22 offset orientations and four quality levels, 88 encoded images per frame, and estimated that the offset cube could give better or similar visual quality with less than 50 percent of the pixels, for average bitrate savings of 5.6 to 16.4 percent.[23]

Google took a different route. In March 2017 Chip Brown, a staff software engineer on Daydream, described the Equi-Angular Cubemap (EAC), developed with YouTube. EAC keeps the six-face structure but spaces samples by equal changes in viewing angle rather than equal distances on the face, which spreads pixels more evenly than either equirectangular or standard cubemap projection and improves quality around the equator.[11] 9to5Google reported that the change was already live for spherical video on Android, with iOS and desktop support to follow.[24] Google's Spherical Video V2 metadata specification includes a Cubemap Projection Box ('cbmp'); its layout value 0 is a grid of 3 columns and 2 rows, and the WebM version lists Cubemap as projection type 2.[25]

The cube layout is also part of formal standards and common tools. MPEG's Omnidirectional Media Format (OMAF), published as ISO/IEC 23090-2 (first edition, January 2019), specifies equations for the equirectangular and cubemap projection formats and for rectangular region-wise packing.[26] Miska Hannuksela and Ye-Kui Wang describe OMAF as "arguably the first virtual reality (VR) system standard".[27] FFmpeg's v360 filter converts between equirectangular video, cubemaps in 3x2, 6x1 and 1x6 layouts, the equi-angular cubemap, and Facebook's 360 formats, among other projections.[28]

Capture from game engines

Facebook's 360 Capture SDK, announced in April 2017, captured VR scenes by having the game engine render a cube map directly instead of stitching camera views, with a shader available to convert the result to equirectangular for platforms that need it. Facebook said the SDK worked with Unity, Unreal Engine and native engines, could capture 360 video at up to 4K, and kept 90 fps on the Oculus Rift while capturing 360 video at 30 fps. It also stated that the perceptual quality of its cube map format at 720p was "almost equivalent" to 1080p equirectangular.[18]

Compositor layers

VR runtimes can display a cubemap as a separate compositor layer rather than drawing it into the application's eye buffers. The OpenXR extension XR_KHR_composition_layer_cube (registered extension number 7, ratified, with contributors from Oculus, ARM, Google and Qualcomm) "adds an additional layer type that enables direct sampling from cubemaps". The specification calls the cube layer "the natural layer type for hardware accelerated environment maps" and notes that the user can look all around without the application updating the image. The layer's swapchain must be created with six faces, and the layer carries an orientation for the environment map.[6]

Meta's Unity documentation for Meta Quest compositor layers lists cubemap and off-center cubemap shapes, describes cubemaps as most commonly used for reflections and scene backgrounds or for low-overhead loading and startup scenes, and limits a scene to one cylinder layer and one cubemap layer.[29] Unity's XR Composition Layers package defines a Cube layer as "a cube always centered at the user's head position with only its inside faces visible", useful for skyboxes and 360 panoramic images; its platform table lists support on Meta Quest and Android XR.[30]

AR environment lighting

AR frameworks use cubemaps to light virtual objects with the real surroundings. In ARKit, available since iOS 12, an AREnvironmentProbeAnchor provides environmental lighting for an area of space; its environment texture is "a cube-map texture that represents the view in all directions from the probe anchor's position", generated from camera imagery during the session and usable by SceneKit or a custom renderer for image-based lighting.[7] Google's ARCore Environmental HDR mode estimates a main directional light, ambient spherical harmonics and an HDR cubemap. Google's documentation recommends the cubemap for reflections on medium to high gloss materials such as shiny metal, and notes that computing it costs a small amount of extra CPU time.[31]

Research

Several academic studies of 360-degree video use the cubemap as a baseline or as their working representation. Xavier Corbillon, Gwendal Simon, Alisa Devlic and Jacob Chakareski proposed a viewport-adaptive streaming system for head-mounted displays in which the server prepares versions of a video with different quality regions. Comparing spherical-to-plane projections, they found that "the cube map layout offers the best quality for the given bit-rate budget".[32] The SUNY Binghamton and Tsinghua measurement study of offset cubes also found that downloading segments adapted both in quality level and in offset orientation could fetch over 57 percent extra segments compared with an ideal strategy, wasting 20 percent of the downloaded bandwidth.[23]

In computer vision, Hsien-Tzu Cheng and co-authors at CVPR 2018 introduced Cube Padding for predicting where viewers look in 360-degree video. Their network renders the 360-degree view onto the six faces of a cube with perspective projection and pads convolution and pooling layers using the connectivity between faces, which avoids the distortion of equirectangular images and the artificial image boundaries of separate views.[33]

See also

References

  1. ↑ 1.0 1.1 1.2 1.3 1.4 Mark Segal, Kurt Akeley; Jon Leech (editor) (2001-08-14). "The OpenGL Graphics System: A Specification (Version 1.3)". Khronos OpenGL Registry. Silicon Graphics, Inc.. https://registry.khronos.org/OpenGL/specs/gl/glspec13.pdf. Retrieved 2026-10-06.
  2. ↑ 2.0 2.1 "Cubic Environment Mapping (Direct3D 9)". Microsoft Learn. Microsoft. 2018-05-31. https://learn.microsoft.com/en-us/windows/win32/direct3d9/cubic-environment-mapping. Retrieved 2026-10-06.
  3. ↑ 3.0 3.1 3.2 Ned Greene (1986-11). "Environment Mapping and Other Applications of World Projections". IEEE Computer Graphics and Applications, vol. 6, no. 11, pp. 21-29. doi:10.1109/MCG.1986.276658. https://doi.org/10.1109/MCG.1986.276658. Retrieved 2026-10-06.
  4. ↑ 4.0 4.1 "Introduction to cubemaps". Unity Manual. Unity Technologies. https://docs.unity3d.com/Manual/class-Cubemap-introduction.html. Retrieved 2026-10-06.
  5. ↑ 5.0 5.1 David Pio, Evgeny Kuzyakov (2015-10-15). "Under the hood: Building 360 video". Engineering at Meta. Facebook. https://engineering.fb.com/2015/10/15/video-engineering/under-the-hood-building-360-video/. Retrieved 2026-10-06.
  6. ↑ 6.0 6.1 "The OpenXR Specification, section XR_KHR_composition_layer_cube". Khronos OpenXR Registry. The Khronos Group. https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XR_KHR_composition_layer_cube. Retrieved 2026-10-06.
  7. ↑ 7.0 7.1 "AREnvironmentProbeAnchor". Apple Developer Documentation. Apple. https://developer.apple.com/documentation/arkit/arenvironmentprobeanchor. Retrieved 2026-10-06.
  8. ↑ 8.0 8.1 8.2 Sim Dietrich. "Cube Maps". NVIDIA Developer. NVIDIA Corporation. https://developer.download.nvidia.com/assets/gamedev/docs/GDC2K_Cube_Maps.pdf. Retrieved 2026-10-06.
  9. ↑ "ARB_seamless_cube_map". Khronos OpenGL Registry. The Khronos Group. 2009-07-21. https://registry.khronos.org/OpenGL/extensions/ARB/ARB_seamless_cube_map.txt. Retrieved 2026-10-06.
  10. ↑ "The OpenGL Graphics System: A Specification (Version 3.2 Core Profile)". Khronos OpenGL Registry. The Khronos Group. https://registry.khronos.org/OpenGL/specs/gl/glspec32.core.pdf. Retrieved 2026-10-06.
  11. ↑ 11.0 11.1 Chip Brown (2017-03-14). "Bringing pixels front and center in VR video". The Keyword (Google blog). Google. https://blog.google/products/google-vr/bringing-pixels-front-and-center-vr-video/. Retrieved 2026-10-06.
  12. ↑ 12.0 12.1 Shannon Chen, Evgeny Kuzyakov, Renbin Peng (2017-04-19). "Enhancing high-resolution 360 streaming with view prediction". Engineering at Meta. Facebook. https://engineering.fb.com/2017/04/19/virtual-reality/enhancing-high-resolution-360-streaming-with-view-prediction/. Retrieved 2026-10-06.
  13. ↑ James F. Blinn, Martin E. Newell (1976-10). "Texture and reflection in computer generated images". Communications of the ACM, vol. 19, no. 10, pp. 542-547. doi:10.1145/360349.360353. https://doi.org/10.1145/360349.360353. Retrieved 2026-10-06.
  14. ↑ 14.0 14.1 Paul Debevec. "Reflection Mapping History". pauldebevec.com. https://www.pauldebevec.com/ReflectionMapping/. Retrieved 2026-10-06.
  15. ↑ Marc Prieur (1999-08-31). "Cube Environment Map - Preview: nVidia GeForce 256". HardWare.fr. https://www.hardware.fr/articles/53-8/cube-environment-map.html. Retrieved 2026-10-06.
  16. ↑ "ARB_texture_cube_map". Khronos OpenGL Registry. The Khronos Group. 1999-12-14. https://registry.khronos.org/OpenGL/extensions/ARB/ARB_texture_cube_map.txt. Retrieved 2026-10-06.
  17. ↑ "Cubic QuickTime VR Movies". Apple Developer Documentation Archive. Apple. https://developer.apple.com/library/archive/documentation/QuickTime/InsideQT_QTVR/5Chap/5-QTVR-Movie-Controller.html. Retrieved 2026-10-06.
  18. ↑ 18.0 18.1 Homin Lee, Chetan Gupta (2017-04-19). "Announcing 360 Capture SDK". Engineering at Meta. Facebook. https://engineering.fb.com/developer-tools/announcing-360-capture-sdk/. Retrieved 2026-10-06.
  19. ↑ Mariella Moon (2015-10-15). "Facebook explains the tech behind its 360-degree videos". Engadget. https://www.engadget.com/2015-10-15-facebook-360-degree-video-tech.html. Retrieved 2026-10-06.
  20. ↑ Evgeny Kuzyakov, David Pio (2016-01-21). "Next-generation video encoding techniques for 360 video and VR". Engineering at Meta. Facebook. https://engineering.fb.com/2016/01/21/virtual-reality/next-generation-video-encoding-techniques-for-360-video-and-vr/. Retrieved 2026-10-06.
  21. ↑ "transform360". GitHub. Facebook. https://github.com/facebook/transform360. Retrieved 2026-10-06.
  22. ↑ Evgeny Kuzyakov (2017-02-22). "End-to-end optimizations for dynamic streaming". Engineering at Meta. Facebook. https://engineering.fb.com/2017/02/22/virtual-reality/end-to-end-optimizations-for-dynamic-streaming/. Retrieved 2026-10-06.
  23. ↑ 23.0 23.1 Chao Zhou, Zhenhua Li, Yao Liu (2017-06). "A Measurement Study of Oculus 360 Degree Video Streaming". Proceedings of the 8th ACM Multimedia Systems Conference (MMSys '17), pp. 27-37. doi:10.1145/3083187.3083190. https://doi.org/10.1145/3083187.3083190. Retrieved 2026-10-06.
  24. ↑ Jordan Kahn (2017-03-14). "YouTube details improvements & new industry standard for VR on Android, coming soon to iOS & desktop". 9to5Google. https://9to5google.com/2017/03/14/youtube-daydream-vr-projections-android-ios-desktop/. Retrieved 2026-10-06.
  25. ↑ "Spherical Video V2 RFC". google/spatial-media (GitHub). Google. https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md. Retrieved 2026-10-06.
  26. ↑ "ISO/IEC 23090-2:2019 Information technology - Coded representation of immersive media - Part 2: Omnidirectional media format (preview)". Swedish Institute for Standards (SIS). ISO/IEC. 2019-01. https://www.sis.se/api/document/preview/80009384/. Retrieved 2026-10-06.
  27. ↑ Miska M. Hannuksela, Ye-Kui Wang (2021-09). "An Overview of Omnidirectional MediA Format (OMAF)". Proceedings of the IEEE, vol. 109, no. 9, pp. 1590-1606. doi:10.1109/JPROC.2021.3063544. https://doi.org/10.1109/JPROC.2021.3063544. Retrieved 2026-10-06.
  28. ↑ "FFmpeg Filters Documentation: v360". FFmpeg. https://ffmpeg.org/ffmpeg-filters.html#v360. Retrieved 2026-10-06.
  29. ↑ "Use VR Compositor Layers". Meta Horizon OS Developers. Meta. https://developers.meta.com/horizon/documentation/unity/unity-ovroverlay/. Retrieved 2026-10-06.
  30. ↑ "Composition layers (XR Composition Layers 2.4.0)". Unity Documentation. Unity Technologies. https://docs.unity3d.com/Packages/[email protected]/manual/overview.html. Retrieved 2026-10-06.
  31. ↑ "Get the lighting right (Lighting estimation)". ARCore Developer Documentation. Google. https://developers.google.com/ar/develop/lighting-estimation. Retrieved 2026-10-06.
  32. ↑ Xavier Corbillon, Gwendal Simon, Alisa Devlic, Jacob Chakareski (2017-05). "Viewport-adaptive navigable 360-degree video delivery". 2017 IEEE International Conference on Communications (ICC). doi:10.1109/ICC.2017.7996611. https://arxiv.org/abs/1609.08042. Retrieved 2026-10-06.
  33. ↑ Hsien-Tzu Cheng, Chun-Hung Chao, Jin-Dong Dong, Hao-Kai Wen, Tyng-Luh Liu, Min Sun (2018-06). "Cube Padding for Weakly-Supervised Saliency Prediction in 360 Videos". 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1420-1429. doi:10.1109/CVPR.2018.00154. https://arxiv.org/abs/1806.01320. Retrieved 2026-10-06.