Ray Tracing. Local Illumination. Object Space: Global Illumination. Image Space: Backward Ray Tracing. First idea: Forward Ray Tracing

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

COMP371 COMPUTER GRAPHICS

Photorealism: Ray Tracing

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

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

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

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

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

Lighting and Shading

CS5620 Intro to Computer Graphics

Raytracing. COSC 4328/5327 Scott A. King

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

Supplement to Lecture 16

Last Time. Correct Transparent Shadow. Does Ray Tracing Simulate Physics? Does Ray Tracing Simulate Physics? Refraction and the Lifeguard Problem

Ray Tracing. Kjetil Babington

Global Illumination. COMP 575/770 Spring 2013

Illumination. Michael Kazhdan ( /657) HB Ch. 14.1, 14.2 FvDFH 16.1, 16.2

Computer Graphics. Ray Tracing. Copyright Gotsman, Elber, Barequet, Karni, Sheffer. Page 1. Ray-Tracing. Illumination Models

Indirect Illumination

A Brief Overview of. Global Illumination. Thomas Larsson, Afshin Ameri Mälardalen University

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

Indirect Illumination

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

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

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

Ray Tracer Due date: April 27, 2011

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

Lecture 18: Primer on Ray Tracing Techniques

Ray-Tracing. Misha Kazhdan

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

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

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping

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

RAYTRACING. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION. HPCViz, KTH Royal Institute of Technology, Sweden

COMPUTER GRAPHICS AND INTERACTION

CS 325 Computer Graphics

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

Intro to Ray-Tracing & Ray-Surface Acceleration

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

Implementation Issues

Illumination Algorithms

Modeling Transformations

Computer Graphics Lecture 11

COMPLETION OF Z-buffer Graphics Pipeline

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

SAMPLING AND NOISE. Increasing the number of samples per pixel gives an anti-aliased image which better represents the actual scene.

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

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD

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

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

Sung-Eui Yoon ( 윤성의 )

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

Lecture 10: Ray tracing

Global Illumination The Game of Light Transport. Jian Huang

The Rendering Equation. Computer Graphics CMU /15-662

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

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

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

Recall: Basic Ray Tracer

Introduction to Visualization and Computer Graphics

Ray tracing. EECS 487 March 19,

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model

The Rendering Equation and Path Tracing

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

Reflection and Shading

Assignment 6: Ray Tracing

Lighting and Reflectance COS 426

Illumination. Courtesy of Adam Finkelstein, Princeton University

CS 6620 Shading. Steve Parker Peter Shirley

Modeling Transformations

Final Project: Real-Time Global Illumination with Radiance Regression Functions

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

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

Illumination Models and Shading

Review for Ray-tracing Algorithm and Hardware

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

Chapter 5 Mirror and Lenses

Chapter 11. Caustics and Global Illumination

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

Ray Tracing. Quiz Discussion. Announcements: Final Projects. Last Time? Durer s Ray Casting Machine. Today

Complex Shading Algorithms

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

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

Shading, Advanced Rendering. Week 7, Wed Feb 28

Ray Tracing. Johns Hopkins Department of Computer Science Course : Rendering Techniques, Professor: Jonathan Cohen

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

COMP30019 Graphics and Interaction Ray Tracing

Raytracing & Epsilon. Today. Last Time? Forward Ray Tracing. Does Ray Tracing Simulate Physics? Local Illumination

Raycast Rendering Maya 2013

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

Specular reflection. Lighting II. Snell s Law. Refraction at boundary of media

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

Global Illumination. Connelly Barnes CS 4810: Graphics

Chapter 7 - Light, Materials, Appearance

Photon Mapping. Due: 3/24/05, 11:59 PM

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Ray Tracing. Last Time? Today. Ray Casting. Durer s Ray Casting Machine. Reading for Today

Other Rendering Techniques CSE 872 Fall Intro You have seen Scanline converter (+z-buffer) Painter s algorithm Radiosity CSE 872 Fall

Transcription:

