# Lecture 11: Ray tracing (cont.)

Size: px
Start display at page:

Transcription

1 Interactive Computer Graphics Ray tracing - Summary Lecture 11: Ray tracing (cont.) Graphics Lecture 10: Slide 1 Some slides adopted from H. Pfister, Harvard Graphics Lecture 10: Slide 2 Ray tracing - Summary Ray tracing - Summary trace ray Intersect all objects color = ambient term For every light cast shadow ray col += local shading term If mirror col += k_refl * trace reflected ray If transparent col += k_trans * trace transmitted ray trace ray Intersect all objects color = ambient term For every light cast shadow ray col += local shading term If mirror col += k_refl * trace reflected ray If transparent col += k_trans * trace transmitted ray Graphics Lecture 10: Slide 3 Graphics Lecture 10: Slide 4 1

2 Ray tracing - Summary Intersection calculations primary ray primary ray For each ray we must calculate all possible intersections with each object inside the viewing volume For each ray we must find the nearest intersection point We can define our scene using Solid models sphere cylinder Surface models plane triangle polygon secondary rays Graphics Lecture 10: Slide 5 Graphics Lecture 10: Slide 6 Rays Rays are parametric lines Rays can be defined an origin p 0 direction d Equation of ray: Ray tracing: Intersection calculations The coordinates of any point along each primary ray are given by: p 0 is the current pixel on the viewing plane. d is the direction vector and can be obtained from the position of the pixel on the viewing plane p 0 and the viewpoint p v : Graphics Lecture 10: Slide 7 Graphics Lecture 10: Slide 8 2

3 Ray tracing: Intersection calculations The viewing ray can be parameterized by µ: µ > 0 denotes the part of the ray behind the viewing plane µ < 0 denotes the part of the ray in front of the viewing plane For any visible intersection point µ > 0 Intersection calculations: Spheres µ < 0 µ > 0 For any point on the surface of the sphere p 0 where r is the radius of the sphere Graphics Lecture 10: Slide 9 Graphics Lecture 10: Slide 10 Intersection calculations: Spheres To test whether a ray intersects a surface we can substitute for q using the ray equation: Intersection calculations: Spheres The quadratic equation has the following solution: Setting and expanding the dot product produces the following quadratic equation: Solutions: if the quadratic equation has no solution, the ray does not intersect the sphere if the quadratic equation has two solutions (µ 1 < µ 2 ): µ 1 corresponds to the point at which the rays enters the sphere µ 2 corresponds to the point at which the rays leaves the sphere Graphics Lecture 10: Slide 11 Graphics Lecture 10: Slide 12 3

4 Precision Problems In ray tracing, the origin of (secondary) rays is often on the surface of objects Theoretically, µ = 0 for these rays Practically, calculation imprecision creeps in, and the origin of the new ray is slightly beneath the surface Result: the surface area is shadowing itself ε to the rescue... Check if t is within some epsilon tolerance: if abs(µ) < ε point is on the sphere else point is inside/outside Choose the ε tolerance empirically Move the intersection point by epsilon along the surface normal so it is outside of the object Check if point is inside/outside surface by checking the sign of the implicit (sphere etc.) equation Graphics Lecture 10: Slide 13 Graphics Lecture 10: Slide 14 Problem Time Given: the viewpoint is at p v = (0, 0, -10) the ray passes through viewing plane at p i = (0, 0, 0). Spheres: Sphere A with center p s = (0, 0, 8) and radius r = 5 Sphere B with center p s = (0, 0, 9) and radius r = 3 Sphere C with center p s = (0, -3, 8) and radius r = 2 Calculate the intersections of the ray with the spheres above. Solution The direction vector is d = (0, 0, 10) / 10 = (0, 0, 1) Sphere A: Δp = (0, 0, 8), so µ = 8 ± sqrt( ) = 8 ± 5 As the result, the ray enters A sphere at (0, 0, 3) and exits the sphere at (0, 0, 13)). Sphere B: Δp = (0, 0, 9), so µ = 9 ± sqrt( ) = 9 ± 3 As the result, the ray enters B sphere at (0, 0, 6) and exits the sphere at (0, 0, 12)). Sphere C has no intersections with ray. Graphics Lecture 10: Slide 15 Graphics Lecture 10: Slide 16 4

