Illumination 2016, Fall.

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.
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry Many slides courtesy Pat Hanrahan.
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.
© 2002 by Davi GeigerComputer Vision January 2002 L1.1 Image Formation Light can change the image (and appearances). What is the relation between pixel.
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
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.
Lighting affects appearance. Light Source emits photons Photons travel in a straight line When they hit an object they: bounce off in a new direction.
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.
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.
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
Illumination 2013, Fall. Ray Casting Image RayCast(Camera camera, Scene scene, int width, int height) { Image image = new Image(width, height); for (int.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
CS 445 / 645 Introduction to Computer Graphics Lecture 16 Lighting Lighting.
CS552: Computer Graphics Lecture 33: Illumination and Shading.
Light. Intensity calculation = wavelength I( ) = wavelength intensity of light reaching eye I( ) = I diff ( ) + I spec ( ) + I refl ( ) + I trans ( )
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
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
Graphics Graphics Korea University kucg.korea.ac.kr 1 Lights & Material 고려대학교 컴퓨터 그래픽스 연구실.
Basic Ray Tracing CMSC 435/634.
3D Rendering 2016, Fall.
7. Illumination Phong Illumination Diffuse, Specular and Ambient
Shading CS 465 Lecture 4 © 2004 Steve Marschner • 1.
Shading Revisited Some applications are intended to produce pictures that look photorealistic, or close to it The image should look like a photograph A.
Advanced Computer Graphics
Unit-7 Lighting and Shading
Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular model
Path Tracing (some material from University of Wisconsin)
Lighting.
CSCE 441 Computer Graphics: Radiosity
Fundamentals of Computer Graphics Part 6 Shading
The Rendering Equation
Illumination and Shading
Simple Illumination CSE 681.
GR2 Advanced Computer Graphics AGR
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
CS 480/680 Computer Graphics Shading.
CSC418 Computer Graphics Raytracing Shadows Global Illumination.
Presentation transcript:

illumination 2016, 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 … Desirable feature … Emission at light source Scattering at surface Reception at the camera Desirable feature … Concise Efficient to compute “Accurate”

Overview Direct Illumination (=Local illumination) Global 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 (q, f), With wavelength l

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 (I0), Position (px, py, pz), Factors (ca, la, qa) for attenuation with distance (d)

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

Spot Light Source (2/2) Models point light source with direction intensity (I0), position (px, py, pz), direction (dx, dy, dz) Factors (ca, la, qa) for 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) Global 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 l (람다)

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 (a)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) Global 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 Li Si = 0 if ray is blocked, Si = 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 KT = 1 for translucent object, KT = 0 for opaque 0 < KT <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: 1.00029 ⊙ Acetone: 1.36 ⊙ Alcohol: 1.329 ⊙ Amorphous Selenium: 2.92 ⊙ Calspar 1: 1.16 ⊙ Calspar 2: 1.486 ⊙ Carbon Disulfide(탄소 황화물): 1.63 ⊙ Chromium Oxide(크롬 산화물): 2.705 ⊙ Copper Oxide(구리 산화물): 2.705 ⊙ Crown Glass(크라운 창 유리): 1.52 ⊙ Crystal: 2.00 ⊙ Diamond: 2.471 ⊙ Emerald: 1.57 ⊙ Ethyl Alcohol(에틸 알콜): 1.36 ⊙ Flourite: 1.434 ⊙ Fused Quartz(석영, 수정): 1.46 ⊙ Heaviest Flint Glass(렌즈, 프리즘 등 광학용 고급유리): 1.89 ⊙ Heavy Flint Glass: 1.65 ⊙ Glass: 1.5 ⊙ Ice: 1.309 ⊙ lodine Crystal: 3.34 ⊙ Lapis Lazuli(청금석): 1.61 ⊙ Light Flint Glass: 1.575 ⊙ Liquid Carbon Dioxide: 1.2 ⊙ Polystyrene(폴리스티렌): 1.55 ⊙ Quartz 1(석영): 1.644 ⊙ Quartz 2: 1.535 ⊙ Ruby: 1.77 ⊙ Sapphire: 1.77 ⊙ Sodium Chloride1(소금): 1.544 ⊙ Sodium Chloride2(소금): 1.644 ⊙ Sugar Solution 30%(30% 설탕물): 1.38 ⊙ Sugar Solution 80%(80% 설탕물): 1.49 ⊙ Topaz(황옥): 1.61 ⊙ Water_섭씨 20도에서의 물: 1.333 ⊙ 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] (F) 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/m2/sr) Ex) light carried by a single ray (no inverse square law) Irradiance (E) Incident flux density on a locally planar area (in Watts/m2) Ex) light hitting a surface at a point Radiosity (B) Exitant flux density on a locally planar area (in Watts/m2) http://www.just.edu.jo/~yaser/courses/cs480/Tutorials/OpenGl%20-%20Light%20Part%20II.htm