LearnOpenGL

Translation in progress of learnopengl.com.
git clone https://git.mtkn.jp/LearnOpenGL
Log | Files | Refs

Review.html (4770B)


      1     <h1 id="content-title">Review</h1>
      2 <h1 id="content-url" style='display:none;'>Lighting/Review</h1>
      3 <p>
      4   Congratulations on making it this far! I'm not sure if you noticed, but over all the lighting chapters we learned nothing new about OpenGL itself aside from a few minor items like accessing uniform arrays. All of the lighting chapters so far were all about manipulating shaders using techniques and equations to achieve realistic lighting results. This again shows you the power of shaders. Shaders are extremely flexible and you witnessed first-hand that with just a few 3D vectors and some configurable variables we were able to create amazing graphics!
      5 </p>
      6 
      7 <p>
      8   The last few chapters you learned about colors, the Phong lighting model (that includes ambient, diffuse and specular lighting), object materials, configurable light properties, diffuse and specular maps, different types of lights, and how to combine all the knowledge into a single fully lit scene. Be sure to experiment with different lights, material colors, light properties, and try to create your own environments with the help of a little bit of creativity.
      9 </p>
     10 
     11 <p>
     12   In the next chapters we'll be adding more advanced geometry shapes to our scene that look really well in the lighting models we've discussed.
     13 </p>
     14 
     15 <h2>Glossary</h2>
     16 <p>
     17 <ul>
     18   <li><code>Color vector</code>: a vector portraying most of the real world colors via a combination of red, green and blue components (abbreviated to <code>RGB</code>). The color of an object is the reflected color components that an object did not absorb.</li>
     19   <li><code>Phong lighting model</code>: a model for approximating real-world lighting by computing an ambient, diffuse and specular component.</li>
     20   <li><code>Ambient lighting</code>: approximation of global illumination by giving each object a small brightness so that objects aren't completely dark if not directly lit.</li>
     21   <li><code>Diffuse shading</code>: lighting that gets stronger the more a vertex/fragment is aligned to a light source. Makes use of normal vectors to calculate the angles.</li>
     22   <li><code>Normal vector</code>: a unit vector that is perpendicular to a surface.</li>
     23   <li><code>Normal matrix</code>: a 3x3 matrix that is the model (or model-view) matrix without translation. It is also modified in such a way (inverse-transpose) that it keeps normal vectors facing in the correct direction when applying non-uniform scaling. Otherwise normal vectors get distorted when using non-uniform scaling.</li>
     24   <li><code>Specular lighting</code>: sets a specular highlight the closer the viewer is looking at the reflection of a light source on a surface. Based on the viewer's direction, the light's direction and a shininess value that sets the amount of scattering of the highlight.</li>
     25   <li><code>Phong shading</code>: the Phong lighting model applied in the fragment shader.</li>
     26   <li><code>Gouraud shading</code>: the Phong lighting model applied in the vertex shader. Produces noticeable artifacts when using a small number of vertices. Gains efficiency for loss of visual quality.</li>
     27   <li><code>GLSL struct</code>: a C-like struct that acts as a container for shader variables. Mostly used for organizing input, output, and uniforms.</li>
     28   <li><code>Material</code>: the ambient, diffuse and specular color an object reflects. These set the colors an object has.</li>
     29   <li><code>Light (properties)</code>: the ambient, diffuse and specular intensity of a light. These can take any color value and define at what color/intensity a light source shines for each specific Phong component.</li>
     30   <li><code>Diffuse map</code>: a texture image that sets the diffuse color per fragment.</li>
     31   <li><code>Specular map</code>: a texture map that sets the specular intensity/color per fragment. Allows for specular highlights only on certain areas of an object.</li>
     32   <li><code>Directional light</code>: a light source with only a direction. It is modeled to be at an infinite distance which has the effect that all its light rays seem parallel and its direction vector thus stays the same over the entire scene. </li>
     33   <li><code>Point light</code>: a light source with a location in a scene with light that fades out over distance.</li>
     34   <li><code>Attenuation</code>: the process of light reducing its intensity over distance, used in point lights and spotlights.</li>
     35   <li><code>Spotlight</code>: a light source that is defined by a cone in one specific direction.</li>
     36   <li><code>Flashlight</code>: a spotlight positioned from the viewer's perspective.</li>
     37   <li><code>GLSL uniform array</code>: an array of uniform values. Work just like a C-array, except that they can't be dynamically allocated. </li>
     38 </ul>
     39 </p>       
     40 
     41     </div>
     42