5 Intersection calculations: Cylinders Intersection calculations: Cylinders A cylinder can be described by a position vector p 1 describing the first end point of the long axis of the cylinder a position vector p 2 describing the second end point of the long axis of the cylinder a radius r The axis of the cylinder can be written as and can be parameterized by 0 α 1 To calculate the intersection of the cylinder with the ray: Since write we can p 2 p 1 q Δp Graphics Lecture 10: Slide 17 Graphics Lecture 10: Slide 18 Intersection calculations: Cylinders Intersection calculations: Cylinders Solving for α yields: Using the fact that we can use the same approach as before to the quadratic equation for µ: Substituting we obtain: If the quadratic equation has no solution: no intersection If the quadratic equation has two solutions: intersection Graphics Lecture 10: Slide 19 Graphics Lecture 10: Slide 20 5

6 Intersection calculations: Cylinders Assuming that µ1 µ2 we can determine two solutions: If the value of α1 is between 0 and 1 the intersection is on the outside surface of the cylinder If the value of α2 is between 0 and 1 the intersection is on the inside surface of the cylinder Intersection calculations: Plane Objects are often described by geometric primitives such as triangles planar quads planar polygons To test intersections of the ray with these primitives we must whether the ray will intersect the plane defined by the primitive Graphics Lecture 10: Slide 21 Graphics Lecture 10: Slide 22 Intersection calculations: Plane The intersection of a ray with a plane is given by where p 1 is a point in the plane. Subtracting p 1 and multiplying with the normal of the plane n yields: Solving for µ yields: Intersection calculations: Triangles To calculate intersections: test whether triangle is front facing test whether plane of triangle intersects ray test whether intersection point is inside triangle If the triangle is front facing: Graphics Lecture 10: Slide 23 Graphics Lecture 10: Slide 24 6

7 Intersection calculations: Triangles To test whether plane of triangle intersects ray calculate equation of the plane using Intersection calculations: Triangles A point is inside the triangle if calculate intersections with plane as before To test whether intersection point is inside triangle: Calculate α and β by taking the dot product with a and b: Graphics Lecture 10: Slide 25 Graphics Lecture 10: Slide 26 Ray tracing: Pros and cons Pros: Easy to implement Extends well to global illumination shadows reflections / refractions multiple light bounces atmospheric effects Cons: Speed! (seconds per frame, not frames per second) Speedup Techniques Why is ray tracing slow? How to improve? Too many objects, too many rays Reduce ray-object intersection tests Many techniques! Graphics Lecture 10: Slide 27 Graphics Lecture 10: Slide 28 7

8 Acceleration of Ray Casting Goal: Reduce the number of ray/primitive intersections Conservative Bounding Region First check for an intersection with a conservative bounding region Early reject Graphics Lecture 10: Slide 29 Graphics Lecture 10: Slide 30 Bounding Regions Conservative Bounding Regions What makes a good bounding region? Graphics Lecture 10: Slide 31 Graphics Lecture 10: Slide 32 8

9 Regular Grid Create Grid Find bounding box of scene Choose grid resolution (n x, n y, n z ) grid x need not = grid y Graphics Lecture 10: Slide 33 Graphics Lecture 10: Slide 34 Insert Primitives into Grid Primitives that overlap multiple cells? Insert into multiple cells (use pointers) For Each Cell Along a Ray Does the cell contain an intersection? Yes: return closest intersection No: continue Graphics Lecture 10: Slide 35 Graphics Lecture 10: Slide 36 9

10 Preventing Repeated Computation Perform the computation once, "mark" the object Don't re-intersect marked objects Don't Return Distant Intersections If intersection t is not within the cell range, continue (there may be something closer) Graphics Lecture 10: Slide 37 Graphics Lecture 10: Slide 38 Adaptive Grids Subdivide until each cell contains no more than n elements, or maximum depth d is reached Primitives in an Adaptive Grid Can live at intermediate levels, or be pushed to lowest level of grid Graphics Lecture 10: Slide 39 Graphics Lecture 10: Slide 40 10

