Content deleted Content added
m per WP:HYPHEN, sub-subsection 3, points 4,5,6, replaced: fully- → fully, typo(s) fixed: ’s → 's (3) |
Make a broader link to the whole concept rather than linking individual words. The linked page will link to the individual words if they are relevant |
||
(48 intermediate revisions by 27 users not shown) | |||
Line 1:
{{short description|Simulation of light in computer graphics}}
'''Computer graphics lighting'''
== Light sources ==
Light sources allow for different ways to introduce light into graphics scenes.<ref>{{Cite news|url=https://garagefarm.net/blog/light-the-art-of-exposure|title=Light: The art of exposure|date=2020-11-11|work=GarageFarm|access-date=2020-11-11|language=en-US}}</ref><ref name=":
=== Point ===
Point sources emit light from a single point in all directions, with the intensity of the light decreasing with distance.<ref name=":
[[File:Real-time Raymarched Terrain.png|thumb|309x309px|A directional light source illuminating a terrain
=== Directional ===
A directional source (or distant source) uniformly lights a scene from one direction.<ref name=":8" />
=== Spotlight ===
A spotlight produces a directed [[cone]] of light.<ref name=":73">{{Cite web|url=https:/
=== Area ===
Area lights are 3D objects which emit light. Whereas point lights and spot lights sources are considered infinitesimally small points, area lights are treated as physical shapes.<ref>{{cite conference |last1=Lagarde |first1=Sebastien |author-link1= |last2=de Rousiers |first2=Charles |author-link2= |date=Summer 2014 |title=Moving Frostbite to Physically Based Rendering 3.0 |url=https://www.ea.com/frostbite/news/moving-frostbite-to-pb |conference=SIGGRAPH |___location= |publisher= |pages= |id= |book-title=}}</ref> Area light produce softer shadows and more realistic lighting than point lights and spot lights.<ref>{{Cite book |last1=Pharr |first1=Matt |title=Physically Based Rendering: From Theory to Implementation |last2=Humphreys |first2=Greg |last3=Wenzel |first3=Jakob |publisher=Morgan Kaufmann |year=2016 |isbn=978-0128006450 |edition=3rd |language=English}}</ref>
=== Ambient ===
Ambient light sources illuminate objects even when no other light source is present.<ref name=":73" />
=== Lightwarp ===
A lightwarp is a technique of which an object in the geometrical world [[refracts]] light based on the [[Unit vector|direction]] and [[Intensity (physics)|intensity]] of the light. The light is then [[Wave function|warped]] using an ambient diffuse term with a range of the [[color spectrum]]. The light then may be [[reflectively]] scattered to produce a higher [[depth of field]], and [[refracted]]. The technique is used to produce a [[Style_(visual_arts)#Stylization|unique rendering style]] and can be used to limit [[overexposure]] of objects. Games such as [[Team Fortress 2]] use the rendering technique to create a [[cartoon]] [[cel shaded]] stylized look.<ref>{{Cite book|chapter-url=https://hal.inria.fr/inria-00449828|chapter=Radiance Scaling for Versatile Surface Enhancement|first1=Romain|last1=Vergne|first2=Romain|last2=Pacanowski|first3=Pascal|last3=Barla|first4=Xavier|last4=Granier|first5=Christophe|last5=Schlick|title=Proceedings of the 2010 ACM SIGGRAPH symposium on Interactive 3D Graphics and Games |date=February 19, 2010|pages=143–150 |publisher=ACM|via=hal.inria.fr|doi=10.1145/1730804.1730827|isbn=9781605589398 |s2cid=18291692 }}</ref>
===HDRI===
HDRI stands for High dynamic range image and is a 360° image that is wrapped around a [[3D modeling|3D model]] as an outdoor setting and uses the sun typically as a light source in the sky. The [[Texture mapping|textures]] from the model can reflect the direct and [[Shading#Ambient lighting|ambient light]] and colors from the HDRI.<ref>{{cite web | url=https://visao.ca/what-is-hdri/#:~:text=High%20dynamic%20range%20images%20are,look%20cartoonish%20and%20less%20professional. | title=What are HDRI images? | date=13 January 2021 }}</ref>
== Lighting interactions ==
In computer graphics, the overall effect of a light
[[File:Phong components revised.png|thumb|544x544px|Decomposition of lighting interactions
=== Diffuse ===
Diffuse lighting (or [[diffuse reflection]]) is the direct illumination of an object by an even amount of light interacting with a [[Scattering|light-scattering]] surface.<ref name=":
=== Ambient ===
As ambient light is directionless, it interacts uniformly across all surfaces, with its intensity determined by the strength of the ambient light sources and the properties of objects' surface materials, namely their ambient [[Reflection coefficient|reflection coefficients]].<ref name=":83" /><ref name=":10" />
=== Specular ===
The [[Specular highlight|specular lighting]] component gives objects shine and highlights.<ref name=":83" />
== Illumination models ==
Lighting models are used to replicate lighting effects in [[Rendering (computer graphics)|rendered]] environments where light is approximated based on the physics of light.<ref name=":1">{{Cite web|url=https://learnopengl.com/Lighting/Basic-Lighting|title=LearnOpenGL - Basic Lighting|website=learnopengl.com|access-date=2019-11-08}}</ref>
=== Object oriented lighting ===
Object oriented lighting, also known as local illumination, is defined by mapping a single light source to a single object.<ref name=":3">{{Cite web|url=http://www.cs.kent.edu/~farrell/cg01/lectures/color/illum_local.html|title=Local Illumination|last=Farrell
==== Phong illumination model ====
{{Main|Phong reflection model}}
One of the most common
==== Blinn-Phong illumination model ====
{{Main|Blinn–Phong reflection model}}
The Blinn-Phong illumination model is similar to the Phong model as it uses specular light to create a highlight on an object based on its shininess.<ref name=":16">James F. Blinn (1977). "Models of light reflection for computer synthesized pictures". ''Proc. 4th annual conference on computer graphics and interactive techniques'': 192–198. [[CiteSeerX]] 10.1.1.131.7741. {{doi|10.1145/563858.563893}}
=== Global illumination ===
{{Main articles|Global illumination}}
Global illumination differs from local illumination because it calculates light as it would travel throughout the entire scene
==== Ray tracing ====
{{Main articles|Ray tracing (graphics)}}
[[File:Ray-traced steel balls.jpg|thumb|Image rendered using ray tracing]]
Light sources emit rays that interact with various surfaces through absorption, reflection, or refraction.<ref name=":72" />
==== Radiosity ====
{{Main articles|Radiosity (computer graphics)}}
Radiosity takes into account the energy given off by surrounding objects and the light source.<ref name=":2" />
==== Photon mapping ====
{{Main|Photon mapping}}
[[Photon]] mapping was created as a two-pass global illumination algorithm that is more efficient than
== Polygonal shading ==
{{Main|Shading}}
Polygonal [[shading]] is part of the [[Rasterisation|rasterization]] process where [[3D computer graphics|3D]] models are drawn as [[2D computer graphics|2D]] pixel images.<ref name=":4">{{Cite web|url=https://cglearn.codelight.eu/pub/computer-graphics/shading-and-lighting|title=Computer Graphics: Shading and Lighting|website=cglearn.codelight.eu|access-date=2019-10-30}}</ref>
[[File:Flatshading00.png|alt=|thumb|165x165px|An example of flat shading
[[File:Gouraudshading01.png|alt=|thumb|165x165px|An example of Gouraud shading
[[File:Phongshading00.png|alt=|thumb|165x165px|An example of Phong shading
=== Flat shading ===
Flat shading is a simple shading model with a uniform application of lighting and color per polygon.<ref name=":12">{{Cite web|url=https://www.cs.brandeis.edu/~cs155/Lecture_16.pdf|title=Illumination Models and Shading|last=Foley
=== Gouraud shading ===
[[Gouraud shading]] is a type of interpolated shading where the values inside of each polygon are a blend of its vertex values.<ref name=":4" />
=== Phong shading ===
[[Phong shading]], similar to Gouraud shading, is another type of interpolative shading that blends between vertex values to shade polygons.<ref name=":13">{{Cite web|url=http://www.hao-li.com/cs420-fs2018/slides/Lecture05.2.pdf|title=Shading in OpenGL|last=Li|first=Hao|date=2018
== Lighting effects ==
[[File:Miroir-cercle.jpg|thumb|A reflective material demonstrating caustics
=== Caustics ===
{{Main articles|Caustic (optics)}}
[[Caustic (optics)|Caustics]] are
=== Reflection mapping ===
{{Main articles|Reflection mapping}}
Reflection mapping (also known as environment mapping) is a technique which uses 2D environment maps to create the effect of [[Reflectance|reflectivity]] without using ray tracing.<ref name=":5">{{Cite web|url=https://cglearn.codelight.eu/pub/computer-graphics/environment-mapping|title=Computer Graphics: Environment Mapping|website=cglearn.codelight.eu|access-date=2019-11-01}}</ref>
=== Particle systems ===
{{Main articles|Particle system}}
Particle systems use collections of small [[Particle|particles]] to model chaotic, high-complexity events, such as fire, moving liquids, explosions, and moving hair.<ref name=":6">{{Cite web|url=http://web.engr.oregonstate.edu/~mjb/cs491/Handouts/particlesystems.2pp.pdf|title=Particle Systems|last=Bailey|first=Mike
== See also ==
*[[Per-pixel lighting]]
*[[Computer graphics]]
==References==
{{reflist}}
{{Computer graphics}}
{{DEFAULTSORT:Computer Graphics Lighting}}
[[Category:3D rendering]]
[[Category:Lighting
[[Category:Shading
|