Environment mapping

from Wikipedia, the free encyclopedia
Example of a reflective 3-dimensional object. The simulated mirroring is achieved with cubic environment mapping.

Environment mapping or reflection mapping is an efficient method to simulate and render reflective surfaces in (3D) computer graphics. Here, the surroundings of the reflecting object as a texture stored and displayed on the surface of the object ( mapping ). The most common ways of storing the surrounding texture are spherical and cubic environment mapping. With the former, the texture that represents the environment is mapped onto the inside of a sphere, while with the latter, the environment is "unfolded" onto the six sides of a cube. The advantage of environment mapping compared to ray tracing is the simpler and therefore faster calculation of the simulated reflections. The major disadvantage of this technique is that the environment to be mirrored has to be known before the object is rendered, so changing environments or self-reflections are not easy to implement.

Environment mapping can also be used to represent transparent volumes with a refractive index .

Spherical environment mapping

With spherical environment mapping (sometimes also referred to as standard environment mapping ), the environment is mapped onto the inside of a hollow sphere. The inner surface of the sphere is projected onto a 2D texture . Spherical textures are created with the help of a (virtual) fisheye lens or by rendering an existing virtual scene beforehand. The reflections, or the colors of the individual pixels on the object, are determined by calculating which point of the texture the reflection vector points to. Compared to ray tracing, this operation can be calculated a lot faster because the texture to be mapped and therefore all colors used are already available. Since the sphere consists of curved surfaces that are projected (stretched) onto a straight 2D image, distortions can occur at the edge of the texture, which look unattractive from certain angles. To eliminate this fact, the cubic environment mapping was developed.

Cubic environment mapping

How cubic environment mapping works. With the help of the vertex normal, it is calculated to which point of the surrounding texture the line of sight is forwarded.

Cubic environment mapping works in the same way as spherical environment mapping, except that the environment is mapped onto a cube (analogous to a skybox ). Because the surroundings can be projected as straight surfaces, there are no distortions.

Web links

Wikibooks: Blender Documentation: Environment Maps  - Learning and teaching materials