11 Binary Space Partition (BSP) Tree Recursively partition space by planes Every cell is a convex polyhedron Binary Space Partition (BSP) Tree Simple recursive algorithms Example: point finding Graphics Lecture 10: Slide 41 Graphics Lecture 10: Slide 42 Binary Space Partition (BSP) Tree Trace rays by recursion on tree BSP construction enables simple front-to-back traversal Grid Discussion Regular + easy to construct + easy to traverse may be only sparsely filled geometry may still be clumped Adaptive + grid complexity matches geometric density more expensive to traverse (especially BSP tree) Graphics Lecture 10: Slide 43 Graphics Lecture 10: Slide 44 11

### Lecture 10: Ray tracing

Interactive Computer Graphics Lecture 10: Ray tracing Graphics Lecture 10: Slide 1 Some slides adopted from H. Pfister, Harvard Graphics Lecture 10: Slide 2 Direct and Global Illumination Direct illumination:

### Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows

Last Time: Acceleration Data Structures for Ray Tracing Modeling Transformations Illumination (Shading) Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion

### Today. Acceleration Data Structures for Ray Tracing. Cool results from Assignment 2. Last Week: Questions? Schedule

Today Acceleration Data Structures for Ray Tracing Cool results from Assignment 2 Last Week: koi seantek Ray Tracing Shadows Reflection Refraction Local Illumination Bidirectional Reflectance Distribution

### Ray-tracing Acceleration. Acceleration Data Structures for Ray Tracing. Shadows. Shadows & Light Sources. Antialiasing Supersampling.

Ray-tracing Acceleration Acceleration Data Structures for Ray Tracing Thanks to Fredo Durand and Barb Cutler Soft shadows Antialiasing (getting rid of jaggies) Glossy reflection Motion blur Depth of field

### Advanced Ray Tracing

Advanced Ray Tracing Thanks to Fredo Durand and Barb Cutler The Ray Tree Ni surface normal Ri reflected ray Li shadow ray Ti transmitted (refracted) ray 51 MIT EECS 6.837, Cutler and Durand 1 Ray Tree

### Effects needed for Realism. Ray Tracing. Ray Tracing: History. Outline. Foundations of Computer Graphics (Spring 2012)

Foundations of omputer Graphics (Spring 202) S 84, Lecture 5: Ray Tracing http://inst.eecs.berkeley.edu/~cs84 Effects needed for Realism (Soft) Shadows Reflections (Mirrors and Glossy) Transparency (Water,

### Ray Tracing. Outline. Ray Tracing: History

