Presentation is loading. Please wait.

Presentation is loading. Please wait.

Basic Illumination BRANCH :- ELECTRICAL (C11) Gohil Amit M. (130980109001) Joshi Jay P. (130980109020) Barot Mahesh P. (130980109002) Pandya Bhrugu I.

Similar presentations


Presentation on theme: "Basic Illumination BRANCH :- ELECTRICAL (C11) Gohil Amit M. (130980109001) Joshi Jay P. (130980109020) Barot Mahesh P. (130980109002) Pandya Bhrugu I."— Presentation transcript:

1 Basic Illumination BRANCH :- ELECTRICAL (C11) Gohil Amit M. (130980109001) Joshi Jay P. (130980109020) Barot Mahesh P. (130980109002) Pandya Bhrugu I. (130980109003) HANSABA COLLEGE OF ENGINEERING AND TECHNOLOGY, SIDHPUR (098) INSTITUTE GUIDE PANKAJ A PRAJAPATI ELE DEPT. HCET SIDHPUR INSTITUTE GUIDE PANKAJ A PRAJAPATI ELE DEPT. HCET SIDHPUR

2 Light Source Independent Models Depth Shading Color or intensity determined solely by "depth" of polygon. Darker colors or intensities at lower elevations. Effective in modeling terrain or surface data Avoids complex calculations of lighting dependent models Simulates realism

3 Depth Cueing Reduce intensity of pixel as the distance from the observer increases Simulates reduction in clarity as distances from the observer increases Image fades in the distance Often used in medical imaging

4 Light Source Dependent Models What an object looks like depends on Properties of the light source such as color, distance from object, direction from object, intensity of source Surface characteristics of object such as color and reflectance properties

5 Diffuse Reflection using Lambert's Law Lambert's Law - The intensity of light reflected from a surface is proportional to the cosine of the angle between the vector L to the light source and the normal vector N perpendicular to the surface. The amount of reflected light is dependent on the position of the light source and the object but independent of the observer's position.

6 Simple Illumination Model Let I = Illumination intensity Ip = Point light source intensity (white light) kd = Surface reflection coefficient (0<=kd<=1) ß = must be between 0 and 90 degrees A simple illumination model: I = Ipkd(cosß) Since cosß = (LN)/(||L|| ||N||), then if L and N have unit length then we can use I = Ipkd (LN)

7 Ambient Illumination Ambient light is the illumination of an object caused by reflected light from other surfaces. To calculate this exactly would be very complicated. A simple model assumes ambient light is uniform in the environment. Let I a = Ambient light intensity k a = Ambient light reflected Then we modify our previous illumination model to I = I a k a + I p k d (LN)

8 Light-source Attenuation Thus far we have ignored the inverse square law: energy decays with the inverse square of the distance d L to the light source. Including this term we get I = I a k a + I p k d (LN)/d L 2 However, due to our previous assumptions of a point light source and uniform ambient light, using the d L 2 term gives too rapid of a decrease in illumination intensity to look realistic. The 1/d L 2 term is usually replaced by f att where f att = MIN (1/(c 1 + c 2 d L + c 3 d L 2 ), 1) I = I a k a + I p k d (NL)*f att

9 Specular Reflection Light bounces off a glossy surface maintaining the color of the light source. Visible when the angle of incidence of the light from the point light source is equal to the angle of reflection toward the observer. For a non-perfect reflector, intensity of reflected light decreases rapidly as angle to observer increases beyond the angle of incidence. V = Observer Position N = Normal Vector L = Light Src Vector R = Reflected Vector N L ß V ß a R

10 Phong's Highlighting Term I p f att W(ß) cos n a I p = Point light source intensity f att = Light-source Attenuation W(ø) = Fraction of specullarly reflected light (usually a constant, 0 < = k s ) <= 1 n = Specular reflection exponent (perfect reflector n = ∞) cos a = R V = (2N(N L) – L) V I = I a k a + I p k d (NL)*f att + Specular Component Specular Component = I p f att k s (((2N(N L) – L) V) n This term represents the amount of the light source’s color that should be added !

11 Implementation Details Given an RGB Color Space – (A) Ambient Light = I a – (D) Diffuse Reflection = I p (L N)/(||L|| ||N||) f att – (S) Specular Reflection = I p * f att (R V) n Given a White Light Source L = (255, 255, 255) Given a RGB point O = (R, G, B) I r = O r (A*k a + D*k d ) + L r (S*k s ) I g = O g (A*k a + D*k d ) + L g (S*k s ) I b = O b (A*k a + D*k d ) + L b (S*k s )

12 THANK YOU


Download ppt "Basic Illumination BRANCH :- ELECTRICAL (C11) Gohil Amit M. (130980109001) Joshi Jay P. (130980109020) Barot Mahesh P. (130980109002) Pandya Bhrugu I."

Similar presentations


Ads by Google