Reflection mapping
From Wikipedia, the free encyclopedia
In computer graphics, reflection mapping is an efficient method of simulating a complex mirroring surface by means of a precomputed texture image. The texture is used to store the image of the environment surrounding the rendered object. There are several ways of storing the surrounding environment; the most common ones are the Spherical Environment Mapping in which a single texture contains the image of the surrounding as reflected on a mirror ball, or the Cubic Environment Mapping in which the environment is unfolded onto the six faces of a cube and stored therefore as six square textures.
This kind of approach is more efficient than the classical ray tracing approach of computing the exact reflection by shooting a ray and following its optically exact path, but it should be noted that these are (sometimes crude) approximations of the real reflection. Another important advantage is that it's the only way to create reflections of real-world backgrounds in synthetic objects. A typical drawback of this technique is the absence of self reflections: you cannot see any part of the reflected object inside the reflection itself.
Contents |
[edit] Types of Reflection Mapping
[edit] Spherical Environment Mapping
Spherical environment mapping (sometimes known as standard environment mapping) involves the use of a textured hollow sphere whose inside surface has no parallax in relation the object that reflects it (i.e. every point on the surface of the object reflects the same spherical data). A spherical texture is created, using a fisheye lens or via prerendering a preexisting virtual scene, and is mapped onto the sphere. Pixel colors in the final rendering pass are determined by calculating the reflection vectors from the points on the object to the texels in the environment map. This technique often produces results which are superficially similar to those generated by raytracing, but is less computationally expensive due to the colors of the points to be referenced being known beforehand, simplifying the GPU workload down to calculating the angles of incidence and reflection.
There are limitations to spherical mapping that detract from their realism. Due to the fact that spherical maps are stored as azimuthal projections of the environments they represent, there is an abrupt point of singularity (a “black hole” effect) 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. Cube mapping was developed to address this issue. If cube maps are made and filtered correctly, they have no visible seams (see below for detailed explanation). They have since superseded sphere maps in many contemporary graphical applications, namely realtime rendering.
[edit] Cube Environment Mapping
Cube mapped reflection is a technique that uses cube mapping to make objects look like they reflect the environment around them. Generally, this is done with the same skybox that is used in outdoor renderings. Although this is not a true reflection since objects around the reflective one will not be seen in the reflection, the desired effect is usually achieved.
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 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 the camera then sees as if it is on the surface of the object. This creates the effect that the object is reflective.
[edit] HEALPix Environment Mapping
HEALPix environment mapping, is a technique basically like cube mapping, but it uses a HEALPix map because it preserves better details than a cube map does[1].
[edit] History
Precursor work in texture mapping had been established by Edwin Catmull, with refinements for curved surfaces by James Blinn, in 1974. [1] Blinn went on to further refine his work, developing environment mapping by 1976. [2]
Gene Miller experimented with spherical environment mapping in 1982 at MAGI Synthavision. [3] With the assistance of Christine Chang, he photographed a Christmas ornament in the parking lot at MAGI. By cropping the photo of the ball down to its diameter, he was able to map it to a hollow sphere (see the process above) (Fig. 1). Next, he applied it to a blobby dog model created by Ken Perlin (Fig. 2), and superimposed the environment-mapped model into a photograph of the parking lot. The result can be seen in Fig. 3. This technique of environment mapping real-world environments eventually came to use in HDRI image-based lighting (see here).
Tien-Tsin Wong, Liang Wan, Chi-Sing Leung, and Ping-Man Lam of the Chinese University of Hong Kong experimented with HEALPix environment mapping[1].
[edit] Application in Real-Time 3D Graphics
[edit] Standard Environment Mapping
[edit] Cubic Environment Mapping
Cube mapped reflection, when used correctly, may be the fastest method of rendering a reflective surface. To increase the speed of rendering, each vertex calculates the position of the reflected ray. Then, the position is interpolated across polygons to which the vertex is attached. This eliminates the need for recalculating every pixel's reflection.
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
[edit] HEALPix Environment Mapping
HEALPix mapped reflection, like cube mapping, is the fastest method of rendering a reflective surface when used correctly.[citation needed]
[edit] See also
[edit] References
- ^ a b Tien-Tsin Wong, Liang Wan, Chi-Sing Leung, and Ping-Man Lam. [http://appsrv.cse.cuhk.edu.hk/~lwan/paper/sphquadmap/sphquadmap.htm Real-time Environment Mapping with Equal Solid-Angle Spherical Quad-Map], Shader X4: Lighting & Rendering, Charles River Media, 2006
[edit] External links
- The Story of Reflection mapping cured by Paul Debevec
- NVIDIA's paper about sphere & cube env. mapping