Foundations of omputer Graphics Online Lecture 9: Ray Tracing 1 History and asic Ray asting Ravi Ramamoorthi Effects needed for Realism (Soft) Shadows Reflections (Mirrors and Glossy) Transparency (Water,

### Logistics. CS 586/480 Computer Graphics II. Questions from Last Week? Slide Credits

CS 586/480 Computer Graphics II Dr. David Breen Matheson 408 Thursday 6PM Æ 8:50PM Presentation 4 10/28/04 Logistics Read research paper and prepare summary and question P. Hanrahan, "Ray Tracing Algebraic

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

Sampling and Reconstruction of Visual Appearance CSE 274 [Fall 2018], Special Lecture Ray Tracing Ravi Ramamoorthi http://www.cs.ucsd.edu/~ravir Motivation Ray Tracing is a core aspect of both offline

### Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

Ray Tracing III Wen-Chieh (Steve) Lin National Chiao-Tung University Shirley, Fundamentals of Computer Graphics, Chap 10 Doug James CG slides, I-Chen Lin s CG slides Ray-tracing Review For each pixel,

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

Ray tracing Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 3/19/07 1 From last time Hidden surface removal Painter s algorithm Clipping algorithms Area subdivision BSP trees Z-Buffer

### Homework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?

Homework 1: Questions/Comments? Implicit Surfaces,, & Volumetric Data Structures Loop Subdivision Shirley, Fundamentals of Computer Graphics Loop Subdivision SIGGRAPH 2000 course notes Subdivision for

### Supplement to Lecture 16

Supplement to Lecture 16 Global Illumination: View Dependent CS 354 Computer Graphics http://www.cs.utexas.edu/~bajaj/ Notes and figures from Ed Angel: Interactive Computer Graphics, 6 th Ed., 2012 Addison

### CPSC GLOBAL ILLUMINATION

CPSC 314 21 GLOBAL ILLUMINATION Textbook: 20 UGRAD.CS.UBC.CA/~CS314 Mikhail Bessmeltsev ILLUMINATION MODELS/ALGORITHMS Local illumination - Fast Ignore real physics, approximate the look Interaction of

### Ray Tracing. Foley & Van Dam, Chapters 15 and 16

Ray Tracing Foley & Van Dam, Chapters 15 and 16 Ray Tracing Visible Surface Ray Tracing (Ray Casting) Examples Efficiency Issues Computing Boolean Set Operations Recursive Ray Tracing Determine visibility

### Ray Tracing Foley & Van Dam, Chapters 15 and 16

Foley & Van Dam, Chapters 15 and 16 (Ray Casting) Examples Efficiency Issues Computing Boolean Set Operations Recursive Determine visibility of a surface by tracing rays of light from the viewer s eye

### Computer Graphics Ray Casting. Matthias Teschner

Computer Graphics Ray Casting Matthias Teschner Outline Context Implicit surfaces Parametric surfaces Combined objects Triangles Axis-aligned boxes Iso-surfaces in grids Summary University of Freiburg

### Spatial Data Structures

Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) [Angel 9.10] Outline Ray tracing review what rays matter? Ray tracing speedup faster

### Questions from Last Week? Extra rays needed for these effects. Shadows Motivation

CS 431/636 Advanced Rendering Techniques Dr. David Breen University Crossings 149 Tuesday 6PM 8:50PM Presentation 4 4/22/08 Questions from Last Week? Color models Light models Phong shading model Assignment

### CS 431/636 Advanced Rendering Techniques

CS 431/636 Advanced Rendering Techniques Dr. David Breen University Crossings 149 Tuesday 6PM 8:50PM Presentation 4 4/22/08 Questions from Last Week? Color models Light models Phong shading model Assignment

### Ray Casting. Outline in Code. Outline. Finding Ray Direction. Heckbert s Business Card Ray Tracer. Foundations of Computer Graphics (Fall 2012)

Foundations of Computer Graphics (Fall 2012) CS 184, Lectures 17, 18: Nuts and bolts of Ray Tracing Heckbert s Business Card Ray Tracer http://inst.eecs.berkeley.edu/~cs184 Acknowledgements: Thomas Funkhouser

### Computer Graphics. Bing-Yu Chen National Taiwan University

Computer Graphics Bing-Yu Chen National Taiwan University Visible-Surface Determination Back-Face Culling The Depth-Sort Algorithm Binary Space-Partitioning Trees The z-buffer Algorithm Scan-Line Algorithm

### Photorealism: Ray Tracing

Photorealism: Ray Tracing Reading Assignment: Chapter 13 Local vs. Global Illumination Local Illumination depends on local object and light sources only Global Illumination at a point can depend on any

### Spatial Data Structures

15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) April 1, 2003 [Angel 9.10] Frank Pfenning Carnegie

### Ray Casting. Outline. Similar to glulookat derivation. Foundations of Computer Graphics

Foundations of omputer Graphics Online Lecture 10: Ray Tracing 2 Nuts and olts amera Ray asting Outline amera Ray asting (choose ray directions) Ravi Ramamoorthi Outline in ode Image Raytrace (amera cam,

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

To do Continue to work on ray programming assignment Start thinking about final project Lighting Course Outline 3D Graphics Pipeline Modeling (Creating 3D Geometry) Mesh; modeling; sampling; Interaction

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

Computer Graphics Lecture 13 Global Illumination 1: Ray Tracing and Radiosity Taku Komura 1 Rendering techniques Can be classified as Local Illumination techniques Global Illumination techniques Local

### Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Computer Graphics Bing-Yu Chen National Taiwan University The University of Tokyo Hidden-Surface Removal Back-Face Culling The Depth-Sort Algorithm Binary Space-Partitioning Trees The z-buffer Algorithm

### Spatial Data Structures

15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) March 28, 2002 [Angel 8.9] Frank Pfenning Carnegie

