Presentation is loading. Please wait.

Presentation is loading. Please wait.

Illumination Models. Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model,

Similar presentations


Presentation on theme: "Illumination Models. Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model,"— Presentation transcript:

1 Illumination Models

2 Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model, or Shading Model Surface rendering: Apply the Illumination model to color all pixels of the surface.

3 Introduction 2 Example: Illumination model gives color vertices, Surface is displayed via interpolation of these colors.

4 Introduction 3 Illumination: Physics: –Material properties, light sources, relative positions, properties medium Psychology: –Perception, what do we see –Color! Often approximating models

5 Light sources 1 Light source: object that radiates energy. Sun, lamp, globe, sky… Intensity I = (I red, I green, I blue ) If I red = I green = I blue : white light

6 Light sources 2 Simple model: point light source -position P and intensity I -Light rays along straight lines -Good approximation for small light sources

7 Light sources 3 Simpler yet: point light source at infinity -Direction V and intensity I -Sunlight V

8 Light sources 4 Damping: intensity of light decreases with distance Energy is distributed over area sphere, hence I l = I / d 2, with d distance to light source. In practice often too ‘agressive’, hence I l = I / (a 0 +a 1 d+a 2 d 2 ) If light source at infinity: No damping with distance d

9 Light sources 5 Directed light source, spotlight: Light is primarily send in direction of V light. P Q ll light cone  V light

10

11 Light sources 6 More subtle: Let I decrease with increasing angle  P Q ll light cone  V light

12

13 Surface illumination 1 When light hits a surface, three things can happen: reflection transmission absorption

14 Surface illumination 2 Suppose, a light source radiates white light, consisting of red, green and blue light. reflection transmission absorption If only red light is reflected, then we see a red surface.

15 Surface illumination 3 Diffuse reflection: Light is uniformly reflected in all directions Specular reflection: Light is stronger reflected in one direction. specular reflection diffuse reflection

16 Surface illumination 4 Ambient light: light from the environment. Undirected light, models reflected light of other objects.

17 Basic illumination model 1 Basic illumination model: Ambient light; Point light sources; Ambient reflection; Diffuse reflection; Specular reflection.

18 Basic illumination model 2 Ambient light: environment light. Undirected light, models reflected light of other objects.

19 Basic illumination model 3 Perfect diffuse reflector: light is reflected uniformly in all directions. dA/cos   dA

20 Basic illumination model 4 Perfect diffuse reflector: light is reflected uniformly in all directions.. N L  dA/cos   dA Lambert’s law: Reflected energy is proportional with cos , where  denotes the angle between the normal N and a vector to the light source L.

21 Basic illumination model 5 Perfect diffuse reflector: light is reflected uniformly in all directions. N L IlIl P surf P source

22 Basic illumination model 6 Perfect specular reflector: light is only reflected in one direction. Angle of incidence is angle of reflection. N L R  

23 Basic illumination model 7 Imperfect specular reflector: light is distributed in the direction of the angle of reflection, dependent on the roughness of the surface. N L R N L R gladruw    

24 Basic illumination model 8 Phong model: empirical model for specular reflection N  L  R V 

25 Basic illumination model 9 Phong model: empirical model for specular reflection N  L  R V 

26 Basic illumination model 10 Phong model: calculating the vectors N L R L N.L V

27 Basic illumination model 11 N L  R V  H Phong model: variant with halfway vector H. Use  instead of  If light source and viewer far away: H  constant.

28 Basic illumination model 12 All together:

29 Color (reprise): Light intensity I and reflection coefficients k: (r,g,b) triplets So for instance: Plastic: k d is colored (r,g,b), k s is grey (w,w,w) Metal: k d and k s same color Basic model: simple but effective. It can be done much better though… Basic illumination model 13

30 Transparancy 1 Transparant object: -reflected and transmitted light -refraction -scattering

31 Transparancy 2 Snell’s law of refraction: N ii L R T ii rr

32 Transparancy 3 Thin surface: -double refraction -shift of light ray

33 Transparancy 3 Very thin surface: -Discard shift Poor result for silhouette edges…

34 Atmospheric effects 1 Atmospheric effects: -dust, smoke, vapor -colors are dimmed -objects less well visible

35

36 Atmospheric effects 2 = 0.25 + [ 1  0.25 ]

37 Rendering polygons 1 Basic illumination model: Can be used per point, but that’s somewhat expensive More efficient: Illumination model gives color for some points; Surface is filled in using interpolation of these colors.

38 Rendering polygons 2 Constant-intensity rendering aka flat surface rendering: Determine color for center of polygon; Fill the polygon with a constant color. Ok if: Object consists of planar faces, and Light sources are far away, and Eye point is far away, or Polygons are about a pixel in size.

39 Rendering polygons 2 Constant-intensity rendering aka flat surface rendering: Determine color for center of polygon; Fill the polygon with a constant color. Highlights not visible, Facetted appearance, increased by Mach banding effect.

40 Human perception: edges are given emphasis, contrast is increased near edges. Mach banding Angel (2000)

41 Rendering polygons 2 Gouraud surface rendering: Determine average normal on vertices; Determine color for vertices; Interpolate the colors per polygon (incrementally). N1N1 N2N2 N3N3 N4N4 V

42 Rendering polygons 3 Gouraud surface rendering: Much better result for curved surfaces Errors near highlights Linear interpolation still gives Mach banding Silhouettes are still not smooth GouraudFlat

43 Rendering polygons 4 Phong surface rendering: Determine average normal per vertex; Interpolate normals per polygon (incrementally); Calculate color per pixel. Fast Phong surface rendering: Like Phong surface rendering, but use 2 nd order approximation of color over polygon:

44 Rendering polygons 5 Phong surface rendering: Even better result for curved surfaces No errors at high lights No Mach banding Silhouettes remain coarse More expensive than flat or Gouraud shading

45 Rendering polygons 5 Gouraud Flat Phong


Download ppt "Illumination Models. Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model,"

Similar presentations


Ads by Google