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

Similar documents
Lecture 31of 41. Ray Tracing, Part 1 of 2: Intersections, Ray Trees & Recursion

Lecture 31of 41. Ray Tracing, Part 1 of 2: Intersections, Ray Trees & Recursion

Lecture 33 of 41. Ray Tracing, Part 2 of 2: Distributed RT & Radiosity/RT Hybrid Systems

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

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

COMP371 COMPUTER GRAPHICS

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

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

Lecture 18 of 41. Scene Graphs: Rendering Lab 3b: Shader

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

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

Lecture 6 of 41. Scan Conversion 1 of 2: Midpoint Algorithm for Lines and Ellipses

Lecture 6 of 41. Scan Conversion 1 of 2: Midpoint Algorithm for Lines and Ellipses

Recursion and Data Structures in Computer Graphics. Ray Tracing

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

CS 325 Computer Graphics

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

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

Lecture 11of 41. Surface Detail 2 of 5: Textures OpenGL Shading

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

Lecture 16 of 41. Transparency, Painter s Algorithm, & Z-Buffer Lab 3a: Shading & Transparency

03 RENDERING PART TWO

Intro to Ray-Tracing & Ray-Surface Acceleration

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

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

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

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

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

Shading, Advanced Rendering. Week 7, Wed Feb 28

COMPUTER GRAPHICS AND INTERACTION

Ray tracing. EECS 487 March 19,

Review for Ray-tracing Algorithm and Hardware

Ray Tracing. Kjetil Babington

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

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

Topics and things to know about them:

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

CS380: Computer Graphics Introduction. Sung-Eui Yoon ( 윤성의 ) Course URL:

Computer Graphics Global Illumination

NVIDIA Case Studies:

Ray-Tracing. Misha Kazhdan

Lecture 7 of 41. Viewing 4 of 4: Culling and Clipping Lab 1b: Flash Intro

Lahore University of Management Sciences. CS 452 Computer Graphics

521493S Computer Graphics. Exercise 3

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

A Little Background. Motivation. Motivation

Lecture 0 of 41: Part A Course Organization. Introduction to Computer Graphics: Course Organization and Survey

Ray Tracing. Brian Curless CSEP 557 Fall 2016

CIS 536/636 Introduction to Computer Graphics. Kansas State University. CIS 536/636 Introduction to Computer Graphics

CS-184: Computer Graphics. Administrative

GLOBAL ILLUMINATION. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION

Welcome to COMP 770 (236) Introduction. Prerequisites. Prerequisites

Photorealism: Ray Tracing

Lecture 18: Primer on Ray Tracing Techniques

Distribution Ray Tracing

Lecture 0 of 41: Part B Course Content. Advanced Computer Graphics: Course Organization and Survey

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

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

Lighting and Shading

Computer Graphics. Shi-Min Hu. Tsinghua University

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 457 Autumn 2017

Chapter 7 - Light, Materials, Appearance

Lahore University of Management Sciences. CS 452 Computer Graphics

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

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Sung-Eui Yoon ( 윤성의 )

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

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

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

Ray-tracing Cont. Ray-tracing

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

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

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 557 Autumn 2017

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Anti-aliasing and Monte Carlo Path Tracing

Movie: Geri s Game. Announcements. Ray Casting 2. Programming 2 Recap. Programming 3 Info Test data for part 1 (Lines) is available

CSE 167: Introduction to Computer Graphics Lecture #7: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1

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

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

Local vs. Global Illumination & Radiosity

Reading. Ray Tracing. Eye vs. light ray tracing. Geometric optics. Required:

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

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

Ray Tracing. Last Time? Reading for Today. Reading for Today

Advanced Shading I: Shadow Rasterization Techniques

Hidden Surface Elimination Raytracing. Pre-lecture business. Outline for today. Review Quiz. Image-Space vs. Object-Space

Computer Graphics Global Illumination

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

Shadows. COMP 575/770 Spring 2013

Introduction to Computer Graphics with WebGL

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

Models and Architectures

Raytracing CS148 AS3. Due :59pm PDT

Lecture 10: Ray tracing

Illumination Algorithms

Transcription:

Lab 6: Ray Tracing with ACM SIGGRAPH Demo & POV-Ray William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://bit.ly/hgvxlh / http://bit.ly/evizre Public mirror web site: http://www.kddresearch.org/courses/cis636 Instructor home page: http://www.cis.ksu.edu/~bhsu Readings: Last class: Chapter 14, Eberly 2 e see http://bit.ly/ieuq45 Today: Ray Tracing Handout Next class: Chapter 15, Ray Tracing Handout

