1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.

Slides:



Advertisements
Similar presentations
SI23 Introduction to Computer Graphics
Advertisements

5.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 5 A Simple Reflection Model.
Illumination Lighting and Shading CSE 470/598 Introduction to Computer Graphics Arizona State University Dianne Hansford.
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
Light Issues in Computer Graphics Presented by Saleema Amershi.
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
University of New Mexico
Computer Graphics - Class 10
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Lighting/Shading II Week.
Rendering (彩現 渲染).
IMGD 1001: Illumination by Mark Claypool
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
Lighting and Shading Wen-Chieh (Steve) Lin
(conventional Cartesian reference system)
3/23/2005 © Dr. Zachary Wartell 1 Illumination Models and Surface- Rendering Methods.
1 CSCE 641: Computer Graphics Lighting Jinxiang Chai.
7M836 Animation & Rendering
Objectives Learn to shade objects so their images appear three- dimensional Learn to shade objects so their images appear three- dimensional Introduce.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Lighting and Shading Week.
1 Lecture 9 Lighting Light Sources Reflectance Camera Models.
Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Course Website: Computer Graphics 16: Illumination.
LIGHTING Part One - Theory based on Chapter 6. Lights in the real world Lights bounce off surfaces and reflect colors, scattering light in many directions.
Shading Surface can either (both) 1.Emit light. E.g. light bult 2.Reflect light. E.g. Mirror.
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
Illumination.
Fundamentals of Computer Graphics Part 6 Shading prof.ing.Václav Skala, CSc. University of West Bohemia Plzeň, Czech Republic ©2002 Prepared with Angel,E.:
CS 445 / 645: Introductory Computer Graphics
Computer Graphics Lighting.
Lecture 5: 3D Rendering Pipeline (II) Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Shading (introduction to rendering). Rendering  We know how to specify the geometry but how is the color calculated.
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
David Luebke 1 10/26/2015 Lighting CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
CSE 381 – Advanced Game Programming GLSL Lighting.
Illumination.
Illumination and Shading
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai.
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
Lecture Fall 2001 Illumination and Shading in OpenGL Light Sources Empirical Illumination Shading Transforming Normals Tong-Yee Lee.
Local Illumination and Shading
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
Lighting and Reflection Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Computer Graphics Lecture 25 Fasih ur Rehman. Last Class Shading.
Illumination Models. Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model,
CS552: Computer Graphics Lecture 33: Illumination and Shading.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Computer Graphics: Illumination
Illumination Models and Surface-Rendering Methods CEng 477 Introduction to Computer Graphics.
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
1 Dr. Scott Schaefer Lighting. 2/49 Lighting/Illumination Color is a function of how light reflects from surfaces to the eye Global illumination accounts.
7. Illumination Phong Illumination Diffuse, Specular and Ambient
© University of Wisconsin, CS559 Spring 2004
Unit-7 Lighting and Shading
Lighting.
CSE 470 Introduction to Computer Graphics Arizona State University
Fundamentals of Computer Graphics Part 6 Shading
Isaac Gang University of Mary Hardin-Baylor
Lighting and Shading (I)
CS 480/680 Computer Graphics Shading.
Lighting Calculations
Presentation transcript:

1 CSCE 441: Computer Graphics Lighting Jinxiang Chai

Scan conversion 3D Rendering pipeline Modeling transformation lighting Viewing transformation Project transformation Clipping Image Transform into 3D world system Illuminate according to lighting and reflectance Transform into 3D camera coordinate system Transform into 2D camera system Clip primitives outside camera’s view Draw pixels (includes texturing, hidden surface, etc.)

Scan conversion 3D Rendering pipeline Modeling transformation lighting Viewing transformation Project transformation Clipping Image Transform into 3D world system Illuminate according to lighting and reflectance Transform into 3D camera coordinate system Transform into 2D camera system Clip primitives outside camera’s view Draw pixels (includes texturing, hidden surface, etc.)

Outline Ambient, diffuse and specular light Light attenuation & spot lights Readings: HB 17-1,12- 2,17-3

Lighting/Illumination Color is a function of how light reflects from surfaces to the eye Global illumination accounts for light from all sources as it is transmitted throughout the environment Local illumination only accounts for light that directly hits a surface and is transmitted to the eye

