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.
Lighting and Illumination Lighting is the major problem in computer graphics, for either realism or real-time compositions- harder than modeling Consider.
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.
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
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
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.
University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell Reflection Models I Today Types of reflection models The BRDF and.
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.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.
CSE 381 – Advanced Game Programming GLSL Lighting.
Illumination.
11/04/04© University of Wisconsin, CS559 Fall 2004 Last Time Visibility –Z-Buffer and transparency –A-buffer –Area subdivision –BSP Trees –Exact Cell-Portal.
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.
Basic Lighting and Shading. The Important Properties of Light It can Reflect, bend, spread and scatter.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
CS348B Lecture 10Pat Hanrahan, Spring 2005 Reflection Models I Today Types of reflection models The BRDF and reflectance The reflection equation Ideal.
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
Computer Graphics Lecture 25 Fasih ur Rehman. Last Class Shading.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Computer Graphics: Illumination
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
Lighting.
Fundamentals of Computer Graphics Part 6 Shading
Isaac Gang University of Mary Hardin-Baylor
Illumination and Shading
Lighting and Shading (I)
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
CS 480/680 Computer Graphics Shading.
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 10-1,10- 2,10-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

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.

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

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

Lambert’s Law Surface Beam of Light

Lambert’s Law Surface Beam of Light

Lambert’s Law Surface

Lambert’s Law Surface Beam of Light

Lambert’s Law Surface Beam of 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

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

Spot Lights Eliminate light contribution outside of a cone Surface

Spot Lights Eliminate light contribution outside of a cone Surface

Attenuation

Spot Lights

Implementation Considerations Surface

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 10-10, 10-17, 10-18