Рет қаралды 5,942
In Episode #4 of Shaders Monthly, we implement the Phong and Blinn-Phong shading models in GLSL. Both models are reflection models. This means they describe mathematically how light is reflected at an opaque surface.
From today's point of view, the models are quite simple. Consequently, we will not only talk about the Phong and Blinn-Phong models. Instead these models are presented in a general theoretical framework that can be easily extended to more complex reflection models. In particular, we will introduce the "rendering equation" and the "bidirectional reflectance distribution function" (BRDF).
The implementation is based on the following example from episode #3:
www.gsn-lib.org/index.html#pr...
1) Irradiance
GSN Composer: www.gsn-lib.org/index.html#pr...
C++: www.mathematik.uni-marburg.de...
Java: www.mathematik.uni-marburg.de...
2) Phong BRDF
GSN Composer: www.gsn-lib.org/index.html#pr...
C++: www.mathematik.uni-marburg.de...
Java: www.mathematik.uni-marburg.de...
3) Modified Phong BRDF
GSN Composer: www.gsn-lib.org/index.html#pr...
C++: www.mathematik.uni-marburg.de...
Java: www.mathematik.uni-marburg.de...
4) Blinn-Phong BRDF
GSN Composer: www.gsn-lib.org/index.html#pr...
C++: www.mathematik.uni-marburg.de...
Java: www.mathematik.uni-marburg.de...
5) Phong BRDF World Space
GSN Composer: www.gsn-lib.org/index.html#pr...
C++: www.mathematik.uni-marburg.de...
Java: www.mathematik.uni-marburg.de...
Documentation for the shader plugin node of the GSN Composer:
www.gsn-lib.org/docs/nodes/Sh...
Additional lecture slides:
www.uni-marburg.de/en/fb12/re...
00:00 Introduction
01:44 What is Light?
03:41 Light Transport
04:57 Color Perception
06:09 RGB Color Space
07:20 CIE RGB
09:48 sRGB
12:28 Rendering Equation Introduction
13:06 Solid Angle
15:37 Flux, Intensity, Irradiance, Radiance
22:25 Rendering Equation and BRDF
27:45 Phong BRDF
47:50 Modified Phong BRDF
52:45 Blinn-Phong BRDF
56:06 Shading in World Space
10:33 Torus Knot
Music: Left U Into - Otis McDonald (KZbin Audio Library)