Ray Tracing. Kjetil Babington

Similar documents
Photorealism: Ray Tracing

COMP371 COMPUTER GRAPHICS

Ray-Tracing. Misha Kazhdan

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

Lighting and Shading

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

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

CPSC GLOBAL ILLUMINATION

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

Review for Ray-tracing Algorithm and Hardware

CS 325 Computer Graphics

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

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

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

Real-Time Ray Tracing Using Nvidia Optix Holger Ludvigsen & Anne C. Elster 2010

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

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

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

Raycast Rendering Maya 2013

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

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

Lecture 18: Primer on Ray Tracing Techniques

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

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

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

Recursion and Data Structures in Computer Graphics. Ray Tracing

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

Indirect Illumination

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

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

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

Lecture 10: Ray tracing

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

Raytracing. COSC 4328/5327 Scott A. King

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

CS559 Computer Graphics Fall 2015

Raytracing CS148 AS3. Due :59pm PDT

Indirect Illumination

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

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

03 RENDERING PART TWO

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

Homework #2. Shading, Ray Tracing, and Texture Mapping

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

Ray tracing. EECS 487 March 19,

Assignment 6: Ray Tracing

Topics and things to know about them:

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

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

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

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

Assignment 2 Ray Tracing

Point based Rendering

COMP30019 Graphics and Interaction Ray Tracing

Computer Graphics Ray Casting. Matthias Teschner

Sung-Eui Yoon ( 윤성의 )

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

Introduction to Visualization and Computer Graphics

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

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

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

Fog and Cloud Effects. Karl Smeltzer Alice Cao John Comstock

Global Illumination. Connelly Barnes CS 4810: Graphics

Recall: Basic Ray Tracer

Shading, Advanced Rendering. Week 7, Wed Feb 28

CS 488. More Shading and Illumination. Luc RENAMBOT

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

Supplement to Lecture 16

Ray Tracer Due date: April 27, 2011

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

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Ray Tracing CSCI 4239/5239 Advanced Computer Graphics Spring 2018

Computer Graphics. Shi-Min Hu. Tsinghua University

COM337 COMPUTER GRAPHICS Other Topics

Level of Details in Computer Rendering

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

Lighting affects appearance

CS 465 Program 5: Ray II

Reflection and Shading

Ray Tracing. CS116B Chris Pollett Apr 20, 2004.

Introduction to Ray-tracing Objectives

Implementation Issues

lecture 19 Shadows - ray tracing - shadow mapping - ambient occlusion Interreflections

lecture 18 - ray tracing - environment mapping - refraction

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

CS 563 Advanced Topics in Computer Graphics Irradiance Caching and Particle Tracing. by Stephen Kazmierczak

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

Computer Graphics Lecture 11

Illumination Algorithms

Lecture 11: Ray tracing (cont.)

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

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

CSE 681 Illumination and Phong Shading

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

Computer Graphics. - Introduction to Ray Tracing - Philipp Slusallek

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

NVIDIA Case Studies:

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

Intro to Ray-Tracing & Ray-Surface Acceleration

The Traditional Graphics Pipeline

Transcription:

Ray Tracing Kjetil Babington 21.10.2011 1

Introduction What is Ray Tracing? Act of tracing a ray through some scene Not necessarily for rendering Rendering with Ray Tracing Ray Tracing is a global illumination based rendering method for generating realistic images 2

Overview Forward Ray tracing Rays from light source bounce of objects before reaching the camera Computational wastage Backward Ray tracing Track only those rays that finally made it to the camera 3

Ray Casting Ray Casting visible surfaces of objects are found by throwing (or casting) rays of light from the viewer into the scene Ray Tracing Extension to Ray casting Recursively cast rays from the points of intersection 4

Tree of Light Contributions of light grows at each contact point 1 is the sum of reflected component R 4, transmitted component T 1 and the local component L 1 Local component is the ambient, diffuse and specular reflections at P h 5

