CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017

Similar documents
Geometric optics. The University of Texas at Austin CS384G Computer Graphics Don Fussell

Reading. Ray Tracing. Eye vs. light ray tracing. Geometric optics. Required: Watt, sections , (handout) Further reading:

Ray Tracing. Brian Curless CSEP 557 Fall 2016

Reading. Ray Tracing. Eye vs. light ray tracing. Geometric optics. Required:

Intro to Ray-Tracing & Ray-Surface Acceleration

Sung-Eui Yoon ( 윤성의 )

CPSC GLOBAL ILLUMINATION

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

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

Photorealism: Ray Tracing

Lecture 10: Ray tracing

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

COMP371 COMPUTER GRAPHICS

Supplement to Lecture 16

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

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

Lighting and Shading

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

Ray Tracing. CS334 Fall Daniel G. Aliaga Department of Computer Science Purdue University

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

CS 325 Computer Graphics

Ray Tracing. CPSC 453 Fall 2018 Sonny Chan

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

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

Raytracing CS148 AS3. Due :59pm PDT

Graphics 2009/2010, period 1. Lecture 8: ray tracing

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Topics and things to know about them:

Ray-Tracing. Misha Kazhdan

Pipeline Operations. CS 4620 Lecture 14

Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015

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

Visual cues to 3D geometry. Light Reflection and Advanced Shading. Shading. Recognizing materials. size (perspective) occlusion shading

Lecture 11: Ray tracing (cont.)

Phys102 Lecture 21/22 Light: Reflection and Refraction

CS 465 Program 5: Ray II

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

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

CS-184: Computer Graphics. Administrative

CS 4620 Midterm, March 21, 2017

Ray Tracer Due date: April 27, 2011

Ray Tracing Basics I. Computer Graphics as Virtual Photography. camera (captures light) real scene. photo. Photographic print. Photography: processing

6.837 Introduction to Computer Graphics Final Exam Tuesday, December 20, :05-12pm Two hand-written sheet of notes (4 pages) allowed 1 SSD [ /17]

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.

Effects needed for Realism. Computer Graphics (Fall 2008) Ray Tracing. Ray Tracing: History. Outline

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

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

Shading, Advanced Rendering. Week 7, Wed Feb 28

Ray tracing. EECS 487 March 19,

Accelerating Ray-Tracing

Chapter 7 - Light, Materials, Appearance

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

COMP 175 COMPUTER GRAPHICS. Ray Casting. COMP 175: Computer Graphics April 26, Erik Anderson 09 Ray Casting

CS 4620 Program 4: Ray II

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

The Traditional Graphics Pipeline

Introduction to Visualization and Computer Graphics

EDAN30 Photorealistic Computer Graphics. Ray tracing. Michael Doggett Department of Computer Science Lund university. Copyright 2011 Michael Doggett

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

CS559 Computer Graphics Fall 2015

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

The Traditional Graphics Pipeline

COMPUTER GRAPHICS AND INTERACTION

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

INTRODUCTION REFLECTION AND REFRACTION AT BOUNDARIES. Introduction. Reflection and refraction at boundaries. Reflection at a single surface

Lecture Wave Optics. Physics Help Q&A: tutor.leiacademy.org

Ray Tracing. Kjetil Babington

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

782 Schedule & Notes

Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

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

CSE 167: Introduction to Computer Graphics Lecture #7: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015

COMP environment mapping Mar. 12, r = 2n(n v) v

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

Physics 202, Lecture 23

Computer Graphics. Lecture 02 Graphics Pipeline. Edirlei Soares de Lima.

Computer Graphics. Si Lu. Fall uter_graphics.htm 11/22/2017

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

A Little Background. Motivation. Motivation

Ray Tracing I: Basics

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

Computer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

Geometric Optics. The Law of Reflection. Physics Waves & Oscillations 3/20/2016. Spring 2016 Semester Matthew Jones

Topic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source

Review for Ray-tracing Algorithm and Hardware

SUMMARY. CS380: Introduction to Computer Graphics Ray tracing Chapter 20. Min H. Kim KAIST School of Computing 18/05/29. Modeling

The Traditional Graphics Pipeline

Reading. Distribution Ray Tracing. BRDF, revisited. Pixel anti-aliasing. ω in. Required: Shirley, section Further reading:

CMSC427 Final Practice v2 Fall 2017

Motivation. Sampling and Reconstruction of Visual Appearance. Effects needed for Realism. Ray Tracing. Outline

Topic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component

Pipeline Operations. CS 4620 Lecture 10

CS5620 Intro to Computer Graphics

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Recall: Basic Ray Tracer

