Presentation is loading. Please wait.

Presentation is loading. Please wait.

School of Computer Science

Similar presentations


Presentation on theme: "School of Computer Science"— Presentation transcript:

1 School of Computer Science
Computer Graphics School of Computer Science University of Seoul Minho Kim

2 Blinn-Phong Shading Model
Assumed to be broken into (independent) RGB components Materials characterized by the percentage of the incoming RGB components that are reflected Four (independent) components Ambient: bounced & scattered many times, no direction known, lightpos/viewer-independent Diffuse: bounced & scattered in all directions, viewer-independent, lightpos-dependent Specular: reflected in a preferential direction, lightpos/viewer-dependent Emissive: emits light, not affected by lights, not affect lighting

3 Blinn-Phong Shading Model (cont'd)
Meaning of four components (ambient, diffuse, specular, emissive) for each color Lights – intensity Materials – reflected proportion

4 OpenGL Lighting Blinn-Phong shading model + Gouraud shading
OpenGL lighting equation Materials can be set for front/back face seperately Lights transformed by modelview matrix (not projection matrix) No shadow (only a vertex-light pair is considered) Reflected light not considered anymore

5 Programming Lighting enabled – glEnable(GL_LIGHTING) For each light
Turned on – glEnable(GL_LIGHT#) Set up (type, position, intensity of each component) – glLight* For each object (triangle) Material (per face & component) – glMaterial* Normal vectors – glNormal* Requres unit normal vector – GL_NORMALIZE, GL_RESCALE_NORMAL


Download ppt "School of Computer Science"

Similar presentations


Ads by Google