Global Illumination May 7, 2007. Global Effects translucent surface shadow multiple reflection.

Slides:



Advertisements
Similar presentations
Graphics Pipeline.
Advertisements

Lecture 14 Illumination II – Global Models
3D Graphics Rendering and Terrain Modeling
Light Issues in Computer Graphics Presented by Saleema Amershi.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
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.
IMGD 1001: Illumination by Mark Claypool
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Object-Order vs. Screen-Order Rendering April 24, 2003.
Lighting and Shading Wen-Chieh (Steve) Lin
(conventional Cartesian reference system)
X86 and 3D graphics. Quick Intro to 3D Graphics Glossary: –Vertex – point in 3D space –Triangle – 3 connected vertices –Object – list of triangles that.
Ray Casting Ray-Surface Intersections Barycentric Coordinates Reflection and Transmission [Shirley, Ch.9] Ray Tracing Handouts Ray Casting Ray-Surface.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Adv. Computer Graphics CS6500, Spring 2003.
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.
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
1 Dr. Scott Schaefer Radiosity. 2/38 Radiosity 3/38 Radiosity Physically based model for light interaction View independent lighting Accounts for indirect.
CSCE 641: Computer Graphics Ray Tracing Jinxiang Chai.
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,
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
CSC418 Computer Graphics n Raytracing n Shadows n Global 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.:
Ray Tracing II A More Practical Version. A QUICK REVIEW.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Advanced Computer Graphics March 06, Grading Programming assignments Paper study and reports (flipped classroom) Final project No written exams.
-Global Illumination Techniques
Ray Tracing Chapter CAP4730: Computational Structures in Computer Graphics.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
Taku KomuraComputer Graphics Local Illumination and Shading Computer Graphics – Lecture 10 Taku Komura Institute for Perception, Action.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
Monte-Carlo Ray Tracing and
CSCE 441: Computer Graphics Ray Tracing
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
Local Reflection Models
Render methods. Contents Levels of rendering Wireframe Plain shadow Gouraud Phong Comparison Gouraud-Phong.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
RENDERING : Global Illumination
CSE 681 Introduction to Ray Tracing. CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Distributed Ray Tracing. Can you get this with ray tracing?
Chapter 1 Graphics Systems and Models Models and Architectures.
Distributed Ray Tracing. Can you get this with ray tracing?
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
Photorealistic Rendering vs. Interactive 3D Graphics
Computer Graphics Chapter 9 Rendering.
3D Graphics Rendering PPT By Ricardo Veguilla.
Unit-7 Lighting and Shading
Chapter 14 Shading Models.
(c) 2002 University of Wisconsin
CS5500 Computer Graphics May 29, 2006
Illumination and Shading
Advanced Computer Graphics
Chapter 14 Shading Models.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
CS 480/680 Computer Graphics Shading.
Distributed Ray Tracing
Presentation transcript:

Global Illumination May 7, 2007

Global Effects translucent surface shadow multiple reflection

Local vs. Global

Local vs Global Rendering Correct shading requires a global calculation involving all objects and light sources –Incompatible with pipeline model which shades each polygon independently (local rendering) However, in computer graphics, especially real time graphics, we are happy if things “look right” –Exist many techniques for approximating global effects

Local Reflection Models

Phong Reflection Model I = Ka*Ia + kd*Id + Ks*Is Not completely correct, but good enough. ambient diffuse specular

Ambient Component Accounting for light scatter around. Ia is constant.

Diffuse Component Ia = Ii * N·L Not affected by viewing direction. –i.e., incoming light is reflected to all directions. N L

Specular Component (Phong Reflection Model) To model imperfect reflection. Is = Ii(N · H) n N L V H

Specular Component (Cook & Torrance Model) Consider specular reflection as perfect reflection of micro-facets. Specular= DGF /( N·V) D: Distribution term G: Geometry (shadowing and masking) term F: Fresnel term

D Term (Cook & Torrance) Modeling the distribution of micro- geometry. Gaussian distribution can be used: D = k e -(  /m)2

G Term (Cook & Torrance)

The Fresnel Term Color of reflected light varies with viewing angle.

BRDF BRDF=f(  in,  in,  ref,  ref )=f(Light,View)

Why Not Always Using BRDF? Difficult to find a “closed form” representation of BRDF. The Phong model and Cook & Torrance model are approximation of BRDF. –They are not 100% matche of BRDF, but they are easy to compute.

Exercise Q1: Those reflectance models give us local illumination only. Why? Q2: What typical effects are missing? Hint: What are the parameters? Do they include the other objects? Shadow, reflection, and refraction…

Object-Order vs. Screen-Order Rendering

How Do You Draw a Picture (Without a Computer)? What is your subject? Viewing Parameters: – Camera, Picture Frames, Resolutions Many ways to specify it: (1)eye, focus length, image plane (2)eye, direction, FOV, up vector

Method A: Object Order Algorithm (Process one polygon at a time.)

3D to 2D Projection OK, so we can map a 3D point (or vertex) to 2D image. But what about a 3D surface? Polygons are made from points. Actually, we only need triangles!

Scan Conversion Also called rasterization. The 3D to 2D Projection gives us 2D vertices (points). We need to fill in the interior.

Shading Interpolation between any two vertices: –Vertex colors (lit or unlit?) –Normal vectors –Z –w (or 1/w) for perspective correction –Texture coordinates

Note that we usually apply only local illumination in object order algorithm (because you have to go beyond the current object to obtain the global effect.) Method B: Screen Order Algorithm (Process one pixel at a time.)

Ray Tracing Algorithm More detail in Watt’s (pp ) and (pp ) Reflected Transmitted

Creating a Ray Parameters: –Image Plane (position, size, and resolution) –Viewpoint –Which ray (x, y)?

Ray-Object Intersection For example: sphere (x-x 0 ) 2 +(y-y 0 ) 2 +(z-z 0 ) 2 =r 2 Ray: (x,y)=(x 1,y 1 )+t(x d,y d ) Find t that satisfy (x-x 0 ) 2 +(y-y 0 ) 2 +(z-z 0 ) 2 =r 2 Normal vector? Also easy for planes, cones, …etc.

Shading Models Pixel color = ambient + diffuse + specular + reflected + transmitted The weight of each is determined by the surface properties.

Reflection and Refraction Reflected ray is determined by: – incoming ray and normal vector. Refracted ray is determined by: –Incoming ray –Normal vector –And density

Recursive Algorithm The reflected ray and refracted ray are traced recursively. Termination condition: –Depth of trace –Weight (to the final pixel color) of ray Pseudo code in Watt’s page 349.

Advantage We get all the following automatically: –Hidden surface removal –Shadow –Reflection –Transparency and refraction

Disadvantage Slow. Many rays are spawned. Slow. Ray-object intersection for every ray and every object. (Space partition helps a lot!). The lighting is still not completely right!

Can you get this with ray tracing?

Other Global Illumination Techniques Radiosity Monte Carlo path tracing, for examples: –Distributed ray tracing –Metropolis light transport –Photon map…etc. Want to know more? Read my Digital Image Synthesis course slides.

What is Radiosity Borrowed from radiative heat transfer. Assuming diffuse reflectance. View independent solution.

RADIANCE © 1994 by Charles Ehrlich, Mark Mack

Photon Map

Metropolis Light Transport Image by Eric Veach and Leonidas J. Guibas