Reflection and Refraction

Similar documents
Reflection and Refraction

Lecture 19: All Together with Refraction

Lecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19

Recursive Ray Tracing. Ron Goldman Department of Computer Science Rice University

Computer Graphics. Ray Tracing. Based on slides by Dianna Xu, Bryn Mawr College

Ray-Tracing. Misha Kazhdan

Lecture 10: Ray tracing

Reflection & refraction

COMP371 COMPUTER GRAPHICS

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

Supplement to Lecture 16

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics

Physics 1C. Lecture 25B. "There are two ways of spreading light: to be the candle or the mirror that reflects it." --Edith Wharton

Lighting and Shading

1. What is the law of reflection?

Photorealism: Ray Tracing

Raytracing. COSC 4328/5327 Scott A. King

LIGHT. Speed of light Law of Reflection Refraction Snell s Law Mirrors Lenses

Algebra Based Physics

Physics 1C. Lecture 22A. "There are two ways of spreading light: to be the candle or the mirror that reflects it." --Edith Wharton

CS 428: Fall Introduction to. Raytracing. Andrew Nealen, Rutgers, /18/2009 1

Optics INTRODUCTION DISCUSSION OF PRINCIPLES. Reflection by a Plane Mirror

Name Section Date. Experiment Reflection and Refraction

General Physics II. Mirrors & Lenses

Chapter 5 Mirrors and Lenses

Physics Experiment 13

Investigation 21A: Refraction of light

Purpose: To determine the index of refraction of glass, plastic and water.

Lecture 7 Notes: 07 / 11. Reflection and refraction

Computer Graphics. Lecture 9 Environment mapping, Mirroring

Refraction of Light. c = m / s. n = c v. The index of refraction is never less than 1. Some common indices of refraction are listed below.

Light and the Properties of Reflection & Refraction

Chapter 18 Ray Optics

At the interface between two materials, where light can be reflected or refracted. Within a material, where the light can be scattered or absorbed.

Ray Tracing. Kjetil Babington

11.2 Refraction. December 10, Wednesday, 11 December, 13

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

Chapter 32 Light: Reflection and Refraction. Copyright 2009 Pearson Education, Inc.

Illumination. Courtesy of Adam Finkelstein, Princeton University

Reflection and Refraction

SESSION 5: INVESTIGATING LIGHT. Key Concepts. X-planation. Physical Sciences Grade In this session we:

Today s Topic: Refraction / Snell s Law

REFLECTION & REFRACTION

Optics: Laser Light Show Student Advanced Version

LECTURE 25 Spherical Refracting Surfaces. Geometric Optics

Overview: Ray Tracing & The Perspective Projection Pipeline

Turn on the Lights: Reflectance

Refraction of Light. Research Problem. Materials. Procedure. Due Date. Glass Block Protractor Ruler PENCIL 4 Pins Cardboard

Chapter 26 Geometrical Optics

COMP30019 Graphics and Interaction Ray Tracing

Home Lab 7 Refraction, Ray Tracing, and Snell s Law

Refraction and Polarization of Light

Ray Optics. Lecture 23. Chapter 23. Physics II. Course website:

Experiment 7 Geometric Optics

Index of Refraction and Total Internal Reflection

Ø Sampling Theory" Ø Fourier Analysis Ø Anti-aliasing Ø Supersampling Strategies" Ø The Hall illumination model. Ø Original ray tracing paper

COMP 175 COMPUTER GRAPHICS. Lecture 11: Recursive Ray Tracer. COMP 175: Computer Graphics April 9, Erik Anderson 11 Recursive Ray Tracer

Lab 9. Reflection and Refraction

Outline The Refraction of Light Forming Images with a Plane Mirror 26-3 Spherical Mirror 26-4 Ray Tracing and the Mirror Equation

Lighting and Reflectance COS 426

Reflection and Refraction of Light

3/10/2019. Models of Light. Waves and wave fronts. Wave fronts and rays

Physics 202, Lecture 23

Wavefronts and Rays. When light or other electromagnetic waves interact with systems much larger than the wavelength, it s a good approximation to

All forms of EM waves travel at the speed of light in a vacuum = 3.00 x 10 8 m/s This speed is constant in air as well

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

Lecture 11: Ray tracing (cont.)

Introduction to Visualization and Computer Graphics

Homework Set 3 Due Thursday, 07/14

