Reflection 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. ...
is used to render
reflective
Reflection is the change in direction of a wavefront at an interface between two different media so that the wavefront returns into the medium from which it originated. Common examples include the reflection of light, sound and water waves. The ...
objects like
mirror
A mirror, also known as a looking glass, is an object that Reflection (physics), reflects an image. Light that bounces off a mirror forms an image of whatever is in front of it, which is then focused through the lens of the eye or a camera ...
s and shiny surfaces.
Accurate reflections are commonly computed using
ray tracing whereas approximate reflections can usually be computed faster by using simpler methods such as
environment mapping. Reflections on shiny surfaces like wood or tile can add to the photorealistic effects of a
3D rendering
3D rendering is the 3D computer graphics process of converting 3D models into 2D images on a computer. 3D renders may include photorealistic effects or non-photorealistic styles.
Rendering methods
Rendering is the final process of creati ...
.
Approaches to reflection rendering

For rendering environment reflections there exist many techniques that differ in precision, computational and implementation complexity. Combination of these techniques are also possible.
Image order rendering algorithms based on tracing rays of light, such as
ray tracing or
path tracing
Path tracing is a rendering algorithm in computer graphics that Simulation, simulates how light interacts with Physical object, objects, voxels, and Volumetric_path_tracing, participating media to generate realistic (''physically plausible'') R ...
, typically compute accurate reflections on general surfaces, including multiple reflections and self reflections. However these algorithms are generally still too computationally expensive for real time rendering (even though specialized HW exists, such as
Nvidia RTX
Nvidia RTX (also known as Nvidia GeForce RTX under the GeForce brand) is a professional visual computing platform created by Nvidia, used in mainstream PCs for gaming as well as being used in workstations for designing complex large-scale model ...
) and require a different rendering approach from typically used
rasterization
In computer graphics, rasterisation (British English) or rasterization (American English) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image (a series of pixels, dots or lines, whic ...
.
Reflections on planar surfaces, such as planar mirrors or water surfaces, can be computed simply and accurately in real time with two pass rendering — one for the viewer, one for the view in the mirror, usually with the help of
stencil buffer
A stencil buffer is an extra data buffer, in addition to the ''color buffer'' and '' Z-buffer'', found on modern graphics hardware. The buffer is per pixel and works on integer values, usually with a depth of one byte per pixel. The Z-buffe ...
. Some older video games used a trick to achieve this effect with one pass rendering by putting the whole mirrored scene behind a transparent plane representing the mirror.
Reflections on non-planar (curved) surfaces are more challenging for real time rendering. Main approaches that are used include:
*
Environment mapping (e.g.
cube mapping): a technique that has been widely used e.g. in video games, offering reflection approximation that's mostly sufficient to the eye, but lacking self-reflections and requiring pre-rendering of the environment map.
The precision can be increased by using a spatial array of environment maps instead of just one. It is also possible to generate cube map reflections in real time, at the cost of memory and computational requirements.
*Screen space reflections (SSR): a more expensive technique that traces rays come from pixel data.This requires the data of surface normal and either depth buffer(local space) or position buffer(world space).The disadvantage is that objects not captured in the rendered frame cannot appear in the reflections,which results in unresolved and or false intersections causing artefacts such as reflection vanishment and virtual image. SSR was originally introduced as Real Time Local Reflections in
CryENGINE 3
CryEngine (stylized as CRYENGINE) is a game engine designed by the German game developer Crytek. It has been used in all of their titles with the initial version being used in '' Far Cry'', and continues to be updated to support new consoles and ...
.
Types of reflection
;Polished
- A polished reflection is an undisturbed reflection, like a mirror or chrome surface.
;Blurry
- A blurry reflection means that tiny random bumps on the surface of the material causes the reflection to be blurry.
;Metallic
- A reflection is metallic if the highlights and reflections retain the color of the reflective object.
;Glossy
- This term can be misused: sometimes, it is a setting which is the opposite of blurry (e.g. when "glossiness" has a low value, the reflection is blurry). Sometimes the term is used as a synonym for "blurred reflection". Glossy used in this context means that the reflection is actually blurred.
Polished or mirror reflection
Mirrors are usually almost 100% reflective.
Metallic reflection
Normal (nonmetallic) objects reflect light and colors in the original color of the object being reflected.
Metallic objects reflect lights and colors altered by the color of the metallic object itself.
Blurry reflection
Many materials are imperfect reflectors, where the reflections are blurred to various
degrees due to surface roughness that scatters the rays of the reflections.
Glossy reflection
Fully glossy reflection, shows highlights from light sources, but does not show a clear reflection from objects.
Examples of reflections
Wet floor reflections
The ''wet floor effect''
is a
graphic
Graphics () are visual images or designs on some surface, such as a wall, canvas, screen, paper, or stone, to inform, illustrate, or entertain. In contemporary usage, it includes a pictorial representation of the data, as in design and manufa ...
effect
Effect may refer to:
* A result or change of something
** List of effects
** Cause and effect, an idiom describing causality
Pharmacy and pharmacology
* Drug effect, a change resulting from the administration of a drug
** Therapeutic effect, ...
s technique popular in conjunction with
Web 2.0
Web 2.0 (also known as participative (or participatory) web and social web) refers to websites that emphasize user-generated content, ease of use, participatory culture, and interoperability (i.e., compatibility with other products, systems, a ...
style pages, particularly in
logo
A logo (abbreviation of logotype; ) is a graphic mark, emblem, or symbol used to aid and promote public identification and recognition. It may be of an abstract or figurative design or include the text of the name that it represents, as in ...
s. The effect can be done manually or created with an auxiliary tool which can be installed to create the effect automatically. Unlike a standard computer reflection (and the
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
water effect popular in first-generation web
graphics
Graphics () are visual images or designs on some surface, such as a wall, canvas, screen, paper, or stone, to inform, illustrate, or entertain. In contemporary usage, it includes a pictorial representation of the data, as in design and manufa ...
), the wet floor effect involves a
gradient
In vector calculus, the gradient of a scalar-valued differentiable function f of several variables is the vector field (or vector-valued function) \nabla f whose value at a point p gives the direction and the rate of fastest increase. The g ...
and often a slant in the reflection, so that the mirrored image appears to be
hovering over or resting on a wet floor.
See also
*
Illumination model
*
Lambertian reflectance
Lambertian reflectance is the property that defines an ideal "matte" or diffusely reflecting surface. The apparent brightness of a Lambertian surface to an observer is the same regardless of the observer's angle of view. More precisely, the ref ...
*
Ray tracing
*
Reflection mapping
In computer graphics, 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 o ...
*
Rendering (computer graphics)
Rendering is the process of generating a physically-based rendering, photorealistic or Non-photorealistic rendering, non-photorealistic image from input data such as 3D models. The word "rendering" (in one of its senses) originally meant the ...
*
Specular reflection
Specular reflection, or regular reflection, is the mirror-like reflection (physics), reflection of waves, such as light, from a surface.
The law of reflection states that a reflected ray (optics), ray of light emerges from the reflecting surf ...
(optics)
References
{{Computer graphics
Computer graphics
3D computer graphics
Computer graphic techniques