CSCI 420 Computer Graphics Lecture 15 Ra Tracing Ra Casting Shadow Ras Reflection and Transmission [Angel Ch. 11] Local Illumination Object illuminations are independent No light scattering between objects No real shadows, reflection, transmission OpenGL pipeline uses this Jernej Barbic Universit of Southern California 1 2 Global Illumination Ra tracing (highlights, reflection, transmission) Radiosit (surface interreflections) Photon mapping Precomputed Radiance Transfer (PRT) Object Space: Graphics pipeline: for each object, render Efficient pipeline architecture, real-time Difficult: object interactions (shadows, reflections, etc.) Image Space: Ra tracing: for each piel, determine color Piel-level parallelism Difficult: ver intensive computation, usuall off-line 3 4 First idea: Forward Ra Tracing Shoot (man) light ras from each light source Ras bounce off the objects Simulates paths of photons Problem: man ras will miss camera and not contribute to! This algorithm is not practical Backward Ra Tracing Shoot one ra from camera through each piel in 5 6 1

Generating Ras Generating Ras Camera is at (0,0,0) and points in the negative -direction Must determine coordinates of corners in 3D field of view angle (fov) center of projection (COP) ra h aspect ratio = w / h w 7 frontal view 8 Generating Ras Generating Ras = tan(fov/2) a = aspect ratio = w / h COP field of view angle (fov) = 0 = 0 f = 1 = -tan(fov/2) 9 = -a tan(fov/2) = tan(fov/2) = -a tan(fov/2) = -tan(fov/2) h w = 0 = 0 frontal view = a tan(fov/2) = tan(fov/2) = a tan(fov/2) = -tan(fov/2) 10 Determining Piel Color 1. Phong model (local as before) 2. Shadow ras 3. Specular reflection 4. Specular transmission Steps (3) and (4) require recursion. Shadow Ras Determine if light reall hits surface point Cast shadow ra from surface point to each light If shadow ra hits opaque object, no contribution from that light This is essentiall improved diffuse reflection light source object 2 shadow ra (blocked) n ra camera object 1 11 12 2

Phong Model If shadow ra can reach to the light, appl a standard Phong model light source shadow ra (unblocked) n l ra camera v object Where is Phong model applied in this eample? Which shadow ras are blocked? 13 14 Reflection Ras For specular component of illumination Compute reflection ra (recall: backward!) Call ra tracer recursivel to determine color Angle of Reflection Recall: incoming angle = outgoing angle r = 2(l n) n l Compute onl for surfaces that are reflective 15 16 Reflections Eample Transmission Ras Calculate light transmitted through surfaces Eample: water, glass Compute transmission ra Call ra tracer recursivel to determine color www.afara.org 17 18 3

Transmitted Light Inde of refraction is speed of light, relative to speed of light in vacuum Vacuum: 1.0 (per definition) Air: 1.000277 (approimate to 1.0) Water: 1.33 Glass: 1.49 Compute t using Snell s law η l = inde for upper material η t = inde for lower material Translucenc Most real objects are not transparent, but blur the background Scatter light on other side of surface Use stochastic sampling (called distributed ra tracing) 19 20 Transmission + Translucenc Eample The Ra Casting Algorithm Simplest case of ra tracing 1. For each piel (,), fire a ra from COP through (,) 2. For each ra & object, calculate closest intersection 3. For closest intersection point p Calculate surface normal For each light source, fire shadow ra For each unblocked shadow ra, evaluate local Phong model for that light, and add the result to piel color Critical operations Ra-surface intersections Illumination calculation www.povra.org 21 22 Recursive Ra Tracing Also calculate specular component Reflect ra from ee on specular surface Transmit ra from ee through transparent surface Determine color of incoming ra b recursion Trace to fied depth Cut off if contribution below threshold Ra Tracing Assessment Global illumination method Image-based Pluses Relativel accurate shadows, reflections, refractions Minuses Slow (per piel parallelism, not pipeline parallelism) Aliasing Inter-object diffuse reflections require man bounces 23 24 4

Ratracing Eample I Ratracing Eample II www.afara.org www.povra.org 25 26 Ratracing Eample III Ratracing Eample IV www.afara.org 27 www.povra.org 28 Summar Ra Casting Shadow Ras and Local Phong Model Reflection Transmission Net lecture: Geometric queries 29 5