2 Lecture Outline Reading for Last Class: Chapter 14, Eberly 2 e Reading for Today: Ray Tracing Handout Reading for Next Class: Chapter 15, Eberly 2 e ; Ray Tracing Handout Last Time: Ray Tracing (RT), Part 1 of 2 Vectors: Light (L) & shadow, Reflected (R), Transmitted & refraction Basic recursive ray tracing & ray trees Phong illumination model, texture mapping revisited Distributed RT: survey, supersampling illustrated Things you get for free : clipping, VSD (backface/occlusion culling) Today: Ray Tracing Lab ACM SIGGRAPH demo: http://bit.ly/cilgx2 POV-Ray: http://www.povray.org Next Class: Ray Tracing 2 of 2 Hybridizing RT with radiosity (photon maps) Progressive refinement

3 Where We Are

4 Acknowledgements: Ray Tracing Dave Shreiner & Brad Grantham Adjunct Professor & Adjunct Lecturer, Santa Clara University ARM Holdings, plc http://www.plunk.org/~shreiner/ http://www.plunk.org/~grantham/ David K. Buck, Aaron Collins, et al. Developers Persistence of Vision Raytracer (POV-Ray) http://www.povray.org G. Scott Owen & Yan Liu Professor Emeritus / ACM SIGGRAPH President & Graduate Research Assistant Hypermedia and Visualization Laboratory Department of Computer Science Georgia State University / ACM http://www.cs.gsu.edu/gsowen/

5 Review [1]: Reasons for Using Ray Tracing Simulate rays of light Produces natural lighting effects Reflection Refraction Soft Shadows Depth of Field Motion Blur Caustics Hard to simulate effects with rasterization techniques (OpenGL) Rasterizers require many passes Ray-tracing easier to implement Adapted from slides 2001 D. Shreiner & B. Grantham, SCU COEN 290: Computer Graphics I, Winter 2001 http://bit.ly/hz1kfu

6 Review [2]: How Ray Tracing Works Trace rays from eye instead Do work where it matters Image Plane Light Eye Object This is what most people mean by ray tracing. Adapted from slides 2001 D. Shreiner & B. Grantham, SCU COEN 290: Computer Graphics I, Winter 2001 http://bit.ly/hz1kfu

7 Review [3]: Ray/Triangle Intersection Want to know: at what point p does ray intersect triangle? Compute lighting, reflected rays, shadowing from that point p = t min r o r d <?,?,?> (t =???) Adapted from slides 2001 D. Shreiner & B. Grantham, SCU COEN 290: Computer Graphics I, Winter 2001 http://bit.ly/hz1kfu

8 Review [4]: General Notation Review We ll use triangles for lights Can build complex shapes from triangles Some lighting terms Light N Eye I R V Adapted from slides 2001 D. Shreiner & B. Grantham, SCU COEN 290: Computer Graphics I, Winter 2001 http://bit.ly/hz1kfu

9 Review [5]: Recursive Calculation & Ray Tree Recursive ray evaluation raytrace(ray) { hitobject(ray, p, n, triangle); color = object color; if(object is light) return(color); else return(lighting(p, n, color)); } Generates ray tree shown at right Ray tree 2000 N. Patrikalakis, MIT http://bit.ly/fjcggk I = Incident ray S = light Source vector (aka L) R = reflected ray T = transmitted ray Adapted from slides 2001 D. Shreiner & B. Grantham, SCU COEN 290: Computer Graphics I, Winter 2001 http://bit.ly/hz1kfu

10 Review [6]: Putting It All Together Calculating surface color lighting(point) { color = ambient color; for each light if(hitobject(shadow ray)) color += lightcolor * dot(shadow ray, n); color += raytrace(reflection) * pow(dot(reflection, ray), shininess); return(color); } Adapted from slides 2001 D. Shreiner & B. Grantham, SCU COEN 290: Computer Graphics I, Winter 2001 http://bit.ly/hz1kfu

11 Review [7]: More Quality, More Speed Better Lighting + Forward Tracing Texture Mapping Modeling Techniques Distributed Ray Tracing: Techniques Motion Blur Depth of Field Blurry Reflection/Refraction Wikipedia, Distributed Ray Tracing: http://bit.ly/ihyvus Improving Image Quality Acceleration Techniques Adapted from slides 2001 D. Shreiner & B. Grantham, SCU COEN 290: Computer Graphics I, Winter 2001 http://bit.ly/hz1kfu