### Sung-Eui Yoon ( 윤성의 )

CS380: Computer Graphics Ray Tracing Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Class Objectives Understand overall algorithm of recursive ray tracing Ray generations Intersection

### 1999, Denis Zorin. Ray tracing

Ray tracing Ray tracing shadow rays normal reflected ray pixel ray camera normal Ray casting/ray tracing Iterate over pixels, not objects. Effects that are difficult with Z-buffer, are easy with ray tracing:

### Ray Tracing. Shandong University

Ray Tracing Shandong University Introduction OpenGL is based on a pipeline model in which primitives are rendered one at time - No shadows (except by tricks or multiple renderings) - No multiple reflections

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

Computer Graphics (Fall 2008) COMS 4160, Lecture 15: Ray Tracing http://www.cs.columbia.edu/~cs4160 Effects needed for Realism (Soft) Shadows Reflections (Mirrors and Glossy) Transparency (Water, Glass)

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

CS380: Introduction to Computer Graphics Ray tracing Chapter 20 Min H. Kim KAIST School of Computing Modeling SUMMARY 2 1 Types of coordinate function Explicit function: Line example: Implicit function:

### Ray Casting. To Do. Outline. Outline in Code. Foundations of Computer Graphics (Spring 2012) Heckbert s Business Card Ray Tracer

Foundations of Computer Graphics (Spring 2012) CS 184, Lectures 16, 18: Nuts and bolts of Ray Tracing To Do Finish homework 3 Prepare for Midterm (Monday) Everything before this week (no raytracing) Closed

### Acceleration Data Structures

