ArticleslgStudy

computer science

Reflection (computer graphics)

Reflection (computer graphics) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Reflection (computer graphics) rather than just read about it. In short: Reflection in computer graphics is used to render reflective objects like mirrors 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.

Reflection (computer graphics) — main illustration
Reflection (computer graphics) — illustration

Key takeaways

  • Reflection (computer graphics) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Reflection (computer graphics) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Reflection (computer graphics) from memory before moving on to harder problems.

Reference excerpt

Reflection in computer graphics is used to render reflective objects like mirrors 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.

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 (even though specialized hardware exists, such as Nvidia RTX) 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 (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.

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, or microfacets, 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. In physically based rendering, metals are treated as conductors: light not reflected at the surface is rapidly absorbed, so metallic specular reflection is typically tinted by the metal and has little or no diffuse component, whereas non-metallic specular reflection is usually untinted.

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 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 (and the Java water effect popular in first-generation web graphics), 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.

See also Illumination model Lambertian reflectance Phong_reflection_model Ray tracing Reflection mapping Rendering (computer graphics) Specular reflection (optics) Specular highlight

References

Illustrations

Reflection (computer graphics): Ray-traced model demonstrating specular reflection
Ray-traced model demonstrating specular reflection
Reflection (computer graphics): Comparison of accurate reflections computed with path tracing (left), approximate reflections with environment mapping (middle), and screen space reflections (right)
Comparison of accurate reflections computed with path tracing (left), approximate reflections with environment mapping (middle), and screen space reflections (right)
Reflection (computer graphics): Mirror on wall rendered with 100% reflection
Mirror on wall rendered with 100% reflection
Reflection (computer graphics): The large sphere on the left is blue with its reflection marked as metallic. The large sphere on the right is the same color but does not have the metallic property selected.
The large sphere on the left is blue with its reflection marked as metallic. The large sphere on the right is the same color but does not have the metallic property selected.
Reflection (computer graphics): The large sphere on the left has sharpness set to 100%. The sphere on the right has sharpness set to 50% which creates a blurry reflection.
The large sphere on the left has sharpness set to 100%. The sphere on the right has sharpness set to 50% which creates a blurry reflection.

Worked examples

Example 1 — a first encounter with Reflection (computer graphics)

Start with the simplest possible case. Write down what Reflection (computer graphics) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Reflection (computer graphics) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Reflection (computer graphics) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Reflection (computer graphics)

In research
Reflection (computer graphics) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Reflection (computer graphics) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Reflection (computer graphics) is common in secondary-school and first-year university syllabi. It links to neighbouring topics 3D computer graphics, Computer graphic techniques, Computer graphics, so understanding it makes those chapters shorter.
In everyday life
Look for Reflection (computer graphics) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Reflection (computer graphics) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Reflection (computer graphics) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Reflection (computer graphics) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Reflection (computer graphics) in simple terms?

Reflection in computer graphics is used to render reflective objects like mirrors 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.

Why does Reflection (computer graphics) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Reflection (computer graphics)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Reflection (computer graphics).

Tags

  • 3D computer graphics
  • Computer graphic techniques
  • Computer graphics

Keep exploring