Illumination Natural lighting effects Surface characteristics Shadows Reflections Mathematical models Fall 2004 Theoretical & empirical CS-321 Dr. Mark L. Hornick 1 Terminology Illumination (lighting) model Calculating light intensity At each point on a surface Surface rendering Fall 2004 Apply lighting model Obtain pixel intensities of projected surface positions CS-321 Dr. Mark L. Hornick 2 Light Sources: Emitters Point source: Area small compared to scene Fall 2004 Distributed source: Area large compared to scene CS-321 Dr. Mark L. Hornick 3 Light Emitters: Reflectors Specular (shiny) Fall 2004 Diffuse (dull) CS-321 Dr. Mark L. Hornick 4 Ambient Light General brightness of scene Light sources, reflections, etc. Not spatial or directional Constant for all surfaces Independent of direction Fall 2004 Ia Viewing direction, surface orientation Reflected light depends on surface CS-321 Dr. Mark L. Hornick 5 Ambient Diffuse Reflection I ambdiff kd I a 0 kd 1 Incident light from all directions Reflected light scattered to all directions Fall 2004 CS-321 Dr. Mark L. Hornick 6 Fall 2004 CS-321 Dr. Mark L. Hornick 7 Fall 2004 CS-321 Dr. Mark L. Hornick 8 Directional Diffuse Reflection Incident light from one direction But spread over varying areas Reflected light scattered equally in all directions Intensity depends on angle of incidence A I l ,diff kd I l cos A cos Il ,diff kd Il N L Unit vectors: N (normal) and L (to light source position) CS-321 Fall 2004 Dr. Mark L. Hornick N L 9 Fall 2004 CS-321 Dr. Mark L. Hornick 10 Flat Shading Polygon surface rendering Each polygon in the surface is shaded according to the intensity calculations based on the polygon’s surface normal Fall 2004 CS-321 Dr. Mark L. Hornick 11 Gouraud Shading Vertex normals are calculated as the average of the normals of the polygons that share the vertex The vertex normal is an approximation to the true normal of the surface at that point. Determine vertex intensities based on vertex normal Linearly interpolate across surface Fall 2004 CS-321 Dr. Mark L. Hornick 12 Gouraud Shading Fall 2004 CS-321 Dr. Mark L. Hornick 13 Fall 2004 CS-321 Dr. Mark L. Hornick 14 Specular Reflection Reflected light not diffused Angle of incidence = angle of reflection R For perfect reflector, no reflection visible at any other angle f N L V For imperfect reflectors, some reflection visible at angle f from R Fall 2004 CS-321 Dr. Mark L. Hornick 15 Phong Model Empirical model of specular reflection I spec W Il cos f ns Specular reflection parameter, ns, is large (>100) for shiny surfaces, small (~1) for dull ones Specular reflection coefficient, W(), is relatively constant for many opaque materials; i.e. W() modeled by constant ks Fall 2004 CS-321 Dr. Mark L. Hornick R f N L V 16 Fall 2004 CS-321 Dr. Mark L. Hornick 17 Multiple Light Sources I I diff I spec n ka I a I l kd N Li k s N H i 1 ns • We assume linear superposition of effects of all light sources. • It may be necessary to scale to avoid intensity saturation. Fall 2004 CS-321 Dr. Mark L. Hornick 18 Fall 2004 CS-321 Dr. Mark L. Hornick 19 Other Lighting Issues Not all sources are points Control intensity by direction (Warn) Intensity falls off at distance Attenuation functions Empirical rather than exact models Color Fall 2004 Adjust reflection coefficients CS-321 Dr. Mark L. Hornick 20 Fall 2004 CS-321 Dr. Mark L. Hornick 21
© Copyright 2026 Paperzz