Illumination 2013, Fall. Ray Casting Image RayCast(Camera camera, Scene scene, int width, int height) { Image image = new Image(width, height); for (int.

Slides:



Advertisements
Similar presentations
The Radiance Equation.
Advertisements

Computer Vision Radiometry. Bahadir K. Gunturk2 Radiometry Radiometry is the part of image formation concerned with the relation among the amounts of.
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 6.
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
The Radiance Equation Mel Slater. Outline Introduction Light Simplifying Assumptions Radiance Reflectance The Radiance Equation Traditional Rendering.
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry Many slides courtesy Pat Hanrahan.
Radiometry. Outline What is Radiometry? Quantities Radiant energy, flux density Irradiance, Radiance Spherical coordinates, foreshortening Modeling surface.
Physically Based Illumination Models
Illumination Models Radiosity Chapter 14 Section 14.7 Some of the material in these slides may have been adapted from University of Virginia, MIT, Colby.
Graphics Graphics Korea University cgvr.korea.ac.kr Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection Many slides courtesy.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
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.
CSCE 641: Photon Mapping Jinxiang Chai. Outline Rendering equation Photon mapping.
Photon Tracing with Arbitrary Materials Patrick Yau.
Representations of Visual Appearance COMS 6160 [Fall 2006], Lecture 2 Ravi Ramamoorthi
IMGD 1001: Illumination by Mark Claypool
CS 376 Introduction to Computer Graphics 04 / 09 / 2007 Instructor: Michael Eckmann.
Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2
Introduction to Computer Vision CS / ECE 181B Tues, May 18, 2004 Ack: Matthew Turk (slides)
7M836 Animation & Rendering
© 2004 by Davi GeigerComputer Vision February 2004 L1.1 Image Formation Light can change the image and appearances (images from D. Jacobs) What is the.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Lighting and Shading Week.
Computer Graphics (Fall 2004) COMS 4160, Lecture 16: Illumination and Shading 2 Lecture includes number of slides from.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
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
12/05/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling Very brief intro to global illumination.
Reflections Specular reflection is the perfect reflection of light from a surface. The law a reflection states that the direction of the incoming ray and.
MIT EECS 6.837, Durand and Cutler Local Illumination.
-Global Illumination Techniques
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
David Luebke 1 10/26/2015 Lighting CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Taku KomuraComputer Graphics Local Illumination and Shading Computer Graphics – Lecture 10 Taku Komura Institute for Perception, Action.
Global Illumination Models THE WHITTED IMAGE - BASIC RECURSIVE RAY TRACING Copyright © 1997 A. Watt and L. Cooper.
Illumination.
Announcements Office hours today 2:30-3:30 Graded midterms will be returned at the end of the class.
04/30/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling We are now all done with modeling, the standard hardware pipeline.
Illumination and Shading
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
CS 450: COMPUTER GRAPHICS TRANSPARENT SURFACES SPRING 2015 DR. MICHAEL J. REALE.
CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai.
In the name of God Computer Graphics. Last Time Some techniques for modeling Today Global illumination and raytracing.
Local Illumination and Shading
Cornell CS465 Spring 2004 Lecture 4© 2004 Steve Marschner 1 Shading CS 465 Lecture 4.
CS 445 / 645 Introduction to Computer Graphics Lecture 16 Lighting Lighting.
RENDERING : Global Illumination
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
CS552: Computer Graphics Lecture 33: Illumination and Shading.
REFRACTION Physics Chapter 18b. Refraction Bending rays of light as it passes from one medium to another Caused by change in speed of wave Amount of refraction.
Light. Intensity calculation = wavelength I( ) = wavelength intensity of light reaching eye I( ) = I diff ( ) + I spec ( ) + I refl ( ) + I trans ( )
CS552: Computer Graphics Lecture 36: Ray Tracing.
Review Ray Tracing III Review. Pseudo codes RayCast-1  Plain ray caster (direct illumination) RayCast-2  RayCast-1 + shadow rays RayTrace-1  Recursive.
Reflection Models (1) Physically-Based Illumination Models (2)
Computer Graphics: Illumination
3D Rendering 2016, Fall.
7. Illumination Phong Illumination Diffuse, Specular and Ambient
Illumination 2016, Fall.
Shading Revisited Some applications are intended to produce pictures that look photorealistic, or close to it The image should look like a photograph A.
Unit-7 Lighting and Shading
Fundamentals of Computer Graphics Part 6 Shading
GR2 Advanced Computer Graphics AGR
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
CSC418 Computer Graphics Raytracing Shadows Global Illumination.
Presentation transcript:

illumination 2013, Fall

Ray Casting Image RayCast(Camera camera, Scene scene, int width, int height) { Image image = new Image(width, height); for (int i; i< width; i++) for (int j=0; j<height; j++) { Ray ray=ConstructRayThroughPixel(camera, i, j); Intersection hit = FIndIntersection(ray, scene); Image[i][j]=GetColor(scene, ray, hit); } return image; }

Illumination How do we compute radiance for a sample ray? image[i][j]=GetColor(scene, ray, hit);

Goal Must derive computer models for …  Emission at light source  Scattering at surface  Reception at the camera Desirable feature …  Concise  Efficient to compute  “Accurate”

Overview Direct Illumination (=Local illumination)  Emission at light sources  Scattering at surfaces Global illumination  Shadows  Refractions  Inter-object reflections

Modeling Light Sources …  Describes the intensity of energy,  Leaving a light source,  Arriving at location (x, y, z),  From direction (   With wavelength

Empirical Models Ideally measure Irradiant energy for “all” situations  Too much storage  Difficult in practice

OpenGL Light Source Models Simple mathematical models:  Point light  Directional light  Spot light

Point Light Source Models omni-directional point source  Intensity (I 0 ),  Position (px, py, pz),  Factors (K c, K l, K q ) for attenuation with distance (d)

Directional Light Source Models point light source at infinity  Intensity (I 0 ),  Direction (dx, dy, dz)

Spot Light Source (1/2) Models point light source with direction  Intensity (I 0 ),  Position (px, py, pz),  Direction (dx, dy, dz)  Attenuation

Spot Light Source (2/2) Models point light source with direction  intensity (I 0 ),  position (px, py, pz),  direction (dx, dy, dz)  attenuation with distance  falloff (sd), and cutoff (sc)

Light Falling on a Surface Move surface away from light  Inverse square law:  Tilt surface away from light Cosine law:

Overview Direct Illumination (=Local illumination)  Emission at light sources  Scattering at surfaces Global illumination  Shadows  Refractions  Inter-object reflections

Modeling Surface Reflectance BRDF (θ i, φ i, θ o, φ o, λ)…  Bidirectional Reflectance Distribution Function  describes the amount of incident energy,  arriving from direction (θ i, φ i   쎄타  파이   leaving in direction (θ o, φ o )   with wavelength   람다 

Empirical Models Ideally measure BRDF for “all” combinations of angles : θ i, φ i, θ o, φ o  Difficult in practice  Too much storage

Parametric Models Approximate BRDF with simple parametric function that is fast to compute.  Phong [75]  Blinn-Phong [77]  Cook-Torrance [81]  He et al. [91]  Ward [92]  Lafortune et al. [97]  Ashikhmin et al. [00]  etc.

OpenGL Reflectance Model Simple analytic model:  Diffuse reflection +  Specular reflection +  Emission +  “Ambient”

Diffuse Reflection Assume surface reflects equally in all directions  Example: chalk, clay

Diffuse Reflection How much light is reflected?  Depends on angle of incident light

Diffuse Reflection Lambertian model  Cosine law (dot product)

Specular Reflection Reflection is strongest near mirror angle  Examples: mirrors, metals

Specular Reflection How much light is seen? Depend on:  Angle of incident light  Angle to viewer

Specular Reflection Phong Model  cos (  n : This is a physically-motivated hack!

Emission Represent light eminating directly from polygon

Ambient Term Represents reflection of all indirect illumination  This is a total hack Avoid complexity of global illumination

OpenGL Reflectance Model Simple analytic model:  Diffuse reflection +  Specular reflection +  Emission +  “Ambient”

OpenGL Reflectance Model Sum diffuse, specular, emission, and ambient

Surface Illumination Calculation Single light source:

Surface Illumination Calculation Multiple light sources:

Example

Overview Direct Illumination (=Local illumination)  Emission at light sources  Scattering at surfaces Global illumination  Shadows  Refractions  Inter-object reflections Global Illumination

Shadows Shadow term tells if light sources are blocked  Cast ray towards each light source L i  S i = 0 if ray is blocked, S i = 1 otherwise

Ray Casting Trace primary rays from camera  Direct illumination from unblocked light only

Recursive Ray Tracing Also trace secondary rays from hit surfaces  Global illumination from mirror reflection and transparency

Mirror reflections Trace secondary rays in mirror direction  Evaluate radiance along secondary ray and include it into illumination model

Transparency Trace secondary rays in direction of refraction  Evaluate radiance along secondary ray and include it into illumination model

Transparency Transparency coefficient is fraction transmitted  K T = 1 for translucent object, K T = 0 for opaque  0 < K T <1 for object that is semi-translucent

Refractive Transparency For thin surfaces, can ignore change in direction  Assume light travels straight through surface 에타

Refractive Transparency For solid objects, apply Snell’s law:

Refractive Index ( 굴절률 ) in Maya ⊙ Vacuum: 1.00 ⊙ Air: ⊙ Acetone: 1.36 ⊙ Alcohol: ⊙ Amorphous Selenium: 2.92 ⊙ Calspar 1: 1.16 ⊙ Calspar 2: ⊙ Carbon Disulfide( 탄소 황화물 ): 1.63 ⊙ Chromium Oxide( 크롬 산화물 ): ⊙ Copper Oxide( 구리 산화물 ): ⊙ Crown Glass( 크라운 창 유리 ): 1.52 ⊙ Crystal: 2.00 ⊙ Diamond: ⊙ Emerald: 1.57 ⊙ Ethyl Alcohol( 에틸 알콜 ): 1.36 ⊙ Flourite: ⊙ Fused Quartz( 석영, 수정 ): 1.46 ⊙ Heaviest Flint Glass( 렌즈, 프리즘 등 광학용 고급유리 ): 1.89 ⊙ Heavy Flint Glass: 1.65 ⊙ Glass: 1.5 ⊙ Ice: ⊙ lodine Crystal: 3.34 ⊙ Lapis Lazuli( 청금석 ): 1.61 ⊙ Light Flint Glass: ⊙ Liquid Carbon Dioxide: 1.2 ⊙ Polystyrene( 폴리스티렌 ): 1.55 ⊙ Quartz 1( 석영 ): ⊙ Quartz 2: ⊙ Ruby: 1.77 ⊙ Sapphire: 1.77 ⊙ Sodium Chloride1( 소금 ): ⊙ Sodium Chloride2( 소금 ): ⊙ Sugar Solution 30%(30% 설탕물 ): 1.38 ⊙ Sugar Solution 80%(80% 설탕물 ): 1.49 ⊙ Topaz( 황옥 ): 1.61 ⊙ Water_ 섭씨 20 도에서의 물 : ⊙ Zinc Crown Glass: 1.517

Recursive Ray Tracing Ray Tree represents illumination computation

Recursive Ray Tracing GetColor call RayTrace recursively Image RayTrace(Camera camera, Scene scene, int width, int height) { Image image = new Image(width, height); for (int i; i< width; i++) for (int j=0; j<height; j++) { Ray ray=ConstructRayThroughPixel(camera, i, j); Intersection hit = FIndIntersection(ray, scene); Image[i][j]=GetColor(scene, ray, hit); } return image; }

Recursive Ray Tracing GetColor is called recursively Color GetColor(Scene scene, Ray ray) { Intersection hit = FindIntersection(ray, scene); Ray specular_ray = SpecularRay(ray, hit); Ray refractive_ray = RefractiveRay(ray, hit); Color color = Phong(scene, ray, hit) + Ks * GetColor(scene, specular_ray, hit) + Kt * GetColor(scene, refractive_ray, hit); return color; }

Summary Ray casting (direct illumination)  Usually use simple analytic approximations for light source emission and surface reflectance Recursive ray tracing (global illumination)  Incorporate shadows, mirror reflections, and pure refractions All of this is an approximation So that it is practical to compute

Illumination Terminology Radiant power [flux] (  )  Rate at which light energy is transmitted (in Watts) Radiant Intensity (I)  Power radiated onto a unit solid angle in direction (in Watts/sr) Ex) energy distribution of a light source (inverse square law) Radiance (L)  Radiant intensity per unit projected area (in Watts/m 2 /sr) Ex) light carried by a single ray (no inverse square law) Irradiance (E)  Incident flux density on a locally planar area (in Watts/m 2 ) Ex) light hitting a surface at a point Radiosity (B)  Exitant flux density on a locally planar area (in Watts/m 2 )