HOME

TheInfoList



OR:

In
computer graphics Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
, reflection mapping or environment mapping is an efficient image-based lighting technique for approximating the appearance of a reflective surface by means of a precomputed texture. The texture is used to store the
image An image or picture is a visual representation. An image can be Two-dimensional space, two-dimensional, such as a drawing, painting, or photograph, or Three-dimensional space, three-dimensional, such as a carving or sculpture. Images may be di ...
of the distant environment surrounding the rendered object. Several ways of storing the surrounding environment have been employed. The first technique was sphere mapping, in which a single texture contains the image of the surroundings as reflected on a spherical mirror. It has been almost entirely surpassed by cube mapping, 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 In geometry, a paraboloid is a quadric surface that has exactly one axial symmetry, axis of symmetry and no central symmetry, center of symmetry. The term "paraboloid" is derived from parabola, which refers to a conic section that has a similar p ...
mapping, the
pyramid A pyramid () is a structure whose visible surfaces are triangular in broad outline and converge toward the top, making the appearance roughly a pyramid in the geometric sense. The base of a pyramid can be of any polygon shape, such as trian ...
mapping, the
octahedron In geometry, an octahedron (: octahedra or octahedrons) is any polyhedron with eight faces. One special case is the regular octahedron, a Platonic solid composed of eight equilateral triangles, four of which meet at each vertex. Many types of i ...
mapping, and the HEALPix mapping. Reflection mapping is one of several approaches to reflection rendering, alongside e.g. screen space reflections or ray tracing which computes the exact reflection by tracing a ray of light and following its optical path. The reflection color used in the shading computation at a
pixel In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a Raster graphics, raster image, or the smallest addressable element in a dot matrix display device. In most digital display devices, p ...
is determined by calculating the reflection vector at the point on the object and mapping it to the texel 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, 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: # 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 is a displacement or difference in the apparent position of an object viewed along two different sightline, lines of sight and is measured by the angle or half-angle of inclination between those two lines. Due to perspective (graphica ...
is seen in the reflection. # The object being shaded is
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 polytop ...
, 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. 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 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 aluminium.


Types


Sphere mapping

Sphere mapping represents the
sphere A sphere (from Ancient Greek, Greek , ) is a surface (mathematics), surface analogous to the circle, a curve. In solid geometry, a sphere is the Locus (mathematics), set of points that are all at the same distance from a given point in three ...
of incident illumination as though it were seen in the reflection of a reflective sphere through an orthographic camera. The texture image can be created by approximating this ideal setup, or using a
fisheye lens A fisheye lens is an ultra wide angle lens, ultra wide-angle lens that produces strong Distortion (optics), visual distortion intended to create a wide panorama, panoramic or Sphere#Hemisphere, hemispherical image. Fisheye lenses achieve extremel ...
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 A black hole is a massive, compact astronomical object so dense that its gravity prevents anything from escaping, even light. Albert Einstein's theory of general relativity predicts that a sufficiently compact mass will form a black hole. Th ...
" 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 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 can be done with parallax-corrected cube maps. Generally, cube mapping uses the same skybox that is used in outdoor renderings. Cube-mapped reflection is done by determining the
vector Vector most often refers to: * Euclidean vector, a quantity with a magnitude and a direction * Disease vector, an agent that carries and transmits an infectious pathogen into another living organism Vector may also refer to: Mathematics a ...
that the object is being viewed at. This ''camera ray'' is reflected about the
surface normal In geometry, a normal is an object (e.g. a line, ray, or vector) that is perpendicular to a given object. For example, the normal line to a plane curve at a given point is the infinite straight line perpendicular to the tangent line to the ...
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 which provides the radiance value used in the lighting calculation. This creates the effect that the object is reflective.


HEALPix mapping

HEALPix 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.Tien-Tsin Wong, Liang Wan, Chi-Sing Leung, and Ping-Man Lam
Real-time Environment Mapping with Equal Solid-Angle Spherical Quad-Map
, Shader X4: Lighting & Rendering, Charles River Media, 2006.


History

In 1974,
Edwin Catmull Edwin Earl Catmull (born March 31, 1945) is an American computer scientist and animator who served as the co-founder of Pixar and the President of Walt Disney Animation Studios. He has been honored for his contributions to 3D computer graphics, ...
created an algorithm for "rendering images of bivariate surface patches" which worked directly with their mathematical definition. Further refinements were researched and documented by Bui-Tuong Phong in 1975, and later James Blinn and Martin Newell, who developed environment mapping in 1976; these developments which refined Catmull's original algorithms led them to conclude that "these generalizations result in improved techniques for generating patterns and texture". Gene Miller experimented with spherical environment mapping in 1982 at
MAGI Magi (), or magus (), is the term for priests in Zoroastrianism and earlier Iranian religions. The earliest known use of the word ''magi'' is in the trilingual inscription written by Darius the Great, known as the Behistun Inscription. Old Per ...
. Wolfgang Heidrich introduced Paraboloid Mapping in 1998. Emil Praun introduced Octahedron Mapping in 2003. Mauro Steigleder introduced Pyramid Mapping in 2005.Mauro Steigleder. "Pencil Light Transport". A thesis presented to the University of Waterloo, 2005. Tien-Tsin Wong, et al. introduced the existing HEALPix mapping for rendering in 2006.


See also

* Skybox (video games)


References


External links


The Story of Reflection mapping
by Paul Debevec
NVIDIA's paper
Cube Environment Mapping * {{DEFAULTSORT:Reflection Mapping 3D rendering Demo effects