Reflection in computer graphics is used to emulate reflective objects like mirrors and shiny surfaces. Accurate reflections can be accomplished e.g. by a ray trace renderer by following a ray from the eye to the mirror and then calculating where it bounces from, and continuing the process until no surface is found, or a non-reflective surface is found. Approximate reflections can usually be computed faster by using methods such as environment mapping. Reflection on a shiny surface like wood or tile can add to the photorealistic effects of a 3D rendering.
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, 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 and require a different rendering approach from typically used rasterization. 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. 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 surfaces are more challenging for real time rendering. Main approaches that are used include:
Environment 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 prerendering of the environment map. The precision can be increased by using a spatial array of environment maps instead of just one.
Screen space reflections : a more expensive technique that traces reflection rays in screen space. This is done for each rendered pixel of the reflected surface, using the surface normal and scene depth. The disadvantage is that objects not captured in the rendered frame cannot appear in the reflections, which results in unresolved intersections and incomplete reflection image.
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. Sometimes the term is used as a synonym for "blurred reflection". Glossy used in this context means that the reflection is actually blurred.
Normal 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.
The wet floor effect is a graphic effects technique popular in conjunction with Web 2.0 style pages, particularly in logos. 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, the wet floor effect involves a gradient and often a slant in the reflection, so that the mirrored image appears to be hovering over or resting on a wet floor.