Programming projects. Assignment 1: Basic ray tracer. Assignment 1: Basic ray tracer. Assignment 1: Basic ray tracer. Assignment 1: Basic ray tracer

Light. Electromagnetic wave with wave-like nature Refraction Interference Diffraction

AP Physics: Curved Mirrors and Lenses

Transcription:

CS354 Computer Graphics Ray Tracing Qixing Huang Januray 24th 2017

Graphics Pipeline

Elements of rendering Object Light Material Camera

Geometric optics Modern theories of light treat it as both a wave and a particle We will take a combined and somewhat simpler view of light the view of geometric optics Here are the rules of geometric optics: Light is a flow of photons with wavelengths. We ll call these flows light rays Light rays travel in straight lines in free space Light rays do not interfere with each other as they cross Light rays obey the laws of reflection and refraction Light rays travel from the light sources to the eye, but the physics is invariant under path reversal

Synthetic pinhole camera The most common imaging model in graphics is the synthetic pinhole camera: light rays are collected through an infinitesimally small hole and recorded on an image plane For convenience, the image plane is usually placed in front of the camera, giving a non-inverted 2D projection (image) The image of an object point P is at the intersection of the viewing ray through P and the image plane

Eye vs. light ray tracing At the light: light ray tracing (a.k.a., forward ray tracing or photon tracing) At the eye: eye tracing (a.k.a., backward ray tracing) We will generally follow rays from the eye into the scene

Precursors to ray tracing Local illumination Cast one eye ray then shade according to light Appel (1968) Cast one eye ray + one ray to light

Whitted ray-tracing algorithm In 1980, Turner Whitted introduced ray tracing to the graphics community Combines eye ray tracing + rays to light Recursively traces rays Algorithm For each pixel, trace a primary ray in direction V to the first visible surface For each intersection, trace secondary rays: Shadow rays in directions L to light sources Reflected ray in direction R Refracted ray or transmitted ray in direction T

Whitted algorithm

Shading A ray is defined by an origin P and a unit direction d and is parameterized by t: Let I(P, d) be the intensity seen along that ray. Then: Where is computed from the Phong model Typically, we set and

Reflection and transmission Law of reflection: Snell s law of refraction Where are indices of refraction

Total internal reflection The equation for the angle of refraction can be computed from Snell's law: What happens when? When is exactly, we say that has achieved the critical angle For, no rays are transmitted, and only reflection occurs, a phenomenon known as total internal reflection or TIR

Ray-tracing pseudocode We build a ray traced image by casting rays through each of the pixels

Ray-tracing pseudocode, cont d

Terminating recursion Q: How do you terminate out of recursive ray tracing?

Shading pseudocode Next, we need to calculate the color returned by the shade function This will be discussed in depth next Monday

Eye vs. light ray tracing

Shadow attenuation Computing a shadow can be as simple as checking to see if a ray makes it to the light source For a point light source: Q: What if there are transparent objects along a path to the light source?

Ray-plane intersection We can write down the plane equation Using parameterized line segment We can solve for the intersection parameter

Ray-triangle intersection To intersect with a triangle, we first obtain its plane equation Then, we need to decide if the point is inside or outside of the triangle

Ray-triangle intersection Project down a dimension and compute barycentric coordinates from 2D points Why is this solution possible? Which axis should you project away?

Barycentric coordinate from area ratios A p B C

Möller Trumbore intersection algorithm Parametric Plane Parametric line segment Linear system

Möller Trumbore intersection algorithm Linear system

https://en.wikipedia.org/wiki/m%c3%b6ller%e2%80%93trumbore_intersection_algorithm

Interpolating vertex properties The barycentric coordinates can also be used to interpolate vertex properties material/texture coordinates/type equation here.normals For example Interpolating normal directions, known as Phong interpolation, gives triangle meshes a smooth shading appearance. (Note: don t forget to normalize interpolated normal directions)

Epsilons Due to finite precision arithmetic, we do not always get the exact intersection at a surface Q: What kinds of problems might this cause? Q: How to address this?

Intersecting with transformed geometry In general, objects will be placed using transformations. What if the object being intersected were transformed by a matrix M? Apply the inverse of M to the ray first and intersect in object (local) coordinates Q: The intersected normal is in object (local) coordinates. How do we transform it to world coordinates?

Next Lecture More about ray tracing, math, and transforms Special thanks for Don Fussell for many of the slides

Reading Whitted. An improved illumination model for shaded display. Communications of the ACM 23(6), 343-349, 1980 https://en.wikipedia.org/wiki/ray_tracing_(gr aphics)

Questions?