PHYSICS. Chapter 34 Lecture FOR SCIENTISTS AND ENGINEERS A STRATEGIC APPROACH 4/E RANDALL D. KNIGHT

Lecture 14: Refraction

Physics 102: Lecture 17 Reflection and Refraction of Light

Lighting affects appearance

Willis High School Physics Workbook Unit 7 Waves and Optics

Lecture Ray Model of Light. Physics Help Q&A: tutor.leiacademy.org

Reflections. I feel pretty, oh so pretty

Movie: For The Birds. Announcements. Ray Tracing 1. Programming 2 Recap. Programming 3 Info Test data for part 1 (Lines) is available

Chapter 12 Notes: Optics

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Refraction and Lenses. Honors Physics

Shading, Advanced Rendering. Week 7, Wed Feb 28

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Chapter 26 Geometrical Optics

Light: Geometric Optics

Light. Form of Electromagnetic Energy Only part of Electromagnetic Spectrum that we can really see

Ray Optics. Lecture 23. Chapter 34. Physics II. Course website:

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Refraction Ch. 29 in your text book

(Equation 24.1: Index of refraction) We can make sense of what happens in Figure 24.1

Dispersion (23.5) Neil Alberding (SFU Physics) Physics 121: Optics, Electricity & Magnetism Spring / 17

Ray Tracing: Special Topics CSCI 4239/5239 Advanced Computer Graphics Spring 2018

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007

CS 325 Computer Graphics

Refraction: Snell's Law. October 26, 2010

Recursion and Data Structures in Computer Graphics. Ray Tracing

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Reflection and Shading

Optics Course (Phys 311) Geometrical Optics Refraction through Lenses

Shading I Computer Graphics I, Fall 2008

Transcription:

Reflection and Refraction Lecture #21 Tuesday, ovember 18, 2014 How about Interreflections! ote reflections! Granite tabletop! Visible on base! Also on handle This is a featured picture on the English language ikipedia (Featured pictures) and is considered one of the finest images. (October 2012) Attribution: Greg L at en.wikipedia [CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0) or GFDL (http://www.gnu.org/copyleft/fdl.html)], via ikimedia Commons 12/2/14 Bruce Draper & J. Ross Beveridge 2013 2

Rationale for Interreflections! ot all the light striking a surface comes directly from a light source.! Some reflects off one surface onto another.! Diffuse often ignores reflected light:! Because its small, and we can get away with it! Because it is very expensive to compute! Specular reflection much more sensitive! Just consider reflections in previous image. 12/2/14 Bruce Draper & J. Ross Beveridge 2013 3 Interreflections v L In the case of mirrors or shiny objects, this can have a major impact 12/2/14 Bruce Draper & J. Ross Beveridge 2013 4

Recursive Ray Tracing! To add interreflections to the specular reflection term, we need to know the light hitting the surface in reflection direction.! Cast a ray in reflection direction! See what surface it hits! Calculate the light of that surface point! this is what we did for the viewing ray! 12/2/14 Bruce Draper & J. Ross Beveridge 2013 5 Reflection and Refraction! P is the point on surface A! is the surface normal of A at P! L is a vector from P to a light source! signed oposite of ray being traced L H R! H is the reflection of -L hitting A at P! R is the reflection of - hitting A at P! T is the refraction for - hitting A at P A P θ t T Add the result of ray tracing with R to the ambient, diffuse and specular components at P. If semi-transparent, also add ray tracing with T. 12/2/14 Bruce Draper & J. Ross Beveridge 2013 6

Translucence! Some light passes through the material.! Typically, passed through light gets the diffuse reflection properties of the surface, unless object is 100% translucent (i.e. transparent)! Speed of light is a function of the medium! This causes light to bend at boundaries! example: looking at the bottom of a pool 12/2/14 Bruce Draper & J. Ross Beveridge 2013 7 Refraction - ith Trigonomety! Key is Snell s law angle of incidence θ r angle of refraction sin( θ t )= η i sin η t η i index of refraction material #1 η t index of refraction material #2 ( ) R The refraction ray is: " T = η i $ cos # η t ( ) cos( θ t ) % ' η i & η t θ t T 12/2/14 Bruce Draper & J. Ross Beveridge 2013 8