CT4510: Computer Graphics Acceleration Data Structures BOCHANG MOON Ray Tracing Procedure for Ray Tracing: For each pixel Generate a primary ray (with depth 0) While (depth < d) { Find the closest intersection

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

Lecture 17: Recursive Ray Tracing Where is the way where light dwelleth? Job 38:19 1. Raster Graphics Typical graphics terminals today are raster displays. A raster display renders a picture scan line

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

Lecture 11 Ray tracing Introduction Projection vs. ray tracing Projection Ray tracing Rendering Projection vs. ray tracing Projection Ray tracing Basic methods for image generation Major areas of computer

### S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T Copyright 2018 Sung-eui Yoon, KAIST freely available on the internet http://sglab.kaist.ac.kr/~sungeui/render

### Intro to Ray-Tracing & Ray-Surface Acceleration

Lecture 12 & 13: Intro to Ray-Tracing & Ray-Surface Acceleration Computer Graphics and Imaging UC Berkeley Course Roadmap Rasterization Pipeline Core Concepts Sampling Antialiasing Transforms Geometric

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

CS580: Ray Tracing Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/gcg/ Recursive Ray Casting Gained popularity in when Turner Whitted (1980) recognized that recursive ray casting could

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

Computer Graphics Lecture 10 Global Illumination 1: Ray Tracing and Radiosity Taku Komura 1 Rendering techniques Can be classified as Local Illumination techniques Global Illumination techniques Local

### Spatial Data Structures

CSCI 420 Computer Graphics Lecture 17 Spatial Data Structures Jernej Barbic University of Southern California Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees [Angel Ch. 8] 1 Ray Tracing Acceleration

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

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

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

11 11.1 Basics So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources. Global models include incident light that arrives

### Spatial Data Structures

CSCI 480 Computer Graphics Lecture 7 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids BSP Trees [Ch. 0.] March 8, 0 Jernej Barbic University of Southern California http://www-bcf.usc.edu/~jbarbic/cs480-s/

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

Topic 12: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping Texture sources: Photographs Texture sources: Procedural Texture sources: Solid textures

### Ray casting. Ray casting/ray tracing

Ray casting Ray casting/ray tracing Iterate over pixels, not objects Effects that are difficult with Z-buffer, are easy with ray tracing: shadows, reflections, transparency, procedural textures and objects

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

Topic 11: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip mapping & env mapping Texture sources: Photographs Texture sources: Procedural Texture sources: Solid textures

### Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

Computing Visibility BSP Trees Ray Casting Depth Buffering Quiz Power of Plane Equations We ve gotten a lot of mileage out of one simple equation. Basis for D outcode-clipping Basis for plane-at-a-time

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

Topic 11: Texture Mapping Motivation Sources of texture Texture coordinates Bump mapping, mip mapping & env mapping Topic 11: Photographs Texture Mapping Motivation Sources of texture Texture coordinates

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

Effects needed for realism Global Rendering Computer Graphics 1, Fall 2005 Lecture 7 4th ed.: Ch 6.10, 12.1-12.5 Shadows Reflections (Mirrors) Transparency Interreflections Detail (Textures etc.) Complex

### Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

Visible Surface Determination Visibility Culling Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms Divide-and-conquer strategy:

### Homework #2. Hidden Surfaces, Projections, Shading and Texture, Ray Tracing, and Parametric Curves

Computer Graphics Instructor: Brian Curless CSE 457 Spring 2013 Homework #2 Hidden Surfaces, Projections, Shading and Texture, Ray Tracing, and Parametric Curves Assigned: Sunday, May 12 th Due: Thursday,

### COMP30019 Graphics and Interaction Ray Tracing

COMP30019 Graphics and Interaction Ray Tracing Department of Computer Science and Software Engineering The Lecture outline Ray tracing Recursive Ray Tracing Binary Space Partition (BSP) Trees Refraction

### Parallel Physically Based Path-tracing and Shading Part 3 of 2. CIS565 Fall 2012 University of Pennsylvania by Yining Karl Li

Parallel Physically Based Path-tracing and Shading Part 3 of 2 CIS565 Fall 202 University of Pennsylvania by Yining Karl Li Jim Scott 2009 Spatial cceleration Structures: KD-Trees *Some portions of these

### TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students) Saturday, January 13 th, 2018, 08:30-12:30 Examiner Ulf Assarsson, tel. 031-772 1775 Permitted Technical Aids None, except

### Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://bit.ly/hgvxlh / http://bit.ly/evizre Public

### Accelerating Ray-Tracing

Lecture 9: Accelerating Ray-Tracing Computer Graphics and Imaging UC Berkeley CS184/284A, Spring 2016 Course Roadmap Rasterization Pipeline Core Concepts Sampling Antialiasing Transforms Geometric Modeling

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

Basic Ray Tracing Rendering: Reality Eye acts as pinhole camera Photons from light hit objects Rendering: Reality Eye acts as pinhole camera Photons from light hit objects Rendering: Reality Eye acts as

### Computer Graphics and Image Processing Ray Tracing I

Computer Graphics and Image Processing Ray Tracing I Part 1 Lecture 9 1 Today s Outline Introduction to Ray Tracing Ray Casting Intersecting Rays with Primitives Intersecting Rays with Transformed Primitives

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

Computer Graphics Ray Tracing Based on slides by Dianna Xu, Bryn Mawr College Ray Tracing Example Created by Anto Matkovic Ray Tracing Example Ray Tracing Example Ray Tracing Most light rays do not reach

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

Computer Graphics Si Lu Fall 2017 http://web.cecs.pdx.edu/~lusi/cs447/cs447_547_comp uter_graphics.htm 11/22/2017 Last time o Splines 2 Today o Raytracing o Final Exam: 14:00-15:30, Novermber 29, 2017

### Shading, Advanced Rendering. Week 7, Wed Feb 28

University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Shading, Advanced Rendering Week 7, Wed Feb 28 http://www.ugrad.cs.ubc.ca/~cs314/vjan2007 Reading for Today and Tomorrow

### The Traditional Graphics Pipeline

Last Time? The Traditional Graphics Pipeline Participating Media Measuring BRDFs 3D Digitizing & Scattering BSSRDFs Monte Carlo Simulation Dipole Approximation Today Ray Casting / Tracing Advantages? Ray

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

Recollection Models Pixels Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows Can be computed in different stages 1 So far we came to Geometry model 3 Surface

### Questions??? Announcements Assignment 3 due today

Announcements Assignment 3 due today Questions??? Remember that you have late days (if you haven t used them yet ) Problem set 3 out at the end of the day Movie for Assignment 2 at the end of class 1 Ray

### Geometric Queries for Ray Tracing

CSCI 420 Computer Graphics Lecture 16 Geometric Queries for Ray Tracing Ray-Surface Intersection Barycentric Coordinates [Angel Ch. 11] Jernej Barbic University of Southern California 1 Ray-Surface Intersections

### Lecture 2 - Acceleration Structures

INFOMAGR Advanced Graphics Jacco Bikker - November 2017 - February 2018 Lecture 2 - Acceleration Structures Welcome! I x, x = g(x, x ) ε x, x + න S ρ x, x, x I x, x dx Today s Agenda: Problem Analysis

### INFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Acceleration. Welcome!

INFOGR Computer Graphics J. Bikker - April-July 2015 - Lecture 11: Acceleration Welcome! Today s Agenda: High-speed Ray Tracing Acceleration Structures The Bounding Volume Hierarchy BVH Construction BVH

### Hidden Surface Elimination: BSP trees

Hidden Surface Elimination: BSP trees Outline Binary space partition (BSP) trees Polygon-aligned 1 BSP Trees Basic idea: Preprocess geometric primitives in scene to build a spatial data structure such

### Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016

Accelerating Geometric Queries Computer Graphics CMU 15-462/15-662, Fall 2016 Geometric modeling and geometric queries p What point on the mesh is closest to p? What point on the mesh is closest to p?

### Visible Surface Detection Methods

Visible urface Detection Methods Visible-urface Detection identifying visible parts of a scene (also hidden- elimination) type of algorithm depends on: complexity of scene type of objects available equipment

### Ray Tracing. Last Time? Reading for Today. Reading for Today

Last Time? Ray Tracing Keyframing Procedural Animation Physically-Based Animation Forward and Inverse Kinematics Motion Capture Two solutions Reading for Today Artist-Directed Dynamics for 2D Animation,

### Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Spatial Data Structures and Speed-Up Techniques Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Spatial data structures What is it? Data structure that organizes

### The Traditional Graphics Pipeline

Final Projects Proposals due Thursday 4/8 Proposed project summary At least 3 related papers (read & summarized) Description of series of test cases Timeline & initial task assignment The Traditional Graphics

### The Traditional Graphics Pipeline

Last Time? The Traditional Graphics Pipeline Reading for Today A Practical Model for Subsurface Light Transport, Jensen, Marschner, Levoy, & Hanrahan, SIGGRAPH 2001 Participating Media Measuring BRDFs

### Overview. Pipeline implementation I. Overview. Required Tasks. Preliminaries Clipping. Hidden Surface removal

Overview Pipeline implementation I Preliminaries Clipping Line clipping Hidden Surface removal Overview At end of the geometric pipeline, vertices have been assembled into primitives Must clip out primitives

### Last Time? Ray Casting. Administrivia: Lab & Office Hours. Notes on Assignments. Ray Casting. Overview of Today

Ray Casting Last Time? Luxo Jr. Applications of Computer Graphics Overview of the semester IFS Assignment 0 due tomorrow @ 11:59pm Questions? 1 2 Notes on Assignments Make sure you turn in a linux or windows

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

Lecture 11: Recursive Ray Tracer COMP 175: Computer Graphics April 9, 2018 1/40 Note on using Libraries } C++ STL } Does not always have the same performance. } Interface is (mostly) the same, but implementations

