1 / 9

Lighting and Illumination

Lighting and Illumination. Lighting is the major problem in computer graphics, for either realism or real-time compositions- harder than modeling

ross
Download Presentation

Lighting and Illumination

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lighting and Illumination • Lighting is the major problem in computer graphics, for either realism or real-time compositions- harder than modeling • Consider local illumination (only light sources are used, not reflections from other objects), isotropic (not anisotropic where reflected light changes with rotation of object) • No model can do it all

  2. Lighting: Components • Objects can emit light (eg. light bulbs, glowing objects, spot lights) • Light can be diffused from an object • Light can be reflected off one object to another • Light can be absorbed (partially or fully) by an object

  3. Light Rays: Which Direction? • We think of “seeing” as if the direction is from our eyes to a position on the screen (or in the world) • But rays of light come from sources and objects to our eyes • Light sources emit light, which then can enter our eyes directly or first interact with an object through specular or diffuse reflection – or interact with several objects before hitting our eyes

  4. Lighting: Realism • In order to accurately represent the effects of lighting we would need to trace rays from all light sources, let them interact with objects before entering our eyes, and calculate the result using laws of physics • Recursion could be overwhelming- calculations become impossible • Some simplifying assumptions must be made • But the more of these calculations that take place the more realistic the rendering; difference between real-time and realism

  5. Lighting: Reflectance • Objects have different capabilities to reflect light: bidirectional reflectance distribution function gives the amount of reflected radiance in a given direction for a given incoming direction (BRDF) • Think of a mirror, a shiny table top, a glossy picture, a matte picture, a black shirt • Most computer graphics models reduce this function to two properties of the material: specular and diffuse

  6. Lighting: Reflectance (con’t) • A material’s diffuse reflectance goes in all directions; dependent on position of light source; same for the entire object • The specular reflectance (mirror-like) goes in one direction and the angle of incidence is equal to the angle of reflectance (with the normal) • We look at combinations of these two from a light source

  7. Light: summary • Objects can emit light, reflect light or absorb light • In a simplified version, reflected light can be thought of as a combination of diffuse and specular • Objects can also be transparent, partially transparent or opaque • Also have ambient light, indirect illumination

  8. Lights: Processing (put in draw not setup) • ambientLight comes from all directions and in Processing takes a color. • directionalLight has a color and a direction. The rays are parallel (think of sunlight) and strike the objects; the result is strongest when the normals to the surfaces are parallel to the direction • pointLight emanates from a particular location and shines in all directions (think of a lightbulb); the function takes a color and a location. • spotLighthas a color, a location, a direction, and angle and a concentration (think of the theater) • The lights() function sets up a default ambient light of color 128 and a directional light of color 128 pointing in 0,0,-1

  9. Shading • Flat shading: calculate illumination once for each patch or triangle • Gouraud shading: calculate for each vertex and then use interpolation for each edge and interpolation for each interior point • Phong uses interpolated normals

More Related