Practical Refraction: Solids! hen light enters a solid glass object? η air = 1.0 η glass = 1.5 Theta i Sin mu Theta r 0 0.00 0.67 0.00 10 0.17 0.67 6.67 20 0.34 0.67 13.33 30 0.50 0.67 20.00 40 0.64 0.67 26.67 50 0.77 0.67 33.33 60 0.87 0.67 40.00 70 0.94 0.67 46.67 80 0.98 0.67 53.33 90 1.00 0.67 60.00 " θ r = sin 1 η i % $ sin( )' = sin 1 # η r & ( 0.67 sin( )) 12/2/14 Bruce Draper & J. Ross Beveridge 2013 9 More Recursion! This changes ray tracing from tail-recursion to double-recursion light1 light2 camera This is the recursive Refraction ray light3 12/2/14 Bruce Draper & J. Ross Beveridge 2013 10

Practical Refraction: Surfaces! hat happens as it passes through a solid or surface? sinθ 1 = η i η r sin sin = η r η i sinθ 2 sinθ 1 = η i η r η r η i sinθ 2 = sinθ 2 " Overall effect: displacement of the incident vector ote: this assumes the two surfaces of the solid are coplanar! 12/2/14 Bruce Draper & J. Ross Beveridge 2013 11 Refraction - o Trigonometry. First Constraint: Snells Law T = α + β sin( ) 2 µ 2 = sin( θ t ) 2 µ = µ i µ t R ( 1 cos( ) 2 ) µ 2 =1 cos( θ t ) 2 1 ( ) 2 ( ) 2 ( ) µ 2 =1 T ( 1 ( ) 2 ) µ 2 =1 α + β ( ( )) 2 - θ t T This approach based on notes by Drew Kessler and Larry Hodges at Georgia Tech. 12/2/14 Bruce Draper & J. Ross Beveridge 2013 12

Refraction - o Trigonometry Second Constraint: Refraction ray is unit length. T T = ( α + β) α + β = α 2 + 2αβ ( ) =1 ( ) + β 2 =1 Two quadratic equations in two unknowns. Solving is a bit involved, next slide & writeup. Here is the answer. α = µ β = µ ( ) 1 µ 2 + µ 2 ( ) 2 12/2/14 Bruce Draper & J. Ross Beveridge 2013 13 hat if in other Direction? T = α + β sin( ) 2 µ 2 = sin( θ t ) 2 µ = µ i µ t ( 1 cos( ) 2 ) µ 2 =1 cos( θ t ) 2 1 ( ) 2 ( ) 2 ( ) µ 2 =1 T ( 1 ( ) 2 ) µ 2 =1 α + β ( ( )) 2 Squaring makes sign change irrelevant here. - θ t T R But! Choice between multiple quadratic solutions change. So α = µ β = µ ( ) 1 µ 2 + µ 2 ( ) 2 Here there was a sign error until 12/02/14 what you see now is fixed. 12/2/14 Bruce Draper & J. Ross Beveridge 2013 14

A onderful Real Example https://physicsb-2009-10.wikispaces.com Yes, refraction does make everthing upside down and backwards. 12/2/14 Bruce Draper & J. Ross Beveridge 2013 15 The Ugly Truth About Pixels! Ray tracing (as described so far) treats pixels as points on the image plane Simple Pixel Center eighted Area Sample Pixels actually sample light over some area 12/2/14 Bruce Draper & J. Ross Beveridge 2013 16

Two Approaches! Supersampling! Uses an even sampling across the pixel area.! For example, divide pixel into four, nine, sixteen, etc.! Adaptive Sampling! Divide pixel, compute values for each piece! If nearly equal, average! Otherwise, recurse 12/2/14 Bruce Draper & J. Ross Beveridge 2013 17 Uniform Adaptive Sampling! Sample pixel corners.! If pixel corners are near equal, then take average.! Else, subdivide into four sub pixels and repeat. 12/2/14 Bruce Draper & J. Ross Beveridge 2013 18

Stochastic Sampling! Stochastic sampling for distributing rays! One approach:! Divide the pixel into sixteen subpixels! Uniformly draw a point from within each! Average the result! Here is an example: 12/2/14 Bruce Draper & J. Ross Beveridge 2013 19 Uglier Truths - Digital Pixels! Gaps between columns (or rows) for wiring space! Leads to non-square pixels, dead zones! If pixel is overexposed, value is clipped to max, but excess current may bloom neighboring pixels 12/2/14 Bruce Draper & J. Ross Beveridge 2013 20

here a Ray Exits a Sphere! e sketched this approach in class.! Simplification of general fast method. 12/2/14 Bruce Draper & J. Ross Beveridge 2013 21