Presentation is loading. Please wait.

Presentation is loading. Please wait.

Part I: Basics of Computer Graphics

Similar presentations


Presentation on theme: "Part I: Basics of Computer Graphics"— Presentation transcript:

1 Part I: Basics of Computer Graphics
Chapter 5 Representing Light and Isotropic Reflection Models 6-1

2 How do we represent light?
RGB? No! Light spectrum: Therefore shading calculation should be performed on the light spectrum. How? Taking samples on the spectrum. [Hall89] proposed to take 9 samples on the curves. Calculate shading for each sampled wavelength, e.g. invoke Phong reflection model “9” times. 5-2

3 How do we represent light?
Is the surface reflectivity also wavelength dependent? YES! But “How can we display the final light spectrum on the RGB monitor?” Different spectrums may produce same response in our eyes. Hence no need to reproduce the exact light spectrum. But reproduce another spectrum that gives us the “same” perceptual color. 5-3

4 Color Matching Experiment
Three types of color receptors (cones) on our retina: responsible for short, middle and long wavelengths A matching experiment of Sensations, not matching of spectral curve. A statistical, psychological experiment. May vary for different individual. 5-4

5 Color Matching Experiment
3 lights are chosen X: 445nm Y: 535nm Z: 630nm Not necessary equal to RGB on your monitor e.g. wavelength 570nm has the same response as 0 X Y Z 5-5

6 From Light Spectrum to RGB
An ideal sampling approach: Take 9 samples on the spectral curve. Invokes reflection models (say Phong model) 9 times. Convert the light spectrum to XYZ From XYZ to RGB: spectral curve of RGB primitives can also be expressed as, R = a X + b Y + c Z G = d X + e Y + f Z B = g X + h Y + i Z In other words, 5-6

7 From Light Spectrum to RGB
Practically, most graphics systems don’t care. They only sample at 3 wavelength R G B. Obviously, it is not accurate or correct. Two monitors may not display the same image equally. Reference [Hall89] Roy Hall, Illumination and Color in Computer Generated Imagery, Springer-Verlag 1989. 5-7

8 Phong Reflection Model
Notation: Many variations, the following is a common model: reflected = ambient + diffuse + specular Ambient Models the contribution of the surrounding environment except the light sources. It is assumed constant. Obviously wrong! Phong model is a local illumination model. Global illumination models (ray-tracing, radiosity) solve this more accurately. 6-2

9 Phong Reflection Model
Diffuse Models multiple scattering within rough surface Viewpoint independent Depends on cos q, since the surface element is not maximally illuminated if the light source is not from the top. cos q projects the surface elements along the L direction. 6-3

10 6-4

11 Phong Reflection Model
Specular Model the glossy appearance of shiny object. Viewpoint dependent Efficient modification: N.H replaces R.V Diffuse + Specular 6-5

12 6-6

13 6-7

14 Torrance-Sparrow Model
Comparing Phong model with real surface. Phong real surface Flaw 1: height of the specular bump varies with the direction of light source. Flaw 2: direction of peak specular reflection is not exactly along the mirror reflection direction. Off-specular reflection phenomenon Both flaws related to the specular reflection. 6-8

15 Torrance-Sparrow Model
In 1967, Torrance and Sparrow [Torrance67] proposed a reflection model based on microfacet approach. It accounts for the off-specular phenomenon. Blinn [Blinn77] proposed a reflection model for computer graphics based on Torrance-Sparrow model. Modifications are done for the specular term. D, Distribution function of the directions of microfacets on the rough surface. G, Geometry attenuation factor due to self-shadowing or masking F, Fresnel reflection (physical law). 6-9

16 Ni a Distribution Function
Models the surface roughness using a statistical function Several functions have been proposed Guassian distribution (normal distribution) a is the angle from the average normal N to the facet normal Ni m controls the bell shape (standard derivation) of the Guassian function Beckmann model m is the RMS (root mean square) slope of microfacets, actually a parameter to control the shape of the bump a Ni 6-10

17 Distribution Function
Most models use Guassian distribution as a component. Easy to handle. May derive close-form solution Frequently found in natural phenomenon (A claim). Replace the cos function in Phong Model by this factor 6-11

18 Case a Case b Case c Geometry Attenuation
Accounts for self-shadowing or masking Explains off-specular reflection phenomenon Case a Case b Case c 6-12

19 each facet comprises one side of a symmetric V-groove cavity
Geometry Attenuation To calculate geometry attenuation factor G,we assume each facet comprises one side of a symmetric V-groove cavity longitudinal axis of the cavity is parallel to the plane of the mean surface upper edges of V-grooves are all in the same plane the grooves do not have a preferred orientation, i.e., they are in all directions along the surface But, the assumptions are not realistic. However, it does explain the off-specular reflection. For cases b and c, the attenuation equals to the factor (reuse m) 6-13

20 Geometry Attenuation Case c: L & V interchange 6-14

21 Fresnel Reflection The fraction of light incident on a facet which is actually reflected (as opposed to being absorbed). qi is angle of incidence sin qt = sin qi / n where is refraction index It can be rewritten as where When qi =p/2, no absorption, all reflected. qi =0, max absorption. 6-15

22 References [Blinn77] James F. Blinn, “Models of Light Reflection For Computer Synthesized Pictures”, SIGGRAPH Proceedings’ 77, p , 1977. [Cook81] Robert Cook and Kenneth Torrance, “A Reflectance Model for Computer Graphics”, SIGGRAPH Proceedings’81, p , 1981. [Phong75] Bui-Tuong Phong, “Illumination for Computer Generated Images”, Communcation of ACM, vol. 18, no. 6, p , 1975. [Torrance67] Kenneth Torrance and Ephraim Sparrow, “Theory for Off-Specular Reflection from Roughened Surface”, Journal of Optical Society of America, vol. 57, no. 9, 1967. 6-16


Download ppt "Part I: Basics of Computer Graphics"

Similar presentations


Ads by Google