Reflection mapping
Encyclopedia
In computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

, environment mapping, or reflection mapping, is an efficient Image-based lighting technique for approximating the appearance of a reflective surface by means of a precomputed texture image. The texture is used to store the image of the distant environment surrounding the rendered object.

Several ways of storing the surrounding environment are employed. The first technique was sphere mapping
Sphere mapping
In computer graphics, sphere mapping is a type of reflection mapping that approximates reflective surfaces by considering the environment to be an infinitely far-away spherical wall...

, in which a single texture contains the image of the surroundings as reflected on a mirror ball. It has been almost entirely surpassed by cube mapping
Cube mapping
In computer graphics, cube mapping is a method of environment mapping that uses a six-sided cube as the map shape. The environment is projected onto the six faces of a cube and stored as six square textures, or unfolded into six regions of a single texture...

, in which the environment is projected onto the six faces of a cube and stored as six square textures or unfolded into six square regions of a single texture. Other projections that have some superior mathematical or computational properties include the paraboloid mapping, the pyramid mapping, the octahedron mapping, and the HEALPix mapping
HEALPix
HEALPix , an acronym for Hierarchical Equal Area isoLatitude Pixelisation of a 2-sphere, can refer to either an algorithm for pixelisation of the 2-sphere, an associated software package, or an associated class of map projections.The HEALPix projection is a general class of spherical projections,...

.

The reflection mapping approach is more efficient than the classical ray tracing approach of computing the exact reflection by tracing a ray and following its optical path. The reflection color used in the shading computation at a pixel is determined by calculating the reflection vector at the point on the object and mapping it to the texel
Texel (graphics)
A texel, or texture element is the fundamental unit of texture space, used in computer graphics. Textures are represented by arrays of texels, just as pictures are represented by arrays of pixels....

 in the environment map. This technique often produces results that are superficially similar to those generated by raytracing, but is less computationally expensive since the radiance value of the reflection comes from calculating the angles of incidence and reflection
Reflection (physics)
Reflection is the change in direction of a wavefront at an interface between two differentmedia so that the wavefront returns into the medium from which it originated. Common examples include the reflection of light, sound and water waves...

, followed by a texture lookup, rather than followed by tracing a ray against the scene geometry and computing the radiance of the ray, simplifying the GPU workload.

However in most circumstances a mapped reflection is only an approximation of the real reflection. Environment mapping relies on two assumptions that are seldom satisfied:

1) All radiance incident upon the object being shaded comes from an infinite distance. When this is not the case the reflection of nearby geometry appears in the wrong place on the reflected object. When this is the case, no parallax
Parallax
Parallax is a displacement or difference in the apparent position of an object viewed along two different lines of sight, and is measured by the angle or semi-angle of inclination between those two lines. The term is derived from the Greek παράλλαξις , meaning "alteration"...

 is seen in the reflection.

2) The object being shaded is convex, such that it contains no self-interreflections. When this is not the case the object does not appear in the reflection; only the environment does.

Reflection mapping is also a traditional Image-based lighting technique for creating reflections of real-world backgrounds on synthetic objects.

Environment mapping is generally the fastest method of rendering a reflective surface. To further increase the speed of rendering, the renderer may calculate the position of the reflected ray at each vertex. Then, the position is interpolated across polygons to which the vertex is attached. This eliminates the need for recalculating every pixel's reflection direction.

If normal mapping
Normal mapping
In 3D computer graphics, normal mapping, or "Dot3 bump mapping", is a technique used for faking the lighting of bumps and dents. It is used to add details without using more polygons. A common use of this technique is to greatly enhance the appearance and details of a low polygon model by...

 is used, each polygon has many face normals (the direction a given point on a polygon is facing), which can be used in tandem with an environment map to produce a more realistic reflection. In this case, the angle of reflection at a given point on a polygon will take the normal map into consideration. This technique is used to make an otherwise flat surface appear textured, for example corrugated metal, or brushed
Brushed metal
Brushed metal is metal that has been abraded , usually with a fine grit sandpaper. The brushing gives the metal a distinctive look, as it retains some but not all of its metallic lustre and is given a pattern of very fine lines. It can be compared to metal with several small scratches all running...

 aluminium.

Sphere mapping

Sphere mapping
Sphere mapping
In computer graphics, sphere mapping is a type of reflection mapping that approximates reflective surfaces by considering the environment to be an infinitely far-away spherical wall...

represents the sphere
Sphere
A sphere is a perfectly round geometrical object in three-dimensional space, such as the shape of a round ball. Like a circle in two dimensions, a perfect sphere is completely symmetrical around its center, with all points on the surface lying the same distance r from the center point...

 of incident illumination as though it were seen in the reflection of a reflective sphere through an orthographic
Orthographic
Orthographic may refer to:* Orthographic projection** Orthographic projection ** Orthographic projection * Orthography...

 camera. The texture image can be created by approximating this ideal setup, or using a fisheye lens
