Introduction to Ray Tracing

Slides:



Advertisements
Similar presentations
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Advertisements

CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Ray Tracing Variants Distributed ray tracing Generalized rays Cone Tracing Beam Tracing Pencil.
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.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
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.
RAY TRACING.
(conventional Cartesian reference system)
1 CSCE 641: Computer Graphics Lighting Jinxiang Chai.
Global Illumination May 7, Global Effects translucent surface shadow multiple reflection.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
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.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
-Global Illumination Techniques
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
CSE 381 – Advanced Game Programming GLSL Lighting.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Course Introduction to virtual engineering Óbuda University John von Neumann Faculty of Informatics Institute of Applied Mathematics Lecture and laboratory.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
Bounding Volume Hierarchy. The space within the scene is divided into a grid. When a ray travels through a scene, it only passes a few boxes within the.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
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.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
CSL 859: Advanced Computer Graphics Dept of Computer Sc. & Engg. IIT Delhi.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Texturing CMSC 435/ What is Texturing? 2 Texture Mapping Definition: mapping a function onto a surface; function can be: – 1, 2, or 3D – sampled.
Basic Ray Tracing CMSC 435/634.
7. Illumination Phong Illumination Diffuse, Specular and Ambient

Photorealistic Rendering vs. Interactive 3D Graphics
Rendering Process of producing “realistic” images or pictures
Distributed Ray Tracing
Ray box and Mirror.
Ray Tracing Dr. Scott Schaefer.
3D Graphics Rendering PPT By Ricardo Veguilla.
Interactive Computer Graphics
© University of Wisconsin, CS559 Fall 2004
Real-Time Volume Graphics [06] Local Volume Illumination
(c) 2002 University of Wisconsin
Lighting.
Distributed Ray Tracing
(c) 2002 University of Wisconsin
Image.
An Algorithm of Eye-Based Ray Tracing on MATLAB
Mirror Reflections and Images
CS5500 Computer Graphics May 29, 2006
Illumination and Shading
14th Lecture – Final Lecture
GR2 Advanced Computer Graphics AGR
Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
OBJECTIVES 1) Trace light rays as they reflect from a plane mirror.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Frame Buffer Applications
Simple Texture Mapping
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Introduction to 3D Graphics
Distributed Ray Tracing
CSC418 Computer Graphics Raytracing Shadows Global Illumination.
Presentation transcript:

Introduction to Ray Tracing CSE 681

Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute ray. (More linear algebra.) Compute ray-object intersection. CSE 681

Ray Tracing For each pixel Form ray from eye through pixel For each object Intersection ray with object If intersection is closer than any other so far, save it Color pixel with shade of object at point of intersection CSE 681

Example CSE 681

Shade of Object at Point Ambient Diffuse Specular Shadows Material properties Texture Reflections Transparency (refraction) CSE 681

Diffuse Reflection Light that gets absorbed into the objects surface Gets reflected equally in all directions Need to calculate angle of incoming light to surface CSE 681

Diffuse Reflection Calculate amount/color of light shining on an object. Depends on angle between light ray and surface normal. CSE 681

Example: Diffuse reflection What about shiny objects? CSE 681

Specular Reflection Calculate light bouncing off object to your eye; Angle of incidence = angle of reflection. Most intense at angle of reflection; falls off from there Angle of incidence Angle of reflection Eye CSE 681

Example: Specular Reflection CSE 681

What’s wrong with this picture? No shadows. CSE 681

Shadows Determine when light ray is blocked from reaching object. Ray-object intersection calculation For each pixel for each object for each light source CSE 681

Reflection Image plane Eye CSE 681

Transparency Transparency CSE 681

Transparency & Refraction Ray changes direction in transition between materials Material properties give ratio of in/out angles CSE 681

Transparency & Refraction CSE 681

Recursive Ray Tracing Image plane Eye CSE 681

Polyhedral Models Polyhedral models CSE 681

Texture Mapping Texture mapping. CSE 681

Sampling and Aliasing Problem: Representing pixel by a single ray. Using higher resolution won’t solve problem. No matter how small pixels are, objects can be smaller. CSE 681

Anti-Aliasing Solution: Use multiple rays; Average values calculated by rays. Image plane Eye CSE 681

Sampling and Aliasing Problem: Sampling frequency may match image frequency. Image plane Eye Viewport CSE 681

Random/Stochastic Sampling Randomly sample rays through pixel. Image plane Eye Viewport CSE 681

Efficiency 1280 x 1024 = 1,310,720  106 pixels. 106 initial rays. 106 reflection rays. Potentially 106 refraction rays. 3 x 106 shadow rays (3 lights.) Next level: Potentially 4 x 106 refraction/reflection rays. 1,000,000 polygons. 107 x 106 = 1013 ray-polygon intersection calculations. No anti-aliasing. CSE 681

Intersection Data Structures Coarse test to see if ray could *possibly* intersection object Divide space up - sort objects into spatial buckets – trace ray from bucket to bucket CSE 681

Bounding Boxes CSE 681

Spatial Subdivision CSE 681

Theory: sampling the environment Rendering as sampling problem Expected value & variance Techniques to efficiently reduce variance CSE 681

Major Course Topics Object & coordinate transformations. Ray-object intersections. Diffuse & specular reflection. Shadows. Opacity & refraction. Recursive ray tracing. Polyhedral models. Texture mapping. Anti-aliasing and sampling. Bounding boxes and spatial subdivision. Sampling theory. CSE 681