Direct and Indirect Light

Global Illumination II

Lighting/Illumination Color is a function of how light reflects from surfaces to the eye Global illumination accounts for light from all sources as it is transmitted throughout the environment Local illumination only accounts for light that directly hits a surface and is transmitted to the eye

Light Sources Any object emitting radiant energy is a light source that contributes to the lighting effects for other objects in a scene Point light sources: defined by its position and the color of the mitted light (RGB) Infinitely distant light sources: basically a point light source very far from a scene. Defined by its direction and the color of the light (RGB)

Reflection Models Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency.

Reflection Models Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency.

Reflection Models Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency.

Reflection Models Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency.

Reflection Models Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency. Reflected light?

Reflection Models Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency. Reflected light? This depends on the surface property!

Types of Reflection Functions Ideal Specular  Reflection Law  Mirror

Types of Reflection Functions Ideal Specular  Reflection Law  Mirror Ideal Diffuse  Lambert’s Law  Matte

Types of Reflection Functions Ideal Specular  Reflection Law  Mirror Ideal Diffuse  Lambert’s Law  Matte Specular  Glossy  Directional diffuse

Materials PlasticMetalMatte From Apodaca and Gritz, Advanced RenderMan

Illumination Model Ambient Light  Uniform light caused by secondary reflections Diffuse Light  Light scattered equally in all directions Specular Light  Highlights on shiny surfaces

Ambient Light A =intensity of ambient light k a =ambient reflection coefficient Really 3 equations! (Red, Green, Blue) Accounts for indirect illumination Determines color of shadows A=R*C r + G*C g +B*C b

Total Illumination

Diffuse Light Assumes that light is reflected equally in all directions Handles both local and infinite light sources  Infinite distance: L doesn’t change  Finite distance: must calculate L for each point on surface Surface

Diffuse Light C = intensity of point light source k d = diffuse reflection coefficient = angle between normal and direction to light Surface C=R*C r + G*C g +B*C b

The reflected luminous intensity observed from an ideal diffusely reflecting surface is proportional to the cosine of the angle between the direction of the incident light and the surface normal Lambert’s Law Surface

Lambert’s Law Surface Beam of Light

Lambert’s Law Surface Beam of Light The intensity of the received light:

Lambert’s Law Surface Beam of Light The intensity of the received light:

Diffuse Light Where is the light source?

Diffuse Light Where is the light source?

Total Illumination

Materials PlasticMetalMatte From Apodaca and Gritz, Advanced RenderMan

Specular Light Perfect, mirror-like reflection of light from surface Forms highlights on shiny objects (metal, plastic) Surface

Specular Light C =intensity of point light source k s =specular reflection coefficient =angle between reflected vector (R) and eye (E) n =specular coefficient Surface

Finding the Reflected Vector Surface

Finding the Reflected Vector Surface

Finding the Reflected Vector Surface

Finding the Reflected Vector Surface

Finding the Reflected Vector Surface

Finding the Reflected Vector Surface

Total Illumination

Multiple Light Sources Only one ambient term no matter how many lights Light is additive; add contribution of multiple lights (diffuse/specular components)

Total Illumination

Other Lights Attenuation caused by fog, smoke Spot lights

Attenuation Decrease intensity with distance from light

Attenuation Decrease intensity with distance from light d = distance to light r = radius of attenuation for light

Attenuation Decrease intensity with distance from light d = distance to light r = radius of attenuation for light

Without Attenuation

With Attenuation

Spot Lights Eliminate light contribution outside of a cone How to create spot lights ?

Spot Lights Eliminate light contribution outside of a cone Surface Zero! If outside of the cone

Spot Lights Eliminate light contribution outside of a cone Surface Depends on the angle β β If inside the cone

Spot Lights Eliminate light contribution outside of a cone Surface cosββ

Without Spot Lights

With Spot Lights

Implementation Considerations Surface >90: no contributions

Implementation Considerations Typically choose Clamp each color component to [0,1]

Opengl Functions See section how to set up light sources (light source pos - light source position and type - light source colors - radial-intensity attenuation - spotlights how to specify global lighting parameters how to specify surface properties

Next Lecture Shading Texture mapping & others Readings: HB 17-10, 18-1, 18-2 and 18-3