Reflection (computer graphics): Difference between revisions

Content deleted Content added
Drummyfish (talk | contribs)
Correct
Drummyfish (talk | contribs)
Add approaches section
Line 9:
*'''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). However, some people use the term "glossy reflection" as a synonym for "blurred reflection". Glossy used in this context means that the reflection is actually blurred.
 
==Approaches to reflection rendering==
[[File:CG reflections comparison.png|thumb|right|Comparison of accurate reflections computed with [[path tracing]] (left), approximate reflections with [[environment mapping]] (middle), and screen space reflections (right).]]
For rendering environment reflections there exist many techniques that differ in precision, computational and implementation complexity. Combination of these techniques are also possible.
 
[[Image and object order rendering|Image order rendering]] algorithms based on tracing rays of light, such as [[Ray tracing (graphics)|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 specilized HW 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]].<ref>{{cite journal |last1=Kligard |first1=Mark |title=Improving Shadows and Reflections via the Stencil Buffer |date=1999 |pages=7 |url=https://www.researchgate.net/publication/238248138_Improving_Shadows_and_Reflections_via_the_Stencil_Buffer |accessdate=25 April 2020}}</ref> 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.<ref>{{cite AV media | title =Off Camera Secrets, Metal Gear Solid: Twin Snakes - Boundary Break|url =https://youtube.com/channel/UCHTnEwQKNwm49CQeCVZogMw?page=1&sort_by=popular|time =4:32|access-date =25 April 2020}}</ref>
 
Reflections on non-planar (curved) surfaces are more chalenging 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 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]] (SSR): a more expensive technique that traces reflection rays in screen space (as opposed to world space in e.g. ray tracing). 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.<ref>{{cite web |title=Unity-Technologies: Screen space Reflections |url=https://github.com/Unity-Technologies/PostProcessing/wiki/Screen-space-Reflections |accessdate=25 April 2020}}</ref>
 
==Examples==
Line 46 ⟶ 59:
* [[Specular reflection]] (optics)
* [[Wet floor effect]]
 
== References ==
{{reflist}}
 
{{DEFAULTSORT:Reflection (Computer Graphics)}}