CSCI 4620/8626. Computer Graphics Illumination Models and Surface Rendering Methods (Chapter 17)
|
|
- Clarence Shaw
- 5 years ago
- Views:
Transcription
1 CSCI 4620/8626 Computer Graphics Illumination Models and Surface Rendering Methods (Chapter 17) Last update: Realism! Realistic displays of a scene use! Perspective projections of objects! Application of natural lighting effects to visible surfaces! An illumination model (or lighting model, or shading model) is used to calculate the color of an illuminated position on the surface of an object.! A surface-rendering method uses these color calculations to determine pixel colors for all projected positions in a scene.! Photorealism requires two elements:! Accurate representation of surface properties! Good physical description of a scene s lighting effects (e.g. reflections, transparency, surface texture, and shadows) 2 1
2 Modeling Lighting Effects! In general, modeling lighting effects is complex, and involves physics and psychology.! Physical models involve! Material properties (opaque/transparent, shiny/dull, texture, etc.)! Object position relative to light sources and other objects! Features of light sources! Illumination models are often approximations to reduce computations. 3 Light Sources! A light source is any object emitting radiant energy contributing to the lighting effects in a scene.! Light sources may have a variety of shapes, and may also serve as reflectors of light.! Typical light source properties:! Position in the scene! Color and direction of emitted light (perhaps multiple)! Shape! Reflective properties! In many cases, simple models are used to avoid extensive calculation. 4 2
3 Point Light Sources! These are the simplest models of light sources.! They emit a specified color along radially diverging paths (see the next slide).! They are appropriate to model light sources that are small compared to other objects in a scene, or light sources that are far away.! The position of the point light source determines which scene objects are illuminated and the light direction to a selected object surface position. 5 Figure 17-1 Diverging ray paths from a point light source. 3
4 Infinitely Distant Light Sources! A large light source (like the sun) that is far from the scene can be modeled as a point source, but there s little variation in directional effects.! Such sources illuminate the scene from only one direction (see the next slide).! This can be simulated by assigning a color and a fixed direction for light rays emanating from the source; only the emission direction vector and color are needed for the illumination calculations. 7 Figure 17-2 Light rays from an infinitely distant light source illuminate an object along nearly parallel light paths. 4
5 Radial Intensity Attenuation! Light intensity from a source obeys an inverse square law.! That is, the intensity at a distance d is attenuated by a factor of 1/d 2.! A surface close to the source receives higher incident light than a more distant surface.! If this were not the case, then all objects would be similarly illuminated, and overlapping objects at different distances might not be distinguishable. 9 Realistic Attenuation! Since most light sources are not really point sources, a pure inverse square law might not yield realism as expected.! To get more realistic displays, it s often appropriate to use an inverse quadratic function of the distance that includes a linear term: f = 1 / (a 0 + a 1 d + a 2 d 2 )! The numerical values can then be adjusted as necessary to yield realistic results.! This approach is not used if the source is at infinity. 10 5
6 Directional Light Sources and Spotlight Effects! Local sources can be modified easily to produce directional, or spotlight, beams of light.! If an object is outside the directional beam of light, it can be excluded from illumination by that source.! One easy way to produce such effects is to add a vector and an angular limit θ measured from the vector direction, as well as position and color. 11 Figure 17-3 A directional point light source. The unit light-direction vector defines the axis of a light cone, and angle θ l defines the angular extent of the circular cone. 6
7 Angular Intensity Attenuation! For a directional light source, the light intensity is attenuated (or can be attenuated)! as a function of distance from the source, and! as a function of the angular distance from the direction vector for the source! There is no attenuation if the light source isn t directional (that is, not a spotlight).! Attenuation is 100% if the object is outside the spotlight cone. 13 Figure 17-4 An object illuminated by a directional point light source. 7
8 Extended Light Sources! Large light sources close to objects in a scene (like a large neon lamp see next slide) can be approximated as a light-emitting surface.! The Warn model provide a method for producing studio lighting effects.! It uses sets of point emitters with various parameters. 15 Figure 17-5 An object illuminated by a large nearby light source. 8
9 Surface Lighting Effects! When light is incident on an opaque surface! part of it is reflected, and! part of it is absorbed.! Diffuse reflection from a rough or grainy surface tends to scatter reflected light in all directions.! Specular reflection occurs when reflected light is concentrated into a highlight, or bright spot. This is more pronounced on shiny surfaces.! Background or ambient light is due to reflected light from nearby objects that are illuminated. 17 Figure 17-6 Diffuse reflections from a surface. 9
10 Figure 17-7 Specular reflection superimposed on diffuse reflection vectors. Figure 17-8 Surface lighting effects are produced by a combination of illumination from light sources and reflections from other surfaces. 10
11 Basic Illumination Models (1)! The basic illumination model included in most graphics systems provides point sources.! Many systems also include functions for dealing with directional lighting and extended light sources.! Ambient light: systems often provide a method for setting a general brightness level for a scene.! Diffuse reflection: reflection from a surface can often be modeled as perfect (the same in all directions). 21 Basic Illumination Models (2)! The goal of the basic illumination model is to develop a mathematical expression for I (illumination) at a point that is reasonably easy to compute.! I (the mathematical expression) can contain various terms resulting from different kinds of light sources, reflections, attenuation, surface properties, etc
12 Figure 17-9 Radiant energy from a surface area element da in direction Φ N relative to the surface normal direction is proportional to cos ϕ N. Figure A surface that is perpendicular to the direction of the incident light (a) is more illuminated than an equal-sized surface at an oblique angle (b) to the incoming light direction. 12
13 Figure An illuminated area A projected perpendicular to the path of incoming light rays. This perpendicular projection has an area equal to A cos θ. Figure Angle of incidence θ between the unit light-source direction vector L and the unit normal vector N at a surface position. 13
14 Specular Reflection, Phong Model! The bright spot in specular reflection from a shiny surface is the result of light in a concentrated region around the specular reflection angle.! A model developed by Phong Bui Thong, called the Phong model, mathematically sets the intensity of specular reflection proportional to cos n s ϕ! n s is as small as 1 for a dull surface, or large (e.g. 100 or more) for a shiny surface. 27 Figure Specular reflection angle equals angle of incidence θ. 14
15 Figure Modeling specular reflections (shaded area) with parameter n s. Figure Plots of cos n s ϕ using five different values for the specular exponent n s. 15
16 Figure Approximate variation of the specularreflection coefficient for different materials, as a function of the angle of incidence. Non-planar Surfaces! To easily compute specular reflection from nonplanar surfaces, models often compute N!H, where N is a surface normal and H is the orientation direction for the surface that would produce maximum specular reflection in the viewing direction.! This computation is easier than computing N!R (where R is the reflection vector), since both N and R have variable components, and H is fixed
17 Figure The projection of either L or R onto the direction of the normal vector N has a magnitude equal to N L. Figure Halfway vector H along the bisector of the angle between L and V. 17
18 Surface Light Emissions! Surface light can be included in a model by including a term for constant simulated background lighting.! This simplistic model can be improved in a variety of ways, involving ray tracing and radiosity models.! Unfortunately, we don t have time to cover all of these here. 35 RGB Color Considerations! The light in an RGB color description is, as expected, a 3-element vector that designates the red, green, and blue components.! Although scenes are often illuminated with white light, other colors can be used for special effects.! Surfaces can also be specified with various color reflectivity properties that affect the intensity of light reflected from the surface
19 Transparent Surfaces! At a transparent surface, some incident light is reflected, and some passes through the surface.! The light passing through the surface is scattered, so the objects in the background may be seen as blurred objects.! The angle of lighting changes when it passes through regions with different materials.! Snell s law specifies how this refraction affects the angle. 37 Figure Light emission from a transparent surface is in general a combination of reflected and transmitted light. 19
20 Figure Reflection direction R and refraction (transmission) direction T for a ray of light incident upon a surface with index of refraction η r. Figure Refraction of light through a pane of glass. The emerging refracted ray travels along a path that is parallel to the incident light path (dashed line). 20
21 Table 17-1 Average Index of Refraction for Common Materials Figure The intensity of a background object at point P can be combined with the reflected intensity off the surface of a transparent object along a perpendicular projection line (dashed). 21
22 Atmospheric Effects! Various effects on of the atmosphere on lighting can be modeled.! An obvious effect is due to haze (from smoke, fog, dust, etc.), and causes colors to fade and objects to appear dimmer. This is often modeled with an exponential attenuation function.! The atmosphere can also have a color, such as smoke in a room being slate-gray or perhaps pale blue. 43 Shadows! Visibility detection methods can be used to locate regions that are not illuminated.! These regions can then have their shadows treated as surface patterns.! These surface patterns can be stored in pattern arrays, and are valid for any viewing position as long as the light sources are not changed
23 Camera Parameters! The general model assumes the scene is being viewed as through a pinhole camera.! For realism, it is appropriate to consider objects that are in focus, and objects that are not in focus, depending on the depth distribution of objects in the scene.! The out-of-focus positions can be simulated by projecting each position to an area covering multiple pixel positions, with the object colors merged to produce a blurred pattern. 45 Displaying Light Intensities! The real world has a continuous range of light intensities; computers can display only a limited number of intensities.! Therefore intensities calculated by a model must be mapped to one of a finite number of intensities.! Humans perceive light intensity in the same way as sound: on a logarithmic scale.! It is relatively easy, given monitor and display device characteristics, to determine how to map calculated intensities to system intensities
24 Gamma Correction, Video Lookup Tables! When displayed on a monitor, perceived brightness variations are nonlinear, but illumination models produce a linear variation for intensity values.! To compensate, graphics systems use a video lookup table to adjust linear intensity values; these are computed using the so-called gamma correction of intensity. (See the text for the equation.) 47 Figure A typical monitor response curve, showing the variation in displayed intensity (or brightness ) as a function of the normalized electron-gun voltage. 24
25 Figure A video lookup correction curve for mapping a normalized intensity value to a normalized electron-gun voltage, using gamma correction with γ = 2.2. Halftone Patterns, Dithering! If a system has very few intensity levels, an apparent increase in the number of available intensities can be obtained by using multiple pixel positions to display the intensity of each logical pixel in a scene.! Our eyes tend to integrate or average fine detail into an overall intensity.! Newspapers and books often use halftoning; the reproduced pictures are called halftones
26 Figure A continuous-tone photograph (a) printed with two intensity levels (b), four intensity levels (c), and eight intensity levels (d). Figure An enlarged section of a photograph reproduced with a halftoning method, showing how tones are represented with dots of varying sizes. 26
27 Figure A set of 2 2 pixel grid patterns that can be used to display five intensity levels on a bilevel system, showing the on pixels as green circles. The intensity values that are mapped to each of the grid patterns are listed below the pixel arrays. Figure A set of 3 3 pixel grid patterns that can be used to display 10 intensities on a bilevel system, showing the on pixels as green circles. The intensity values that are mapped to each of the grid patterns are listed below the pixel arrays. 27
28 Figure For a 3 3 pixel grid, the pattern in (a) is better than any of the symmetrical patterns in (b) for representing the third intensity level above 0. Figure Halftone grid patterns with isolated pixels that cannot be reproduced effectively on some hardcopy devices. 28
29 Figure Intensity representations 0 through 12 obtained with halftone-approximation patterns using 2 2 pixel grids on a four-level system, with pixelintensity levels labeled 0 through 3. Figure A 2 2 pixel-grid pattern for displaying RGB colors. 29
30 Figure Fraction of intensity error that can be distributed to neighboring pixel positions using an error-diffusion scheme. Figure One possible distribution scheme for dividing the intensity array into 64 dot-diffusion classes numbered from 0 through
31 Polygon Rendering Methods! To reduce processing time, polygon surfaces are rendered by calculating surface light intensity only at polygon vertices.! The vertex intensities are then interpolated to the other positions on the polygon surface.! There are other more accurate techniques (raytracing was mentioned earlier).! Here we consider only scan-line surface-rendering. 61 Figure The normal vector at vertex V is calculated as the average of the surface normals for each polygon sharing that vertex. 31
32 Figure For Gouraud surface rendering, the intensity at point 4 is linearly interpolated from the intensities at vertices 1 and 2. The intensity at point 5 is linearly interpolated from intensities at vertices 2 and 3. An interior point p is then assigned an intensity value that is linearly interpolated from intensities at positions 4 and 5. Figure Incremental interpolation of intensity values along a polygon edge for successive scan lines. 32
33 Phong Surface Rendering! The Phong surface rendering technique interpolates normal vectors instead of intensity values.! This technique is more accurate than the Gouraud method, but requires more calculation.! A fast Phong surface rendering technique reduces the computation time by using a truncated Taylor series expansion for calculating surface normal vectors. 65 Figure Interpolation of surface normals along a polygon edge. 33
34 OpenGL Illumination Functions! OpenGL provides a variety of techniques for setting up point sources, specifying surface-reflection coefficients, and setting other values for the basic illumination model.! In addition, other things, like transparency, flat surface rendering, or Gouraud surface rendering can be simulated. 67 Point Sources! There are at least 8 point sources available, with IDs (names) GL_LIGHT0 GL_LIGHT7. (More may be available in some systems.)! Properties of these sources are set using gllight* (lightid, property, value); where * is i, f, iv, or fv (int, float, int/float vector).! We enable (or disable) point sources individually: glenable (lightid);! We must also enable lighting globally: glenable (GL_LIGHTING); 68 34
35 Light Source Position! For a local source: Glfloat L1[] = {2, 0, 3, 1}; // note: xyz pos + 1 gllightfv(gl_light1,gl_position,l1);! For a distant source: Glfloat L2[] = {0, 1, 0, 0}; // note: xyz dir + 0 gllightfv(gl_light2,gl_position,l2);! Default: distant source with light rays traveling in the z direction. 69 Light Colors! Specify a color vector: Glfloat white[] = {1,1,1,1}; // RBG values + alpha! Specify a lighting type: gllightfv(gl_light0,gl_ambient,white); gllightfv(gl_light0,gl_diffuse,white); gllightfv(gl_light0,gl_specular,white);! There are defaults for each of the lighting sources if they aren t specified.! Note that if color blending is enabled, the alpha parameter can be used as a factor
36 Radial Intensity Attenuation! Various parameters can be specified for attenuation: gllightf(gl_light0,gl_constant_attenuation, 1.5); gllightf(gl_light0,gl_linear_attenuation, 0.75); gllightf(gl_light0,gl_quadratic_attenuation, 0.4);! These are the parameters (a 0, a 1, and a 2 ) used in the realistic attenuation model shown earlier (slide 10): f = 1 / (a 0 + a 1 d + a 2 d 2 ) 71 Directional Light Sources (Spotlights)! Specify the light direction vector: GLfloat dv[] = {1,0,0}; // positive x direction! Specify parameters: gllightfv(gl_light3,gl_spot_direction,dv); gllightf(gl_light3,gl_spot_cutoff,30.0); gllightf(gl_light3,gl_spot_exponent,2.5);! These parameters show light source 3 with a cone in the +x direction, a cone angle of 30 degrees, and the attenuation exponent of 2.5; see the figure on the next slide
37 Figure A circular cone of light emitted from an OpenGL light source. The angular extent of the light cone, measured from the cone axis, is θ l, and the angle from the axis to an object direction vector is labeled as α. OpenGL Global Lighting Params! To set a global parameter: gllightmodel* (paramname, paramvalue); As usual, the * is replaced by i, f, iv, or fv.! Background lighting: glfloat ga[] = {0,0,0.3,1}; gllightmodelfv(gl_light_model_ambient,ga);! Specular reflection uses (by default) a constant vector in the +z direction for specular reflection calculations. This can be turned off, and then the actual viewing position is used: gllightmodeli(gl_light_model_local_viewer,gl_true); 74 37
38 More Global Parameters! To enable combining texture patterns and specular effects: gllightmodeli(gl_light_model_color_control, GL_SEPARATE_SPECULAR_COLOR);! To apply lighting calculations using material properties of both the front and back of surfaces: gllightmodeli(gl_light_model_two_side,gl_true); 75 OpenGL Surface-Property Function! To set reflection coefficients and other optical properties of surfaces: glmaterial* (face, property, value);! face is GL_FRONT, GL_BACK, or GL_FRONT_AND_BACK.! To specify light emission: glmaterialfv(gl_front,gl_emission,colorvec); where colorvec is an RGBA value
39 Other Surface Properties! Surface reflection can be specified using the parameter GL_AMBIENT_AND_DIFFUSE; a 4- element vector specifies the diffuse coefficients.! Similarly, GL_SPECULAR can be used as the property, with a 4-element vector giving the specular coeffients.! The shininess of a surface (or surfaces) can be set with the GL_SHININESS property; if requires only a single parameter value. 77 Atmospheric Effects! Fog is the general atmospheric effect provided by OpenGL.! It must be enabled if it is to be effective: glenable(gl_fog);! Then various parameters can be set: glfog* (atmoparameter, paramvalue) where atmoparameter is the name of a parameter and paramvalue provides the value
40 Fog Parameters and Values! GL_FOG_COLOR, with a 4-element vector value, specifies the color (and alpha value) for the fog.! GL_FOG_MODE is used to set the atmosphere attenuation function. The integer parameter value may be GL_EXP (e -ρd ) or GL_EXP2 (e -(ρd)2 ), where d is the distance of the object from the viewing position, and ρ is a fog density parameter, set like this: glfog*(gl_fog_density, atmodensity); 79 Transparency (1)! Some transparency effects in OpenGL can be achieved with the color blending features.! But transparency implementation, in general, is not straightforward.! glcolor4f(r,g,b,a); is used to set the color and alpha parameter to be used for drawing, which can be used to effect transparency:! A = 1.0 would be used for a completely transparent surface.! A = 0.0 would be used for a completely opaque surface
41 Transparency (2)! Now we enable blending: glenable (GL_BLEND);! The blend function used is glblendfunc(gl_one_minus_src_alpha, GL_SRC_ALPHA); This causes the surface color of objects further away from the viewer to be combined with the color of closer objects that overlap.! Example: if the more distant object has A = 0.3, then an overlapped objects color is 30% of the old object and 70% of the object reflection color. 81 Surface Rendering Functions (1)! glshademodel (surfrenderingmethod); is used to specify either constant-intensity surface rendering (GL_FLAT) or Gouraud surface rendering (GL_SMOOTH). No support is present for Phong surface rendering, ray tracing, or radiosity methods.! Surface normals are used to calculate the colors of polygon surfaces in a tessellated curved surface. The Cartesian coordinate components of the normals are defined using: glnormal3* (Nx, Ny, Nz); where Nx, Ny, and Nz range from -1.0 to
42 Surface Rendering Functions (2)! For flat surface rendering, only one normal need be specified. This can be done before the specification of the three (or more) vertices for the polygon (e.g. outside the glbegin/glend code).! For Gouraud surface rendering, each vertex must have its normal specified, so to specify a triangle we d need to put 3 pairs of glnormal/glvertex calls between glbegin and glend.! If normals are unit vectors, computation can be reduced. To do this: glenable(gl_normalize); 83 OpenGL Halftoning Operations! Although they re hardware dependent, and probably not useful on systems with full-color graphics capabilities, halftone routines can be activated and deactivated with the somewhat expected functions:! glenable (GL_DITHER); // enable halftone routines! gldisable (GL_DITHER); // disable halftone routines 84 42
43 Table 17-2 Continued 43
Lighting Models. CS116B Chris Pollett Mar 21, 2004.
Lighting Models CS116B Chris Pollett Mar 21, 2004. Outline Overview Light Sources Surface Lighting Effect Basic Illumination Models Overview An illumination model (lighting model) is used to calculate
More informationToday s class. Simple shadows Shading Lighting in OpenGL. Informationsteknologi. Wednesday, November 21, 2007 Computer Graphics - Class 10 1
Today s class Simple shadows Shading Lighting in OpenGL Wednesday, November 21, 27 Computer Graphics - Class 1 1 Simple shadows Simple shadows can be gotten by using projection matrices Consider a light
More informationCEng 477 Introduction to Computer Graphics Fall
Illumination Models and Surface-Rendering Methods CEng 477 Introduction to Computer Graphics Fall 2007 2008 Illumination Models and Surface Rendering Methods In order to achieve realism in computer generated
More informationINF3320 Computer Graphics and Discrete Geometry
INF3320 Computer Graphics and Discrete Geometry Visual appearance Christopher Dyken and Martin Reimers 23.09.2009 Page 1 Visual appearance Real Time Rendering: Chapter 5 Light Sources and materials Shading
More informationCS Computer Graphics: Illumination and Shading I
CS 543 - Computer Graphics: Illumination and Shading I by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Illumination and Shading Problem: Model light/surface point interactions to determine
More informationCS Computer Graphics: Illumination and Shading I
CS 543 - Computer Graphics: Illumination and Shading I by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Illumination and Shading Problem: Model light/surface point interactions to determine
More informationComputer Graphics. Illumination Models and Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL
Computer Graphics Chapter 10 llumination Models and Surface-Rendering Methods Somsak Walairacht, Computer Engineering, KMTL Outline Light Sources Surface Lighting Effects Basic llumination Models Polygon
More informationChapter 10. Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL
Computer Graphics Chapter 10 llumination Models and Surface-Rendering Methods Somsak Walairacht, Computer Engineering, KMTL 1 Outline Light Sources Surface Lighting Effects Basic llumination Models Polygon
More informationComputer Graphics. Illumination and Shading
() Illumination and Shading Dr. Ayman Eldeib Lighting So given a 3-D triangle and a 3-D viewpoint, we can set the right pixels But what color should those pixels be? If we re attempting to create a realistic
More informationIllumination Model. The governing principles for computing the. Apply the lighting model at a set of points across the entire surface.
Illumination and Shading Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL computes illumination at vertices illumination Shading
More informationLocal Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller
Local Illumination CMPT 361 Introduction to Computer Graphics Torsten Möller Graphics Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Interaction Color Texture/ Realism
More informationSurface Rendering Methods
Surface Rendering Methods 6 th Week, 2008 Sun-Jeong Kim Polygon Rendering Methods Determining the surface intensity at every projected pixel position using an illumination model Light-material interactions
More informationIllumination and Shading
Illumination and Shading Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL computes illumination at vertices illumination Shading
More informationLecture 15: Shading-I. CITS3003 Graphics & Animation
Lecture 15: Shading-I CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Learn that with appropriate shading so objects appear as threedimensional
More informationOverview. Shading. Shading. Why we need shading. Shading Light-material interactions Phong model Shading polygons Shading in OpenGL
Overview Shading Shading Light-material interactions Phong model Shading polygons Shading in OpenGL Why we need shading Suppose we build a model of a sphere using many polygons and color it with glcolor.
More informationCS 325 Computer Graphics
CS 325 Computer Graphics 04 / 02 / 2012 Instructor: Michael Eckmann Today s Topics Questions? Comments? Illumination modelling Ambient, Diffuse, Specular Reflection Surface Rendering / Shading models Flat
More informationToday we will start to look at illumination models in computer graphics
1 llumination Today we will start to look at illumination models in computer graphics Why do we need illumination models? Different kinds lights Different kinds reflections Basic lighting model 2 Why Lighting?
More informationThree-Dimensional Graphics V. Guoying Zhao 1 / 55
Computer Graphics Three-Dimensional Graphics V Guoying Zhao 1 / 55 Shading Guoying Zhao 2 / 55 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material
More informationCS5620 Intro to Computer Graphics
So Far wireframe hidden surfaces Next step 1 2 Light! Need to understand: How lighting works Types of lights Types of surfaces How shading works Shading algorithms What s Missing? Lighting vs. Shading
More informationTopic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source
Topic 9: Lighting & Reflection models Lighting & reflection The Phong reflection model diffuse component ambient component specular component Spot the differences Terminology Illumination The transport
More informationReflection and Shading
Reflection and Shading R. J. Renka Department of Computer Science & Engineering University of North Texas 10/19/2015 Light Sources Realistic rendering requires that we model the interaction between light
More informationLighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch
15-462 Computer Graphics I Lecture 7 Lighting and Shading February 12, 2002 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/ Light Sources Phong Illumination Model
More informationToday. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models
Computergrafik Thomas Buchberger, Matthias Zwicker Universität Bern Herbst 2008 Today Introduction Local shading models Light sources strategies Compute interaction of light with surfaces Requires simulation
More informationIllumination and Shading
Illumination and Shading Illumination (Lighting)! Model the interaction of light with surface points to determine their final color and brightness! The illumination can be computed either at vertices or
More informationComp 410/510 Computer Graphics. Spring Shading
Comp 410/510 Computer Graphics Spring 2017 Shading Why we need shading Suppose we build a model of a sphere using many polygons and then color it using a fixed color. We get something like But we rather
More informationLighting. Figure 10.1
We have learned to build three-dimensional graphical models and to display them. However, if you render one of our models, you might be disappointed to see images that look flat and thus fail to show the
More informationToday. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models
Computergrafik Matthias Zwicker Universität Bern Herbst 2009 Today Introduction Local shading models Light sources strategies Compute interaction of light with surfaces Requires simulation of physics Global
More informationColor and Light CSCI 4229/5229 Computer Graphics Fall 2016
Color and Light CSCI 4229/5229 Computer Graphics Fall 2016 Solar Spectrum Human Trichromatic Color Perception Color Blindness Present to some degree in 8% of males and about 0.5% of females due to mutation
More informationTopic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component
Topic 9: Lighting & Reflection models Lighting & reflection The Phong reflection model diffuse component ambient component specular component Spot the differences Terminology Illumination The transport
More informationShading I Computer Graphics I, Fall 2008
Shading I 1 Objectives Learn to shade objects ==> images appear threedimensional Introduce types of light-material interactions Build simple reflection model Phong model Can be used with real time graphics
More informationWhy we need shading?
Why we need shading? Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like But we want Light-material interactions cause each point to have a different
More informationLight Transport Baoquan Chen 2017
Light Transport 1 Physics of Light and Color It s all electromagnetic (EM) radiation Different colors correspond to radiation of different wavelengths Intensity of each wavelength specified by amplitude
More informationVirtual Reality for Human Computer Interaction
Virtual Reality for Human Computer Interaction Appearance: Lighting Representation of Light and Color Representation of Light and Color Do we need to represent all I! to represent a color C(I)? Representation
More informationComputer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)
Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Why do we need Lighting & shading? Sphere
More informationComputer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model
Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Why do we need Lighting
More informationIllumination Models & Shading
Illumination Models & Shading Lighting vs. Shading Lighting Interaction between materials and light sources Physics Shading Determining the color of a pixel Computer Graphics ZBuffer(Scene) PutColor(x,y,Col(P));
More informationIllumination & Shading I
CS 543: Computer Graphics Illumination & Shading I Robert W. Lindeman Associate Professor Interactive Media & Game Development Department of Computer Science Worcester Polytechnic Institute gogo@wpi.edu
More informationIllumination & Shading: Part 1
Illumination & Shading: Part 1 Light Sources Empirical Illumination Shading Local vs Global Illumination Lecture 10 Comp 236 Spring 2005 Computer Graphics Jargon: Illumination Models Illumination - the
More informationCSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016
CSE 167: Introduction to Computer Graphics Lecture #6: Lights Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements Thursday in class: midterm #1 Closed book Material
More informationShading and Illumination
Shading and Illumination OpenGL Shading Without Shading With Shading Physics Bidirectional Reflectance Distribution Function (BRDF) f r (ω i,ω ) = dl(ω ) L(ω i )cosθ i dω i = dl(ω ) L(ω i )( ω i n)dω
More informationReading. Shading. An abundance of photons. Introduction. Required: Angel , 6.5, Optional: Angel 6.4 OpenGL red book, chapter 5.
Reading Required: Angel 6.1-6.3, 6.5, 6.7-6.8 Optional: Shading Angel 6.4 OpenGL red book, chapter 5. 1 2 Introduction An abundance of photons So far, we ve talked exclusively about geometry. Properly
More informationCPSC 314 LIGHTING AND SHADING
CPSC 314 LIGHTING AND SHADING UGRAD.CS.UBC.CA/~CS314 slide credits: Mikhail Bessmeltsev et al 1 THE RENDERING PIPELINE Vertices and attributes Vertex Shader Modelview transform Per-vertex attributes Vertex
More informationCENG 477 Introduction to Computer Graphics. Ray Tracing: Shading
CENG 477 Introduction to Computer Graphics Ray Tracing: Shading Last Week Until now we learned: How to create the primary rays from the given camera and image plane parameters How to intersect these rays
More informationFrom Graphics to Visualization
From Graphics to Visualization Introduction Light Sources Surface Lighting Effects Basic (Local ) Illumination Models Polgon-Rendering Methods Texture Mapping Transparenc and Blending Visualization Pipeline
More informationComputer Graphics. Shading. Based on slides by Dianna Xu, Bryn Mawr College
Computer Graphics Shading Based on slides by Dianna Xu, Bryn Mawr College Image Synthesis and Shading Perception of 3D Objects Displays almost always 2 dimensional. Depth cues needed to restore the third
More informationVisualisatie BMT. Rendering. Arjan Kok
Visualisatie BMT Rendering Arjan Kok a.j.f.kok@tue.nl 1 Lecture overview Color Rendering Illumination 2 Visualization pipeline Raw Data Data Enrichment/Enhancement Derived Data Visualization Mapping Abstract
More informationIllumination Models and Surface-Rendering Methods. Chapter 10
Illumination Models and Surface-Rendering Methods Chapter 10 Illumination and Surface- Rendering Given scene specifications object positions, optical properties of the surface, viewer position, viewing
More informationLighting and Shading
Lighting and Shading Today: Local Illumination Solving the rendering equation is too expensive First do local illumination Then hack in reflections and shadows Local Shading: Notation light intensity in,
More informationColor and Light. CSCI 4229/5229 Computer Graphics Summer 2008
Color and Light CSCI 4229/5229 Computer Graphics Summer 2008 Solar Spectrum Human Trichromatic Color Perception Are A and B the same? Color perception is relative Transmission,Absorption&Reflection Light
More informationCS770/870 Spring 2017 Color and Shading
Preview CS770/870 Spring 2017 Color and Shading Related material Cunningham: Ch 5 Hill and Kelley: Ch. 8 Angel 5e: 6.1-6.8 Angel 6e: 5.1-5.5 Making the scene more realistic Color models representing the
More informationAmbient reflection. Jacobs University Visualization and Computer Graphics Lab : Graphics and Visualization 407
Ambient reflection Phong reflection is a local illumination model. It only considers the reflection of light that directly comes from the light source. It does not compute secondary reflection of light
More informationIllumination and Shading ECE 567
Illumination and Shading ECE 567 Overview Lighting Models Ambient light Diffuse light Specular light Shading Models Flat shading Gouraud shading Phong shading OpenGL 2 Introduction To add realism to drawings
More informationCS3500 Computer Graphics Module: Lighting and Shading
Computer Graphics Module: Lighting and Shading P. J. Narayanan Spring 2009 We know which pixels of the frame buffer belongs to which object after visibility and scan conversion. What colour to give to
More informationIllumination & Shading
Illumination & Shading Goals Introduce the types of light-material interactions Build a simple reflection model---the Phong model--- that can be used with real time graphics hardware Why we need Illumination
More information蔡侑庭 (Yu-Ting Tsai) National Chiao Tung University, Taiwan. Prof. Wen-Chieh Lin s CG Slides OpenGL 2.1 Specification
蔡侑庭 (Yu-Ting Tsai) Department of Computer Science National Chiao Tung University, Taiwan Prof. Wen-Chieh Lin s CG Slides OpenGL 2.1 Specification OpenGL Programming Guide, Chap. 5 2 http://caig.cs.nctu.edu.tw/course/cg2007/files
More informationIntroduction to Computer Graphics 7. Shading
Introduction to Computer Graphics 7. Shading National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor Textbook: Hearn and Baker, Computer Graphics, 3rd Ed., Prentice Hall Ref: E.Angel, Interactive
More informationRendering. Illumination Model. Wireframe rendering simple, ambiguous Color filling flat without any 3D information
llumination Model Wireframe rendering simple, ambiguous Color filling flat without any 3D information Requires modeling interaction of light with the object/surface to have a different color (shade in
More informationLighting. CSC 7443: Scientific Information Visualization
Lighting Why Lighting? What light source is used and how the object response to the light makes difference Ocean looks bright bluish green in sunny day but dim gray green in cloudy day Lighting gives you
More informationVirtual Reality for Human Computer Interaction
Virtual Reality for Human Computer Interaction Appearance: Lighting Representation of Light and Color Do we need to represent all I! to represent a color C(I)? No we can approximate using a three-color
More informationComputer Graphics Lighting
Lighting 1 Mike Bailey mjb@cs.oregonstate.edu This work is licensed under a Creative Commons Attribution-NonCommercial- NoDerivatives 4.0 International License Lighting.pptx Why Do We Care About Lighting?
More informationComputer Graphics Lighting. Why Do We Care About Lighting?
Lighting 1 Mike Bailey mjb@cs.oregonstate.edu This work is licensed under a Creative Commons Attribution-NonCommercial- NoDerivatives 4.0 International License Lighting.pptx Why Do We Care About Lighting?
More informationCMSC427 Shading Intro. Credit: slides from Dr. Zwicker
CMSC427 Shading Intro Credit: slides from Dr. Zwicker 2 Today Shading Introduction Radiometry & BRDFs Local shading models Light sources Shading strategies Shading Compute interaction of light with surfaces
More informationLights, Colour and Materials In OpenGL
Illumination Models Lights, Colour and Materials In OpenGL Illumination models are used to generate the colour of an object s surface at a given point on that surface. The factors that govern the illumination
More informationComputer Graphics. Illumination and Shading
Rendering Pipeline modelling of geometry transformation into world coordinates placement of cameras and light sources transformation into camera coordinates backface culling projection clipping w.r.t.
More informationReading. Shading. Introduction. An abundance of photons. Required: Angel , Optional: OpenGL red book, chapter 5.
Reading Required: Angel 6.1-6.5, 6.7-6.8 Optional: Shading OpenGL red book, chapter 5. 1 2 Introduction So far, we ve talked exclusively about geometry. What is the shape of an obect? How do I place it
More informationShading. Brian Curless CSE 557 Autumn 2017
Shading Brian Curless CSE 557 Autumn 2017 1 Reading Optional: Angel and Shreiner: chapter 5. Marschner and Shirley: chapter 10, chapter 17. Further reading: OpenGL red book, chapter 5. 2 Basic 3D graphics
More informationECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014
ECS 175 COMPUTER GRAPHICS Ken Joy Winter 2014 Shading To be able to model shading, we simplify Uniform Media no scattering of light Opaque Objects No Interreflection Point Light Sources RGB Color (eliminating
More informationGraphics Hardware and Display Devices
Graphics Hardware and Display Devices CSE328 Lectures Graphics/Visualization Hardware Many graphics/visualization algorithms can be implemented efficiently and inexpensively in hardware Facilitates interactive
More informationGraphics for VEs. Ruth Aylett
Graphics for VEs Ruth Aylett Overview VE Software Graphics for VEs The graphics pipeline Projections Lighting Shading VR software Two main types of software used: off-line authoring or modelling packages
More informationC O M P U T E R G R A P H I C S. Computer Graphics. Three-Dimensional Graphics V. Guoying Zhao 1 / 65
Computer Graphics Three-Dimensional Graphics V Guoying Zhao 1 / 65 Shading Guoying Zhao 2 / 65 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material
More informationShading. Slides by Ulf Assarsson and Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology
Shading Slides by Ulf Assarsson and Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Overview of today s lecture l A simple most basic real-time lighting model
More informationSimple Lighting/Illumination Models
Simple Lighting/Illumination Models Scene rendered using direct lighting only Photograph Scene rendered using a physically-based global illumination model with manual tuning of colors (Frederic Drago and
More informationCS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside
CS130 : Computer Graphics Lecture 8: Lighting and Shading Tamar Shinar Computer Science & Engineering UC Riverside Why we need shading Suppose we build a model of a sphere using many polygons and color
More informationGraphics and Visualization
International University Bremen Spring Semester 2006 Recap Hierarchical Modeling Perspective vs Parallel Projection Representing solid objects Displaying Wireframe models is easy from a computational
More informationCSE 167: Introduction to Computer Graphics Lecture #7: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015
CSE 167: Introduction to Computer Graphics Lecture #7: Lights Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015 Announcements Thursday in-class: Midterm Can include material
More information9. Illumination and Shading
9. Illumination and Shading Approaches for visual realism: - Remove hidden surfaces - Shade visible surfaces and reproduce shadows - Reproduce surface properties Texture Degree of transparency Roughness,
More informationCSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011
CSE 167: Introduction to Computer Graphics Lecture #7: Color and Shading Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 Announcements Homework project #3 due this Friday,
More informationGiven: scene specification (object positions, optical properties p of the surface, viewer position, viewing direction, )
Illumination and Shading Illumination and Shading Given: scene specification (object positions, optical properties p of the surface, viewer position, viewing direction, ) Find: intensity for each pixel
More informationLecture 17: Shading in OpenGL. CITS3003 Graphics & Animation
Lecture 17: Shading in OpenGL CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Introduce the OpenGL shading methods - per vertex shading
More informationIllumination and Shading
Illumination and Shading Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/14/07 1 From last time Texture mapping overview notation wrapping Perspective-correct interpolation Texture
More informationLessons Learned from HW4. Shading. Objectives. Why we need shading. Shading. Scattering
Lessons Learned from HW Shading CS Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Only have an idle() function if something is animated Set idle function to NULL, when
More informationCS 4600 Fall Utah School of Computing
Lighting CS 4600 Fall 2015 Utah School of Computing Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build a simple reflection
More informationOrthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015
Orthogonal Projection Matrices 1 Objectives Derive the projection matrices used for standard orthogonal projections Introduce oblique projections Introduce projection normalization 2 Normalization Rather
More informationComplex Shading Algorithms
Complex Shading Algorithms CPSC 414 Overview So far Rendering Pipeline including recent developments Today Shading algorithms based on the Rendering Pipeline Arbitrary reflection models (BRDFs) Bump mapping
More informationHomework #2. Shading, Ray Tracing, and Texture Mapping
Computer Graphics Prof. Brian Curless CSE 457 Spring 2000 Homework #2 Shading, Ray Tracing, and Texture Mapping Prepared by: Doug Johnson, Maya Widyasari, and Brian Curless Assigned: Monday, May 8, 2000
More informationCSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011
CSE 167: Introduction to Computer Graphics Lecture #8: Lighting Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 Announcements Homework project #4 due Friday, October 28 Introduction:
More informationIntroduction to Visualization and Computer Graphics
Introduction to Visualization and Computer Graphics DH2320, Fall 2015 Prof. Dr. Tino Weinkauf Introduction to Visualization and Computer Graphics Visibility Shading 3D Rendering Geometric Model Color Perspective
More informationLIGHTING AND SHADING
DH2323 DGI15 INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION LIGHTING AND SHADING Christopher Peters HPCViz, KTH Royal Institute of Technology, Sweden chpeters@kth.se http://kth.academia.edu/christopheredwardpeters
More informationSung-Eui Yoon ( 윤성의 )
CS380: Computer Graphics Illumination and Shading Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Course Objectives (Ch. 10) Know how to consider lights during rendering models
More informationIntroduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading)
Lecture 9 Graphics pipeline (rasterization and shading) Graphics pipeline - part 1 (recap) Perspective projection by matrix multiplication: x pixel y pixel z canonical 1 x = M vpm per M cam y z 1 This
More informationw Foley, Section16.1 Reading
Shading w Foley, Section16.1 Reading Introduction So far, we ve talked exclusively about geometry. w What is the shape of an object? w How do I place it in a virtual 3D space? w How do I know which pixels
More informationCPSC / Illumination and Shading
CPSC 599.64 / 601.64 Rendering Pipeline usually in one step modelling of geometry transformation into world coordinate system placement of cameras and light sources transformation into camera coordinate
More informationCS Surface Rendering
CS10101001 Surface Rendering Junqiao Zhao 赵君峤 Department of Computer Science and Technology College of Electronics and Information Engineering Tongji University Surface rendering How do we choose a color
More informationShading Intro. Shading & Lighting. Light and Matter. Light and Matter
Shading Intro Shading & Lighting Move from flat to 3-D models Orthographic view of sphere was uniformly color, thus, a flat circle A circular shape with many gradations or shades of color Courtesy of Vincent
More informationLets assume each object has a defined colour. Hence our illumination model is looks unrealistic.
Shading Models There are two main types of rendering that we cover, polygon rendering ray tracing Polygon rendering is used to apply illumination models to polygons, whereas ray tracing applies to arbitrary
More informationOpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops.
OpenGl Pipeline Individual Vertices Transformed Vertices Commands Processor Per-vertex ops Primitive assembly triangles, lines, points, images Primitives Fragments Rasterization Texturing Per-fragment
More informationGraphics for VEs. Ruth Aylett
Graphics for VEs Ruth Aylett Overview VE Software Graphics for VEs The graphics pipeline Projections Lighting Shading Runtime VR systems Two major parts: initialisation and update loop. Initialisation
More informationLecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19
Lecture 17: Recursive Ray Tracing Where is the way where light dwelleth? Job 38:19 1. Raster Graphics Typical graphics terminals today are raster displays. A raster display renders a picture scan line
More informationShading. Why we need shading. Scattering. Shading. Objectives
Shading Why we need shading Objectives Learn to shade objects so their images appear three-dimensional Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something
More informationSo far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.
11 11.1 Basics So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources. Global models include incident light that arrives
More information