Académique Documents
Professionnel Documents
Culture Documents
Contents
ILLUMINATION MODELS
Ambient light, Diffuse reflection, Specular reflection Illumination in the Phong model
POLYGON-RENDERING METHODS
Flat shading
Gouraud shading Phong shading Comparision each methods
Ambient Light
Color does not depend on the position, only on the object I=IaKa ( Ia : ambient light intensity, Ka: ambient reflection coefficient)
Very Crude Model
Object shape is in invisible
But user nevertheless to hide other models artifacts
Ambient Light
Example
Increasing Ka
Diffuse Reflection
Light from the light source is sent in every direction Object aspect independent from viewer position Only depends on relative position of light source
I = Ip Kd cos (Ip : point light source intensity Kd : Diffuse reflection coeffcient)
Diffuse Reflection
Example
Increasing Kd ( Ka=0)
Diffuse + Ambient
Increasing ka
Increasing Kd
Specular Reflection
Light reaching the object is reflected in the direction having the same angle With point light source, effect is visible only at the one point on the surface Useful for indirect illumination (reflection and shadows)
Specular Reflection
In the Phong model Imperfect specular reflector I = IpKs(cos)n : angle between reflection and view point
Phong Model
Treats point light sources only Models three types of reflected light
Ambient + diffuse + imperfect specular reflector I = IaKa + Ip {Kdcos + Ks(cos)n}
Phong Model
Ks Increasing n
POLYGON-RENDERING METHODS
Constant-Intensity Shading
Flat Shading
A fast and simple method Assign all pixels inside each polygon same color N2 N1 Figure.
N3
V
N4
The normal vector at vertex V calculated as the average of the surface normals for each polygon sharing that vertex
Constant-Intensity Shading
Gouraud Shading
Take the colors at the vertices Interpolate these colors across the edges and across the scan lines Typically linear interpolation
RGB 1
J
Interpolated colors RGB 2
Gouraud Shading
Phong Shading
Take the normals at the vertices Interpolate these normals across the edges and Across the scan lines
normal 1 Interpolated nomals
normal 2
Phong Shading
Example 3)
Comparision
Flat shading
The simplest shading method
Difference of two shading models Phong shading is more accurate way of shading a polygon since the illumination model is applied to every point More computationally intensive than the Gouraud Illumination model is applied more often Interpolated normals need to be normalized
Comparision
a) Flat shading
b) Gouraud shading
c) Phong shading
Ray Tracing
One of the shading method To create several kinds of effects
methods
Ray-Tracing Tree
Pixel intensity
Sum of intensities at root node Start at terminal node Background intensity If tree is empty
Enclose groups of adjacent objects within a bounding volume Check larger boundary volume and ,if necessary, smaller boundary volume; and so on.
Space-Subdivision Method
The other way to reduce intersection calculation Enclose a scene within a cube Uniform subdivision (a)
Subdivided the cube into eight equal-size octants at each step
Example - a
Example - b
Adaptive sampling Uses unevenly spaced rays in some reason of the pixel area Ex. More rays can be used near object edges to obtains a better estimate of the pixel intensities
Intensity Function n I I E K A I AL i ( K D ( N Li ) I i K S (V Ri ) I i )
IE : Emitted Intensity KA, KD, Ks : Ambient /Diffuse /Specular reflection coefficient IAL : Ambient-light Intensity N : Unit normal vector Li : Unit direction vector to the I-th point light source from a position on the surface
P14 P16