Fisheye lens
In photography, a fisheye lens is a wide-angle lens that takes in a broad, panoramic and hemispherical image. Originally developed for use in meteorology to study cloud formation and called "whole-sky lenses", fisheye lenses quickly became popular in general photography for their unique, distorted...

 or via prerendering a scene with a spherical mapping.

The spherical mapping suffers from limitations that detract from the realism of resulting renderings. Because spherical maps are stored as azimuthal projections of the environments they represent, an abrupt point of singularity (a “black hole
Black hole
A black hole is a region of spacetime from which nothing, not even light, can escape. The theory of general relativity predicts that a sufficiently compact mass will deform spacetime to form a black hole. Around a black hole there is a mathematically defined surface called an event horizon that...

” effect) is visible in the reflection on the object where texel colors at or near the edge of the map are distorted due to inadequate resolution to represent the points accurately. The spherical mapping also wastes pixels that are in the square but not in the sphere.

The artifacts of the spherical mapping are so severe that it is effective only for viewpoints near that of the virtual orthographic camera.

Cube mapping

Cube mapping
Cube mapping
In computer graphics, cube mapping is a method of environment mapping that uses a six-sided cube as the map shape. The environment is projected onto the six faces of a cube and stored as six square textures, or unfolded into six regions of a single texture...

and other polyhedron mappings address the severe distortion of sphere maps. If cube maps are made and filtered correctly, they have no visible seams, and can be used independent of the viewpoint of the often-virtual camera acquiring the map. Cube and other polyhedron maps have since superseded sphere maps in most computer graphics applications, with the exception of acquiring image-based lighting
Image based lighting
Image-based lighting is a 3D rendering technique which involves plotting an image onto a dome or sphere that contains the primary subject. The lighting characteristics of the surrounding surface are then taken into account when rendering the scene, using the modeling techniques of global...

.

Generally, cube mapping uses the same skybox
Skybox (video games)
A skybox is a method of creating backgrounds to make a computer and video games level look bigger than it really is. When a skybox is used, the level is enclosed in a cuboid; and the sky, distant mountains, distant buildings, and other unreachable objects are projected onto the cube's faces , thus...

 that is used in outdoor renderings. Cube mapped reflection is done by determining the vector that the object is being viewed at. This camera ray is reflected about the surface normal
Surface normal
A surface normal, or simply normal, to a flat surface is a vector that is perpendicular to that surface. A normal to a non-flat surface at a point P on the surface is a vector perpendicular to the tangent plane to that surface at P. The word "normal" is also used as an adjective: a line normal to a...

 of where the camera vector intersects the object. This results in the reflected ray which is then passed to the cube map to get the texel
Texel (graphics)
A texel, or texture element is the fundamental unit of texture space, used in computer graphics. Textures are represented by arrays of texels, just as pictures are represented by arrays of pixels....

 which provides the radiance value used in the lighting calculation. This creates the effect that the object is reflective.

HEALPix mapping

HEALPix
HEALPix
HEALPix , an acronym for Hierarchical Equal Area isoLatitude Pixelisation of a 2-sphere, can refer to either an algorithm for pixelisation of the 2-sphere, an associated software package, or an associated class of map projections.The HEALPix projection is a general class of spherical projections,...

 environment mapping is similar to the other polyhedron mappings, but can be hierarchical, thus providing a unified framework for generating polyhedra that better approximate the sphere. This allows lower distortion at the cost of increased computation.

History

Precursor work in texture mapping had been established by Edwin Catmull
Edwin Catmull
Dr. Edwin Earl Catmull, Ph.D. is a computer scientist and current president of Walt Disney Animation Studios and Pixar Animation Studios. As a computer scientist, Catmull has contributed to many important developments in computer graphics....

, with refinements for curved surfaces by James Blinn, in 1974. http://www.comphist.org/computing_history/new_page_6.htm Blinn went on to further refine his work, developing environment mapping by 1976. http://www.debevec.org/ReflectionMapping/

Gene Miller
Gene Miller
Gene Miller was a longtime investigative reporter at The Miami Herald who won two Pulitzer Prizes for reporting that helped save innocent men on Florida's Death Row from execution. He was also a legendary editor, mentoring generations of young reporters in how to write crisp, direct, and...

 experimented with spherical environment mapping in 1982 at MAGI Synthavision.

Wolfgang Heidrich introduced Paraboloid Mapping in 1998.

Emil Praun introduced Octahedron Mapping in 2003 .

Mauro Steigleder introduced Pyramid Mapping in 2005 .

Tien-Tsin Wong, et al. introduced the existing HEALPix
HEALPix
HEALPix , an acronym for Hierarchical Equal Area isoLatitude Pixelisation of a 2-sphere, can refer to either an algorithm for pixelisation of the 2-sphere, an associated software package, or an associated class of map projections.The HEALPix projection is a general class of spherical projections,...

 mapping for rendering in 2006.

External links

  • The Story of Reflection mapping by Paul Debevec
    Paul Debevec
    Paul Debevec is a researcher in computer graphics at the University of Southern California's Institute for Creative Technologies. He is best known for his pioneering work in high dynamic range imaging and image-based modelling and rendering....

  • NVIDIA's paper about sphere & cube env. mapping
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK