Download presentation

Presentation is loading. Please wait.

Published byEmely Wile Modified over 3 years ago

1
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 6

2
Light and Matter Surface may –emit light –reflect light Rendering equation –Recusrively applying the effect from a source to the viewer yields the Equation cannot be solved in general Approximate approaches can be computationally intensive

3
Approximations Ray tracing –trace light from source to eye most rays don’t reach the eye Radiosity –Treat surfaces as small regions each emitting fixed light Calculate emission independent of viewer Simplified ray tracing –Single interaction between light source and each surface

4
Light and Surfaces

5
Interaction with Surfaces Specular surface –Similar to mirror –Light leaves at same angle as entry

6
Interaction with Surfaces (cont) Diffuse Surface –Light leaves in all directions

7
Interaction with Surfaces (cont) Translucent Surface –some light penetrates surface –leaves at modified angle – refraction –some reflected

8
Light Sources Six variable illumination function I(x,y,x,theta, phi, lambda) –Generally too complex to compute for all points

9
Light Sources Consider four simpler light sources –Ambient lighting Omnidirectional; constant everywhere –Point source Radiates in all directions –Spot lights Small cone of constant light –Distant light rays are parallel

10
Color Sources Describe color with 3-dimensional RGB vector –(Ir, Ig, Ib) T

11
Characteristics of Light Sources Ambient light –every point in scene receives same light in every direction Point source –Intensity decreases with inverse square of distance –Often approximate with form (a + bd +cd 2 ) -1 where d is distance to soften effect

12
Characteristics of Light Sources Spot light –Light limited to cone of angle –diminishes toward edges of cone as cos e (theta) for some value of e –intensity as for point source Distant source –constant intensity –fixed direction

13
Phong Reflection Model Described by 4 vectors n – normal to p v – to viewer l – to source r – reflected ray

14
Phong Reflection Model Supports –ambient –diffuse –specular or combination of these Uses 3 x 3 matrix –columns for r – g – b –rows for ambient, diffuse, specular Color source and reflection matrices

15
Phong Reflection Model resulting intensity is sum or products of corresponding terms I ir = R ira L ira +R ird L ird +R irs L irs = I ira +I ird +I irs = I ira +I ird +I irs for red, etc Sum over all points for complete effect

16
Ambient Reflection Ra = k a, 0 <= k a <= 1 –a fraction of light is reflected –one coefficient for each color

17
Diffuse reflection Lambertian surfaces –reflect only vertical component –R d proportional to cos(theta) –I d = k d (l. n) L d / (a + bd +cd 2 )

18
Specular Reflection Phong model equation I s = k s L s (R. v) a k s is shininess coefficient

19
OpenGL Shading Polygonal shading –Generate shading on individual polygons Flat shading glShadeModel(GL_FLAT); glShadeModel(GL_FLAT); –select one vertex of polygon for normal –same color throughout polygon –tends to produce artificial looking surfaces with distinctly colored regions –eye is very sensitive to change Mach Bands

20
Flat Shading

21
Interpolative and Gourand Shading GL_SMOOTH –average normals –example: plates 4 & 5

Similar presentations

Presentation is loading. Please wait....

OK

Computer Graphics: Illumination

Computer Graphics: Illumination

© 2018 SlidePlayer.com Inc.

All rights reserved.

To ensure the functioning of the site, we use **cookies**. We share information about your activities on the site with our partners and Google partners: social networks and companies engaged in advertising and web analytics. For more information, see the Privacy Policy and Google Privacy & Terms.
Your consent to our cookies if you continue to use this website.

Ads by Google

Ppt on p&g products list Ppt on human resource management system Ppt on functional requirements Ppt on home security system using gsm Ppt on appropriate climate responsive technologies for inclusive growth and sustainable development Ppt on acid and base balance Ppt on global warming and its effects Ppt on operating systems Ppt on pin diode switches Slide show view ppt on android