Emissive § Iemissive = k emissive § I emissive : Emissive Intensity (RGB color vector) § k emissive : Material Emissive Component (RGB color vector) § Constant over a surface § Independent of viewing direction § Independent of light source § Material acts as light source
Emissive | Code GLfloat mat_emission[] = { 0.0, 0.0, 0.0, 1.0 }; glMaterialfv(GL_FRONT, GL_EMISSION, mat_emission); § Four integer or floating-point values that specify the RGBA emitted light intensity of the material. Integer values are mapped linearly such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0 § Floating-point values are mapped directly. Neither integer nor floating-point values are clamped. § The initial emission intensity for both front- and back-facing materials is (0, 0, 0, 1)
Ambient Light Reflection § Iambient = ka Sa + ka La § Sa : Scene Ambient Intensity § La : Ambient Light Intensity § ka : Material Ambient Reflection Coefficient § Constant over a surface § Independent of viewing direction § Ambient contribution comes from the complete scene and each individual light.
Ambient Light Reflection | Code GLfloat val[] = { 0.0, 0.0, 0.0, 1.0 }; glMaterialfv(GL_FRONT, GL_AMBIENT, val); § Four integer or floating-point values that specify the ambient RGBA reflectance of the material. Integer values are mapped linearly such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0 . Floating-point values are mapped directly. Neither integer nor floating-point values are clamped. § The initial ambient reflectance for both front- and back-facing materials is (0.2, 0.2, 0.2, 1.0)
Diffuse Reflection § Idiffuse = kd Ld cos(⍬) § Ld : Diffuse Light Intensity § Kd : Material Diffuse Reflection Coefficient § Lambert's cosine law: luminous intensity is directly proportional to the cosine of the angle θ between the direction of the incident light and the surface normal. § Angle of incidence 0 to 90 then surface is illuminated § Diffuse is 0 if light comes from backside
Diffuse Reflection | Code GLfloat val[] = { 0.0, 0.0, 0.0, 1.0 }; glMaterialfv(GL_FRONT, GL_DIFFUSE, val); § Four integer or floating-point values that specify the diffuse RGBA reflectance of the material. Integer values are mapped linearly such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0 . Floating-point values are mapped directly. Neither integer nor floating-point values are clamped. § The initial diffuse reflectance for both front- and back-facing materials is (0.8, 0.8, 0.8, 1.0)
Specular § Ispecular = ks Ls coskshiny (Ø) = W(⍬) Ls coskshiny (Ø) § Ls : Light specular component § ks : Material specular reflection coefficient : depends on q then ks = W(⍬) – Fresnel’s laws of Reflection § Kshiny : Material specular reflection exponent § Specular area is lighter because the light source is reflected directly into the viewer's eye
Specular | Code GL_SPECULAR § Four integer or floating-point values that specify the specular RGBA reflectance of the material. Integer values are mapped linearly such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0 . Floating-point values are mapped directly. Neither integer nor floating-point values are clamped. § The initial specular reflectance for both front- and back-facing materials is (0, 0, 0, 1)
Specular | Code GL_SHININESS § A single integer or floating-point value. § Only values in the range 0 128 are accepted. § The initial specular exponent for both front- and back-facing materials is 0.
Ambient + Diffuse + Specular § Isurface = I emissive + Iambient + Idiffuse + I specular = kemissive + (ka Sa + ka La ) + (kd Ld cos(⍬)) + (ks Ls coskshiny (Ø) ) = kemissive + ka Sa + ∑ # #%&'()* (ka La + kd Ld cos(⍬) + ks Ls coskshiny (Ø) )