Content deleted Content added
Citation bot (talk | contribs) Alter: title, template type. Add: bibcode, s2cid, isbn, pages, chapter, chapter-url, authors 1-1. Removed or converted URL. Removed parameters. Some additions/deletions were parameter name changes. | Use this bot. Report bugs. | Suggested by Abductive | #UCB_webform 1641/3844 |
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 |
||
(6 intermediate revisions by 6 users not shown) | |||
Line 1:
{{short description|Simulation of light in computer graphics}}
'''Computer graphics lighting'''
== Light sources ==
Line 8:
=== Point ===
Point sources emit light from a single point in all directions, with the intensity of the light decreasing with distance.<ref name=":72">{{Cite web|url=https://www.cs.uic.edu/~jbell/CourseNotes/ComputerGraphics/LightingAndShading.html|title=Intro to Computer Graphics: Lighting and Shading|website=www.cs.uic.edu|access-date=2019-11-05}}</ref> An example of a point source is a standalone light bulb.<ref name=":8">{{Cite web|url=http://www.bcchang.com/immersive/ygbasics/lighting.html|title=Lighting in 3D Graphics|website=www.bcchang.com|access-date=2019-11-05}}</ref>
[[File:Real-time Raymarched Terrain.png|thumb|309x309px|A directional light source illuminating a terrain
=== Directional ===
Line 24:
=== 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 source on an object is determined by the combination of the object's interactions with it usually described by at least three main components.<ref name=":82">{{Cite web|url=http://www.bcchang.com/immersive/ygbasics/lighting.html|title=Lighting in 3D Graphics|website=www.bcchang.com|access-date=2019-11-05}}</ref> The three primary lighting components (and subsequent interaction types) are diffuse, ambient, and specular.<ref name=":82" />
[[File:Phong components revised.png|thumb|544x544px|Decomposition of lighting interactions
=== Diffuse ===
Line 73 ⟶ 76:
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> Shading applies a lighting model, in conjunction with the geometric attributes of the 3D model, to determine how lighting should be represented at each [[Fragment (computer graphics)|fragment]] (or pixel) of the resulting image.<ref name=":4" /> The [[Polygon mesh|polygons]] of the 3D model store the geometric values needed for the shading process.<ref name=":11">{{Cite web|url=http://math.hws.edu/graphicsbook/c4/s1.html|title=Introduction to Computer Graphics, Section 4.1 -- Introduction to Lighting|website=math.hws.edu}}</ref> This information includes [[Vertex (geometry)|vertex]] positional values and [[Normal (geometry)|surface normals]], but can contain optional data, such as [[Texture mapping|texture]] and [[Bump mapping|bump]] maps.<ref>{{Cite web|url=https://www.khronos.org/opengl/wiki/Vertex_Specification#Primitives|title=Vertex Specification - OpenGL Wiki|website=www.khronos.org|access-date=2019-11-06}}</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 ===
Line 87 ⟶ 90:
== Lighting effects ==
[[File:Miroir-cercle.jpg|thumb|A reflective material demonstrating caustics
=== Caustics ===
|