Recursion and Data Structures in Computer Graphics Ray Tracing 1.

Slides:



Advertisements
Similar presentations
GR2 Advanced Computer Graphics AGR
Advertisements

GR2 Advanced Computer Graphics AGR
13.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 13 An Introduction to Ray Tracing.
Sven Woop Computer Graphics Lab Saarland University
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Lecture 14 Illumination II – Global Models
CLASS 9 ADVANCE RENDERING RAY TRACING RADIOSITY LIGHT FIELD CS770/870.
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
Light Issues in Computer Graphics Presented by Saleema Amershi.
Illumination Model & Surface-rendering Method 박 경 와.
Course Website: Computer Graphics 18: Ray-tracing.
Christian Lauterbach COMP 770, 2/11/2009
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
CS 325 Introduction to Computer Graphics 04 / 09 / 2010 Instructor: Michael Eckmann.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Object-Order vs. Screen-Order Rendering April 24, 2003.
CS 376 Introduction to Computer Graphics 04 / 09 / 2007 Instructor: Michael Eckmann.
Computer Graphics (Fall 2005) COMS 4160, Lecture 21: Ray Tracing
RAY TRACING.
CSCE 641: Computer Graphics Ray Tracing Jinxiang Chai.
Ray Casting Ray-Surface Intersections Barycentric Coordinates Reflection and Transmission [Shirley, Ch.9] Ray Tracing Handouts Ray Casting Ray-Surface.
Approximate Soft Shadows on Arbitrary Surfaces using Penumbra Wedges Tomas Akenine-Möller Ulf Assarsson Department of Computer Engineering, Chalmers University.
7M836 Animation & Rendering
Ray Tracing Jerry Sui Adam Conner. Part I – Introduction to Ray Tracing Final Product.
1 7M836 Animation & Rendering Global illumination, ray tracing Arjan Kok
Lecture 8 Advanced Rendering – Ray Tracing, Radiosity & NPR.
CSCE 641: Computer Graphics Ray Tracing Jinxiang Chai.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
COMP 175: Computer Graphics March 24, 2015
12/05/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling Very brief intro to global illumination.
Project Raytracing. Content Goals Idea of Raytracing Ray Casting – Therory – Practice Raytracing – Theory – Light model – Practice Output images Conclusion.
Ray Tracing Sang Il Park SEjong University With lots of slides stolen from Jehee Lee, Doug James, Steve Seitz, Shree Nayar, Alexei Efros, Fredo Durand.
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
The Fundamentals of Ray-Tracing Szirmay-Kalos László Dept. of Control Engineering and Information Technology Budapest University of Technology
Ray Tracing Chapter CAP4730: Computational Structures in Computer Graphics.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Ray Tracing.
1 Dr. Scott Schaefer Ray Tracing. 2/42 Ray Tracing Provides rendering method with  Refraction/Transparent surfaces  Reflective surfaces  Shadows.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
Gene Au-yeung, Daniel Quach, Jeffrey Su, Albert Wang, Jessica Wang, David Woo.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
04/30/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling We are now all done with modeling, the standard hardware pipeline.
Basic Ray Tracing CMSC 435/634.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
Ray Tracing II. HW1 Part A due October 10 Camera module Object module –Read from a file –Sphere and Light only Ray tracer module: –No shading. No reflection.
Advanced topics Advanced Multimedia Technology: Computer Graphics Yung-Yu Chuang 2006/01/04 with slides by Brian Curless, Zoran Popovic, Mario Costa Sousa.
CSCE 441: Computer Graphics Ray Tracing
In the name of God Computer Graphics. Last Time Some techniques for modeling Today Global illumination and raytracing.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
More on Ray Tracing Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Wednesday, April 14, 2004.
RENDERING : Global Illumination
CSE 681 Introduction to Ray Tracing. CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute.
David Luebke3/12/2016 Advanced Computer Graphics Lecture 3: More Ray Tracing David Luebke
Path/Ray Tracing Examples. Path/Ray Tracing Rendering algorithms that trace photon rays Trace from eye – Where does this photon come from? Trace from.
CSL 859: Advanced Computer Graphics Dept of Computer Sc. & Engg. IIT Delhi.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
CS552: Computer Graphics Lecture 36: Ray Tracing.
Review Ray Tracing III Review. Pseudo codes RayCast-1  Plain ray caster (direct illumination) RayCast-2  RayCast-1 + shadow rays RayTrace-1  Recursive.
Basic Ray Tracing CMSC 435/634.
Photorealistic Rendering vs. Interactive 3D Graphics
Shading Revisited Some applications are intended to produce pictures that look photorealistic, or close to it The image should look like a photograph A.
Image-based Lighting Computational Photography
Ray Tracing Dr. Scott Schaefer.
Mike Merchant Nicholas Hilbert
© University of Wisconsin, CS559 Fall 2004
(c) 2002 University of Wisconsin
Image synthesis using classical optics
CSCE 441: Computer Graphics Ray Tracing
GR2 Advanced Computer Graphics AGR
Introduction to Ray Tracing
Presentation transcript:

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 3 light source camera or "eye"

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 6 shadows with ~1000 light sources 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

11 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 }

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 13 shadowed from L2 shadowed from L3 not shadowed from L1

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 15 incoming rayreflection ray

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 17 incoming ray refraction ray

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 19 shadow rays

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 EECS

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 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 Art of Illusion  POV-Ray POV-Ray  YafaRay YafaRay  Manta Manta  several others 31