Ray Tracing Sometimes a ray misses all the objects created by Michael Sweeny, et al for ACM SIGGRAPH Education slide set 1991 6

Ray Tracing (contd.) Sometimes the Ray hits an objects created by Michael Sweeny, et al for ACM SIGGRAPH Education slide set 1991 7

Phong Traditional shading model Improved model 8 n j s j d a H N k k I I L N ) ( ) ( k T S k k I I t s j d a L N ) (

Ray Tracing (contd.) Is the intersected point in shadow? Send Shadow Rays to light source created by Michael Sweeny, et al for ACM SIGGRAPH Education slide set 1991 9

Adding shadows P is not in shadow with respect to L 1 P is in the shadow of the cube with respect to L 2 Self-shadowing of P with respect to L 3 Shadow rays Spawn a ray from P to the light sources If there is an intersection of the shadow ray with any object then P is in shadow Courtesy F.S. Hill, Computer Graphics using OpenGL 10

Ray Tracing (contd.) Reflected ray generated at point of intersection Tested with all the objects in the scene created by Michael Sweeny, et al for ACM SIGGRAPH Education slide set 1991 11

Reflection Given a surface normal n and incident ray a you can find the reflected ray r 180 1 adapted from F.S. Hill, Computer Graphics using OpenGL 12

Ray Tracing (contd.) Transparent object Spawn a transmitted ray and test against all objects in the scene created by Michael Sweeny, et al for ACM SIGGRAPH Education slide set 1991 13

Refraction Bending of light rays as it crosses interface between media having different refractive indices Snell s Law c sin c sin 1 1 2 2 c 1,c 2 Refractive index Courtesy F.S. Hill, Computer Graphics using OpenGL 14

Requirements for Ray tracing Send a ray into the scene for each 2D image pixel Compute the intersection point of ray with nearest object in scene Test each primitive in the scene for intersection Find nearest intersection Recursively spawn rays from the point of intersection Shadow Rays Reflected rays Transmitted rays Accumulate the color from each of the spawned rays at the point of intersection 15

Reflection Created by David Derman CISC 440 16

Reflection Created by David Derman CISC 440 17

Reflection Created by David Derman CISC 440 18

Reflection Created by David Derman CISC 440 19

Ray tracing flow Local Phong illumination Figure out reflected/ refracted ray direction and recurse Adapted from F.S. Hill and CISC 640/440, Fall 2005 20

Super-sampling Ray tracing is a point-sampling process Take discrete looks at the scene along individual rays passing through each pixel Reduce aliasing due to this discrete signal sampling 21

Super-sampling Instead of shooting one ray per pixel, shoot four rays through the corners of a pixel Color at the pixel is the average of the colors at each corners Adaptive super-sampling Compute the intensity variation between the four corners with the average Shoot more rays through corners with higher intensity variation Compute final color as a weighted average rather than the regular average Courtesy F.S. Hill, Computer Graphics using OpenGL 22

Using bounding boxes Most of the time is spent in computing intersections Each ray should be intersected with every object in the scene Each ray, spawns out reflected/transmitted rays which have to be interested with the objects in the scene 23

Bounding box Bounding box of an object is a shape that encloses a object Compute complicated intersections if and only if the ray hits the bounding box Two shapes most commonly used as bounding boxes Sphere specified by a center and radius (C, r) Box specified by sides aligned to the coordinate axis 24

Real time ray tracing using nvidia Optix Paper by H. Ludvigsen and A. C. Elster Presented at Eurographics 2010 Optix, a ray tracing framework Showed that Optix can achieve real time ray tracing performance Optix can give near perfect speed up by using 2 GPUs 25

References Papers I presented An Improved Illumination Model for Shaded Display http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.156.1534 Real-Time Ray Tracing Using Nvidia OptiX. H. Ludvigsen1 and A. C. Elster http://www.idi.ntnu.no/~elster/pubs/eurographics-ludvigsen-elster.pdf 26