Recursion and Data Structures in Computer Graphics. Ray Tracing

Similar documents
CS 4204 Computer Graphics

Photorealism: Ray Tracing

COMPLETION OF Z-buffer Graphics Pipeline

Ray Tracing. Kjetil Babington

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

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

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

Ray-Tracing. Misha Kazhdan

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

COMP371 COMPUTER GRAPHICS

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

Lecture 18: Primer on Ray Tracing Techniques

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

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

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

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

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

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

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

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

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

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

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

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

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

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

Sung-Eui Yoon ( 윤성의 )

Ray tracing. EECS 487 March 19,

Building a Fast Ray Tracer

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

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

Ray Tracing I. Internet Raytracing Competition

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

Lecture 32 of 41. Lab 6: Ray Tracing with ACM SIGGRAPH Demo & POV-Ray

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

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

Ray Tracing Foley & Van Dam, Chapters 15 and 16

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

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

Photorealistic 3D Rendering for VW in Mobile Devices

Topics. Ray Tracing II. Intersecting transformed objects. Transforming objects

Ray Tracing: Intersection

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

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

CS 325 Computer Graphics

Ray tracing. Methods of Programming DV2. Introduction to ray tracing and XML. Forward ray tracing. The image plane. Backward ray tracing

Raytracing. COSC 4328/5327 Scott A. King

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

Review for Ray-tracing Algorithm and Hardware

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

Topics. Ray Tracing II. Transforming objects. Intersecting transformed objects

Image-based Lighting

Ray Tracer Due date: April 27, 2011

Computer Graphics. - Ray Tracing I - Marcus Magnor Philipp Slusallek. Computer Graphics WS05/06 Ray Tracing I

Assignment 2 Ray Tracing

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

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

03 RENDERING PART TWO

Enabling immersive gaming experiences Intro to Ray Tracing

Intro to Ray-Tracing & Ray-Surface Acceleration

Global Illumination The Game of Light Transport. Jian Huang

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

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

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

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

Raycast Rendering Maya 2013

CPSC GLOBAL ILLUMINATION

Lighting and Shading

Acceleration Data Structures

Interactive Cloth Simulation. Matthias Wloka NVIDIA Corporation

A Little Background. Motivation. Motivation

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

Chapter 9- Ray-Tracing

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

Shading, Advanced Rendering. Week 7, Wed Feb 28

Practical Techniques for Ray Tracing in Games. Gareth Morgan (Imagination Technologies) Aras Pranckevičius (Unity Technologies) March, 2014

Global Illumination. COMP 575/770 Spring 2013

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

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

Spatial Data Structures

Advanced Ray Tracing

Ray Tracing Part 1. CSC418/2504 Introduction to Computer Graphics. TA: Muhammed Anwar & Kevin Gibson

Spatial Data Structures

Ray Tracing Acceleration. CS 4620 Lecture 20

CS354R: Computer Game Technology

Indirect Illumination

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

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

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

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

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

Assignment 6: Ray Tracing

Practical 2: Ray Tracing

Computer Graphics. - Introduction to Ray Tracing - Philipp Slusallek

Chapter 7 - Light, Materials, Appearance

Luxo Jr. (Pixar, 1986) Last Time. Real Cameras and Ray Tracing. Standard Rasterization. Lights, Cameras, Surfaces. Now Playing:

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

Ray Tracing Part 2. CSC418/2504 Introduction to Computer Graphics. TA: Muhammed Anwar

Topics and things to know about them:

COS 116 The Computational Universe Laboratory 10: Computer Graphics

Transcription:

Recursion and Data Structures in Computer Graphics Ray Tracing 1

Forward Ray Tracing imagine that you take a picture of a room using a camera exactly what is the camera sensing? light reflected from the surfaces of objects into the camera lens 2

Forward Ray Tracing camera or "eye" light source 3

Forward Ray Tracing forward ray tracing traces the paths of light from the light source to the camera to produce an image computationally infeasible because almost all of the possible paths of light miss the camera 4

Backward Ray Tracing backward ray tracing traces the paths of light from the camera out into the environment to produce an image computationally feasible because the process starts with a single* ray per screen pixel 5

Why Ray Tracing: Shadows shadows with ~1000 light sources 6 Ray Tracing for the Movie 'Cars', P. Christensen et al

Ray Tracing: Reflections 7 Ray Tracing for the Movie 'Cars', P. Christensen et al

Ray Tracing: Reflections 8 Ray Tracing for the Movie 'Cars', P. Christensen et al

Comment on Previous Images most of the rendering in the previous images was not done using ray tracing ray tracing was only used on those parts of the image that would produce a noticeable difference 9

Backward Ray Tracing 10 http://en.wikipedia.org/wiki/file:ray_trace_diagram.svg

Pseudocode for recursive raytracing (missing base cases) Color raytrace(ray) { if ray hits an object { color0 = object_color if object is shiny { color1 = raytrace(reflected_ray) } if object is transparent { color2 = raytrace(transmitted_ray) } return color0 + color1 + color2; } return background_color } 11

Shadows we can determine if a point is in shadow by tracing rays from the point to each light source called shadow rays if a shadow ray hits an object before it reaches the light source then the point is in shadow 12

Shadows not shadowed from L1 shadowed from L2 shadowed from L3 13

Reflections if the ray hits a shiny object then we would like to know what reflection is seen at the hit point we can cast a new ray in the mirror reflection direction to determine the reflection 14

Reflections incoming ray reflection ray 15

Transparent Objects if the ray hits a transparent object then we would like to know what can be seen through the object we can cast a new ray in the refraction direction to determine what can be seen through the object 16

Transparent Objects incoming ray refraction ray 17

Recursion each reflected and refracted ray can be treated as a new view ray emanating from a hit point i.e., we recursively trace the reflected and refracted rays 18

Ray Tracing as a Binary Tree shadow rays 19

Stopping the Recursion what are the base cases? ray misses all objects level of recursion exceeds a fixed value other cases outside the scope of EECS1030 20

How Fast is Ray Tracing approaching real time for non-cinematic quality, e.g., Brigade 2 game engine NVIDA OptiX demos here if you have a high-end NVIDIA graphics card cinematic quality is much slower 21

How Fast is Ray Tracing 678 million triangles rays 111 million diffuse 37 million specular 26 million shadow 1.2 billion ray-triangle intersections 106 minutes on 2006 hardware 22

Bounding Volumes it is easy to compute the intersection of a ray with certain shapes, e.g., spheres and cubes it is hard or expensive to compute the intersection of a ray with arbitrary shapes idea put complex shapes inside simple ones 23

Bounding Volumes 24

Hierarchy of Bounding Volumes why stop at putting complex shapes into bounding volumes? why not put bounding volumes inside bounding volumes? 25

Hierarchy of Bounding Volumes 26

Spatial Subdivision instead of putting objects inside volumes we can subdivide space 27

Quadtree Decomposition 28

29 and so on...

Using a Quadtree in Ray Tracing 30

Open Source Ray Tracers Art of Illusion POV-Ray YafaRay Manta several others 31