An Introduction to Ray Tracing CS 288 10/27/1998 Vic Baker.

Slides:



Advertisements
Similar presentations
Ray Tracing.
Advertisements

Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
3D Graphics Rendering and Terrain Modeling
Advanced Effects CMSC 435/634. General Approach Ray Tracing – Shoot more rays Rasterization – Render more images.
Part I: Basics of Computer Graphics
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Illumination Model & Surface-rendering Method 박 경 와.
Course Website: Computer Graphics 18: Ray-tracing.
Ray Tracing Tutorial. Ray Casting One type of visibility algorithm.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Ray Tracing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of.
CS 325 Introduction to Computer Graphics 04 / 09 / 2010 Instructor: Michael Eckmann.
CS 4731: Computer Graphics Lecture 18: Hidden Surface Removal Emmanuel Agu.
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.
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 14: Ray Tracing
CIS 310: Visual Programming, Spring 2006 Western State College 310: Visual Programming Ray Tracing.
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
Cornell CS465 Fall 2004 Lecture 3© 2004 Steve Marschner 1 Ray Tracing CS 465 Lecture 3.
Cornell CS465 Fall 2004 Lecture 3© 2004 Steve Marschner 1 Ray Tracing CS 465 Lecture 3.
Erdem Alpay Ala Nawaiseh. Why Shadows? Real world has shadows More control of the game’s feel  dramatic effects  spooky effects Without shadows the.
COMP 175: Computer Graphics March 24, 2015
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Computer graphics & visualization REYES Render Everything Your Eyes Ever Saw.
Reflections Specular reflection is the perfect reflection of light from a surface. The law a reflection states that the direction of the incoming ray and.
CS 376 Introduction to Computer Graphics 04 / 11 / 2007 Instructor: Michael Eckmann.
Anamorphism Transformation Geometry. Anamorphosis is a distorted projection or perspective requiring the viewer to use special devices or occupy a specific.
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.
09/11/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Graphics Pipeline Texturing Overview Cubic Environment Mapping.
Ray Tracing Chapter CAP4730: Computational Structures in Computer Graphics.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
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.
Intro. to Advanced Lighting, Basic Ray Tracing Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, April.
More on Environment Mapping Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Wednesday, December 10, 2003.
OpenGL Selection. Three Selection Methods Color coding (OpenGL) Selection mode (OpenGL) Selection ray (generic)
1Computer Graphics Implementation II Lecture 16 John Shearer Culture Lab – space 2
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Parallel Ray Tracer Computer Systems Lab Presentation Stuart Maier.
Implementation II.
1 by: Ilya Melamed Supervised by: Eyal Sarfati High Speed Digital Systems Lab.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Introduction to Raytracing Raytracing Introduction (from Wikipedia) In computer graphics, ray tracing is a technique for generating an image by tracing.
CSE 681 Introduction to 3D Graphics. CSE 681 Computer graphics is “the creation and manipulation of graphics images by means of computer.” (Marc Berger,
Basic Ray Tracing CMSC 435/634.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
CSCE 441: Computer Graphics Ray Tracing
11/24/ :45 Graphics II Shadow Maps Reflections Session 5.
Computer Graphics I, Fall 2010 Implementation II.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
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.
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
CIS 310: Visual Programming, Spring 2006 Western State College 310: Visual Programming Ray Tracing.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics Implementation II
Ray Tracing Dr. Scott Schaefer.
3D Graphics Rendering PPT By Ricardo Veguilla.
RAY TRACING.
Visible-Surface Determination
Presentation transcript:

An Introduction to Ray Tracing CS /27/1998 Vic Baker

What is Ray Tracing? n “Ray Tracing” determines the visibility of surfaces by tracing imaginary rays of light from the viewer’s eye to the objects in the scene n Ray Tracing evolved from an algorithm used to simulate trajectories of ballistic projectiles and nuclear particles

Ray Tracing Algorithm Select center of projection and window on viewplane for (each scan line in image) { for (each pixel in scan line) { determine ray from center of projection through pixel; for (each object in scene) { if ( object is intersected and is closest thus far ) record intersection and object name; } set pixel’s color to that at closest object intersection; }

Why Speed Up Ray Tracing? n Depending on the output size of a ray traced image, as well as the complexity of the scene itself, it is not uncommon for a ray traced image to take minutes or days to render!!!! n A 1024x1024 image requires that 1 million pixels be calculated!!!!!

Why Speed Up Ray Tracing? n Since ray tracing calculates every pixel’s color, a picture of size 512 x 512 contains pixels that require a color which is dependent on its distance from the COP, your eye. n A 1024x768 image has pixels to calculate independently!

A Minimal Ray Tracing Program n In an attempt to investigate how computationally demanding rendering a 3D scene is, I will demonstrate a minimal ray tracing program known as Minray.

The History of Minray.c n Paul Heckbert (CMU, Pixar) issued a challenge to the graphics community to write the smallest ray tracing program possible. n Minray is the result of taking the best portions of the best entries and combining them into a ray tracer

Minray hierarchy chart

Frequency chart for a 32x32 image

vdot() n Calculates the dot product for two vectors n Each call to vdot requires 113 clock cycles n That’s * 113 = 13,670,514 clock cycles for a 32x32 image

vcomb() n Vcomb adds two vectors n Each call to vcomb requires 155 clock cycles n That’s 155 * = 15,408,240 clock cycles for a 32x32 image

vunit() n Normalizes vectors n Makes calls to vdot and vcomb n Costs 331 clock cycles to execute n That’s 331 * = 5,278,126 clock cycles

intersect() n Determines if a ray intersects an object n Requires vdot() and vcomb() n Costs 2547 clock cycles n Total cost for a 32x32 image is 9011 * 2547 = 22,951,017 clock cycles

trace() n Keeps track of nearest intersection of object and maps color to pixel n Costs 141 * 5998 = 845,718 clock cycles for a 32x32 image

How can we speed ray tracing up? n By using loop unrolling, straight-lining code, as well as using macros instead of function calls, you can drastically reduce overhead

What’s out there? n A good ray tracing program is the POV- Ray. n Let’s see some examples...