Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.

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.
Exploration of advanced lighting and shading techniques
1 05/10/2014 Computer Graphics Lecture 10 Global Illumination 1: Ray Tracing and Radiosity Taku Komura.
Lecture 14 Illumination II – Global Models
Ray Tracing & Radiosity Dr. Amy H. Zhang. Outline  Ray tracing  Radiosity.
May Visible Surface Detection Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty.
David Luebke1/19/99 CS 551/651: Advanced Computer Graphics David Luebke
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
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.
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.
3D Graphics Processor Architecture Victor Moya. PhD Project Research on architecture improvements for future Graphic Processor Units (GPUs). Research.
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 14: Ray Tracing
Ray Tracing Jerry Sui Adam Conner. Part I – Introduction to Ray Tracing Final Product.
1 7M836 Animation & Rendering Global illumination, ray tracing Arjan Kok
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
CSCE 641: Computer Graphics Ray Tracing Jinxiang Chai.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 2: Basic Ray Tracing Ravi Ramamoorthi Some slides courtesy.
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.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
Computer Graphics Panos Trahanias ΗΥ358 Spring 2009.
12/05/02(c) 2002 University of Wisconsin Last Time Subdivision techniques for modeling Very brief intro to global illumination.
CS 376 Introduction to Computer Graphics 04 / 11 / 2007 Instructor: Michael Eckmann.
-Global Illumination Techniques
Project Raytracing. Content Goals Idea of Raytracing Ray Casting – Therory – Practice Raytracing – Theory – Light model – Practice Output images Conclusion.
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Global illumination algorithms Graphics.
Ray Tracing Chapter CAP4730: Computational Structures in Computer Graphics.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
Recursion and Data Structures in Computer Graphics Ray Tracing 1.
Basic Ray Tracing CMSC 435/634.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
第五课 Ray Tracing. Overview of the Section Why Ray Tracing? What is Ray Tracing? How to tracing rays? How to accelerating ray-tracing?
CS380: Computer Graphics Distributed Ray Tracing TA Course URL:
Monte-Carlo Ray Tracing and
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
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
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
CS 445 / 645 Introduction to Computer Graphics Lecture 16 Radiosity Radiosity.
1. Ray Casting Surface intersection Visible surface detection Ray Tracing Bounce the ray Collecting intensity Technique for global reflection and transmission.
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.
Global Illumination (3) Path Tracing. Overview Light Transport Notation Path Tracing Photon Mapping.
David Luebke3/12/2016 Advanced Computer Graphics Lecture 3: More Ray Tracing David Luebke
Raycasting (animated gif). Image Formation (Forward) Ray Tracing(Backward) Ray Tracing.
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
CSL 859: Advanced Computer Graphics Dept of Computer Sc. & Engg. IIT Delhi.
Ray Tracing I. Reading Hill, Chapter 14, Sections 14.1 to 14.5 Hill, Chapter 14, Sections and
CS552: Computer Graphics Lecture 33: Illumination and Shading.
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
CSE 167 [Win 17], Lecture 15: Ray Tracing Ravi Ramamoorthi
Distributed Ray Tracing
Distributed Ray Tracing
CSCE 441: Computer Graphics Ray Tracing
GR2 Advanced Computer Graphics AGR
Introduction to Ray Tracing
Distributed Ray Tracing
Presentation transcript:

Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph

Introduction Rays are tested against all objects in the scene to determine if they intersect any objects. The pixel is then set to the color values returned by the ray. If the ray misses all objects, then that pixel is shaded the background color. Trace rays of light from the eye back through the pixels of the image plane into the scene

Introduction-2 handles shadows, multiple specular reflections, and texture mapping point sampling algorithm. We sample a continuous image in world coordinates by shooting one or more rays through each pixel. the potential problem of aliasing aliasing

Shadow Ray When the ray hits an object, a secondary ray, ("shadow" ray), is shot towards the light sources Determine if that point on the object is in a shadow. If this shadow ray hits another object before it hits a light source, then the first intersection point is in the shadow of the second object. Only apply the ambient term for that light source at the point of intersection

Reflected Ray When a ray hits an object, a reflected ray is generated and tested against all of the objects in the scene. If the reflected ray hits an object then a local illumination model is applied at the point of intersection and the result is carried back to the first intersection point.

Transmitted Ray If the intersected object is transparent, then a transmitted ray is generated and tested against all the objects in the scene. If the transmitted ray hits an object then a local illumination model is applied at the point of intersection and the result is carried back to the first intersection point.

Multiple Layers of Reflection The reflected rays can generate other reflected rays that can generate other reflected rays, etc. The next sequence of three images shows a simple scene with no reflection, a single reflection, and then a double reflection.

Recursive Reflection

Ray Tree The reflective and/or transmitted rays are continually generated until the ray leaves the scene without hitting any object or a preset recursion level has been reached. This then generates a ray tree. DEMO This style of ray tracing was invented by Turner Whitted in 1979.

Ray Tree -2 The appropriate local illumination model is applied at each level and the resultant intensity is passed up through the tree, until the primary ray is reached. Thus we can modify the local illumination model by (at each tree node) I = I local + K r * R + K t * T R is the intensity of light from the reflected ray T is the intensity of light from the transmitted ray Kr and Kt are the reflection and transmission coefficients. For a very specular surface, such as plastic, we sometimes do not compute a local intensity, I local, but only use the reflected/transmitted intensity values.

Computing Reflection

Refraction

Ray-Object Intersection Ray-sphere Ray-quadric Ray-plane Ray-polygon Ray-box See Funkhouser notes on ray cast

Time-Consuming for a na ï ve raytracer (with no speedup techniques) the time is proportional to (number of rays)  (number of objects) Each intersection requires from a few (5-7) to many (15-20) floating point (fp) operations. a scene with 100 objects and computed with a spatial resolution of 512 x 512, assuming 10 fp operations per object test there are about 250,000 X 100 X10 = 250,000,000 fps. This is just for the primary rays (from the eye through the image plane) with no anti-aliasing.

Computation Acceleration Approaches Use faster machines Use specialized hardware, especially parallel processors Speed up computations by using more efficient algorithms Reduce the number of ray-object computations

Reduce Ray-Object Computation Adaptive depth control stop generating reflected/transmitted rays when the computed intensity becomes less than a certain threshold. Attenuation due to distance and multiple reflection Bounding volumes enclose groups of objects in sets of hierarchical bounding volumes (e.g., spheres) and first test for intersection with the bounding volume

Reduce Computation -2 First-hit speedup a large percentage of the work is performed in finding the first intersection. use a modified Z-buffer algorithm to determine the first hit  The scene would be pre-processed, with the resultant z- buffer storing pointers to the objects intersected. Then the ray tracing would proceed from that point. Weghorst showed that incorporating the above three techniques approximately halved the intersection computational time for complex scenes.

Fast square root

Aliasing Problems

Aliasing (in general) Nyquist theorem: to accurately reconstruct a signal, the signal must be sampled at a rate greater than or equal to two times the highest frequency contained in the signal

Aliasing in Computer Graphics One scanline

Aliasing in CG -2

Aliasing in CG -3

Aliasing Artifact

Anti-aliasing by Supersampling More than one samples per pixel Adaptive supersampling Supersampling with jitter

Ray-object intersection