12 Review [8]: Distributed Ray Tracing Adapted from slides 2001 D. Shreiner & B. Grantham, SCU COEN 290: Computer Graphics I, Winter 2001 http://bit.ly/hz1kfu

13 Review [9]: Supersampling, Forward RT One ray is not enough (jaggies) Can use multiple rays per pixel - supersampling Can use a few samples, continue if they re very different - adaptive supersampling Texture interpolation & filtering Forward RT for Caustics Ray Tracing 2008 Wikipedia http://bit.ly/dv7lnm Adapted from slides 2001 D. Shreiner & B. Grantham, SCU COEN 290: Computer Graphics I, Winter 2001 http://bit.ly/hz1kfu

14 Lab 6a [1]: ACM SIGGRAPH 2-D RT Program Help Screenshots from Java program 2001 G. S. Owen & Y. Liu, GSU ACM SIGGRAPH Ray Trace Java Demo http://bit.ly/cilgx2

15 Lab 6a [2]: Trace Screen Screenshots from Java program 2001 G. S. Owen & Y. Liu, GSU ACM SIGGRAPH Ray Trace Java Demo http://bit.ly/cilgx2

16 Lab 6a [3]: First Ray (Click Clear & Auto ) Screenshots from Java program 2001 G. S. Owen & Y. Liu, GSU ACM SIGGRAPH Ray Trace Java Demo http://bit.ly/cilgx2

17 Lab 6a [4]: Second Ray (Click Auto to Advance) Screenshots from Java program 2001 G. S. Owen & Y. Liu, GSU ACM SIGGRAPH Ray Trace Java Demo http://bit.ly/cilgx2

18 Lab 6a [5]: Third Ray Screenshots from Java program 2001 G. S. Owen & Y. Liu, GSU ACM SIGGRAPH Ray Trace Java Demo http://bit.ly/cilgx2

19 Lab 6a [6]: Fourth Ray Screenshots from Java program 2001 G. S. Owen & Y. Liu, GSU ACM SIGGRAPH Ray Trace Java Demo http://bit.ly/cilgx2

20 Lab 6a [7]: Fifth Ray Screenshots from Java program 2001 G. S. Owen & Y. Liu, GSU ACM SIGGRAPH Ray Trace Java Demo http://bit.ly/cilgx2

21 Lab 6b [1]: POV-Ray Office 2004 Jaime Vives Piqueres http://bit.ly/g9dngh My First CGSphere 2008 Robert McGregor http://bit.ly/fgb6pj Images respective authors, generated using POV-Ray 1991 2011 D. K. Buck et al. http://www.povray.org

22 Lab 6b [2]: POV-Ray Dissolution 2005 Newt http://bit.ly/fvqj5d The Wet Bird 2001 Gilles Tran http://bit.ly/gmbugt "Thanks for all the fish 2008 Robert McGregor http://bit.ly/fe04gm Images respective authors, generated using POV-Ray 1991 2011 D. K. Buck et al. http://www.povray.org

23 Summary Reading for Last Class: Chapter 14, Eberly 2 e Reading for Today: Ray Tracing Handout Reading for Next Class: Chapter 15, Eberly 2 e ; Ray Tracing Handout Last Time: Ray Tracing (RT), Part 1 of 2 Vectors: I (incident ray), L, R, T Basic recursive ray tracing & ray trees Distributed RT: survey, supersampling illustrated Today: Ray Tracing Lab ACM SIGGRAPH demo: http://bit.ly/cilgx2 2-D screen Moveable objects: transparent, opaque (both reflective) POV-Ray (http://www.povray.org) Example Renderings Next Class: Ray Tracing 2 of 2 Progressive refinement radiosity (photon maps) introduced Using RT/radiosity together and with shading

24 Terminology Ray Tracing aka Ray Casting Given: screen with pixels (u, v) Find intersection t min (u, v) of rays through each (u, v) with scene Vectors emanating from world-space coordinate of t min Light (L) aka Source (S): to point light sources (or shadows) Reflected (R): from object surface Transmitted or Transparency (T): through transparent object Recursive RT: call raytracer for each intersection, get ray tree Incident vector (I): incoming from eye Caustic: Envelope of Light Rays Reflected/Refracted by Curved Object Wikipedia: http://bit.ly/etixid Example: Slide 13 (today s lecture) Backward RT: Eye-to-Scene, Scene-to-Light (Typical Order) Forward RT: Light-to-Scene, Scene-to-Eye (Only for Caustics) Screen: Parallel to View Plane, Rays Shot Through It