### The feature set you are required to implement in your ray tracer is as follows (by order from easy to hard):

Ray Tracing exercise TAU, Computer Graphics, 0368.3014, semester B Go to the Updates and FAQ Page Overview The objective of this exercise is to implement a ray casting/tracing engine. Ray tracing is a

### Topics and things to know about them:

Practice Final CMSC 427 Distributed Tuesday, December 11, 2007 Review Session, Monday, December 17, 5:00pm, 4424 AV Williams Final: 10:30 AM Wednesday, December 19, 2007 General Guidelines: The final will

### VIII. Visibility algorithms (II)

VIII. Visibility algorithms (II) Hybrid algorithsms: priority list algorithms Find the object visibility Combine the operations in object space (examples: comparisons and object partitioning) with operations

### Point Cloud Filtering using Ray Casting by Eric Jensen 2012 The Basic Methodology

Point Cloud Filtering using Ray Casting by Eric Jensen 01 The Basic Methodology Ray tracing in standard graphics study is a method of following the path of a photon from the light source to the camera,

### CEng 477 Introduction to Computer Graphics Fall 2007

Visible Surface Detection CEng 477 Introduction to Computer Graphics Fall 2007 Visible Surface Detection Visible surface detection or hidden surface removal. Realistic scenes: closer objects occludes the

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

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Raytracing Global illumination-based rendering method Simulates

### Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

Anti-aliased and accelerated ray tracing University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Reading Required: Watt, sections 12.5.3 12.5.4, 14.7 Further reading: A. Glassner.

### Lecture 11. More Ray Casting/Tracing

Lecture 11 More Ray Casting/Tracing Basic Algorithm For each pixel { } Shoot a ray from camera to pixel for all objects in scene Compute intersection with ray Find object with closest intersection Display

### Anti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics

Anti-aliased and accelerated ray tracing University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell eading! equired:! Watt, sections 12.5.3 12.5.4, 14.7! Further reading:! A. Glassner.

### CS-184: Computer Graphics. Administrative

CS-184: Computer Graphics Lecture #10: Raytracing Prof. James O Brien University of California, Berkeley V2005-10-1.1 Administrative Prof. O Brien away this Thursday and Friday Available after class today

### Advanced 3D-Data Structures

Advanced 3D-Data Structures Eduard Gröller, Martin Haidacher Institute of Computer Graphics and Algorithms Vienna University of Technology Motivation For different data sources and applications different

### Interpolation using scanline algorithm

Interpolation using scanline algorithm Idea: Exploit knowledge about already computed color values. Traverse projected triangle top-down using scanline. Compute start and end color value of each pixel

### Ray Tracing. Computer Graphics CMU /15-662, Fall 2016

Ray Tracing Computer Graphics CMU 15-462/15-662, Fall 2016 Primitive-partitioning vs. space-partitioning acceleration structures Primitive partitioning (bounding volume hierarchy): partitions node s primitives

### Viewing and Ray Tracing. CS 4620 Lecture 4

Viewing and Ray Tracing CS 4620 Lecture 4 2014 Steve Marschner 1 Projection To render an image of a 3D scene, we project it onto a plane Most common projection type is perspective projection 2014 Steve

### CPSC / Texture Mapping

CPSC 599.64 / 601.64 Introduction and Motivation so far: detail through polygons & materials example: brick wall problem: many polygons & materials needed for detailed structures inefficient for memory

### COMPUTER GRAPHICS COURSE. Ray Tracing

COMPUTER GRAPHICS COURSE Ray Tracing Georgios Papaioannou - 2015 RAY TRACING PRINCIPLES What is ray tracing? A general mechanism for sampling paths of light in a 3D scene We will use this mechanism in

### Ray Casting. 3D Rendering. Ray Casting. Ray Casting. Ray Casting. Ray Casting

Rendering Ray asting The color of each pixel on the view plane depends on the radiance emanating from visible surfaces dam inkelstein rinceton University OS 6, Spring 00 Simplest method is ray casting

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

Recursive Ray Tracing Ron Goldman Department of Computer Science Rice University Setup 1. Eye Point 2. Viewing Screen 3. Light Sources 4. Objects in Scene a. Reflectivity b. Transparency c. Index of Refraction