Reflection and Transmission

Slides:



Advertisements
Similar presentations
Computer Graphics I, Fall 2010 Shading II.
Advertisements

Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
University of New Mexico
Ray Tracing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of.
Reflection & Refraction of Light Reflection: specular (mirror) vs diffuse angle of incidence = angle of reflection Refraction: Snell’s Law n 1 sin 
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2006 Shading II Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Sampling and Aliasing Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
Reflection and Transmission Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center.
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.
RAY TRACING WITH DISPERSION CSS552 – Topics in Rendering Winter 2011 Final Project by: Kohei Ueda Shivani Srikanteshwara Mary Ann Chiramattel Kunjachan.
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.:
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Introduction to Computer Graphics with WebGL
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Bump Mapping Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of.
Light. Intensity calculation = wavelength I( ) = wavelength intensity of light reaching eye I( ) = I diff ( ) + I spec ( ) + I refl ( ) + I trans ( )
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Chapter 17 Reflection and Refraction. When light passes from one medium to another it may be reflected, refracted or both.
Environment Maps Ed Angel Professor Emeritus of Computer Science
Introduction to Computer Graphics with WebGL
Sampling and Aliasing Ed Angel
University of New Mexico
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Programmable Pipelines
LIGHT.
Ray Tracing Ed Angel Professor Emeritus of Computer Science
Unit-7 Lighting and Shading
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Shading II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Angel: Interactive Computer.
Models and Architectures
Introduction to Computer Graphics with WebGL
GLSL I Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of New Mexico.
Reflection and Transmission
Introduction to Computer Graphics with WebGL
Interactions of Light With Matter
Shading in OpenGL Ed Angel
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics
Fundamentals of Computer Graphics Part 6 Shading
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Reflection and Refraction (Snell’s Law).
Isaac Gang University of Mary Hardin-Baylor
Introduction to Computer Graphics with WebGL
Image Formation Ed Angel
Texture Mapping Ed Angel Professor Emeritus of Computer Science
Illumination and Shading
University of New Mexico
Shading II Ed Angel Professor Emeritus of Computer Science
Presentation transcript:

Reflection and Transmission Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of New Mexico Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009

Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Introduction Interactions between light and materials Blinn-Phong model Absorption Diffuse and specular reflections Purely local Reflection: Translucent surfaces Refraction Frensel effect Chromatic dispersion Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009

Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Global vs Local Most of these effects can only be computed in a global renderer such as a ray tracer Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009

Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Ray Tracing Ray tracers can make use of all these effects in a global calculation by tracing rays N R L T -N Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009

Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Environmental Map Can use all these effects Implement in Cg with vertex and fragment programs Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009

Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Refraction With pure refraction, all the light is transmitted but the angle of refraction is determined by Snell’s law ήl sin θl = ήt sin θt where ήl and ήt are the speed of light relative to the speed of light in a vacuum Let ή = ήl / ήt Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009

Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Computing T ή2 sin2θl = ή2 (1- cos2θl )= sin2θt = 1-cos2θt Solving for cos θt Assuming normalized vectors cos θt = T·N = (1- ή2 (1-cos2θl ))1/2 where cos θl = T·N T, N, and L must be coplanar T = a L + b N and T·T = 1 Solving T = -1/ ή L – (cos θt - 1/ ή cos θl ) N Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009

Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Notes Critical angle: total internal reflection 1= ή2 (1-cos2θl ) Snell’s law is a statement that light takes the shortest path (in time) Can apply to reflection maps (see Cg Tutorial) via vertex program Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009

Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Fresnel Effect Some light is reflected and some transmitted at surface between two materials Amount of light reflected is greatest at shallow angle Approximation: use affine combination of refracted and reflected colors where a = max (0, min(1, bias + scale  (1 + L·N)power)) Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009

Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Chromatic Dispersion The refraction coefficient is actually a function of wavelength h = h(l) N L -N Tr Tg Tb Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009

Chromatic Dispersion with Shaders Easy to do with reflection maps Use three values of h Make use of vector operations Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009