Introduction to 2D and 3D Computer Graphics. Realistic Rendering. -- Ray Tracing--

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

Lecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19

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

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

Recursive Ray Tracing. Ron Goldman Department of Computer Science Rice University

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

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

COMP371 COMPUTER GRAPHICS

Distributed Ray Tracing

Photorealism: Ray Tracing

Visual cues to 3D geometry. Light Reflection and Advanced Shading. Shading. Recognizing materials. size (perspective) occlusion shading

CS559 Computer Graphics Fall 2015

Lecture 10: Ray tracing

Ray Tracing. Kjetil Babington

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

9. Illumination and Shading

Lighting and Shading

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

CS 428: Fall Introduction to. Raytracing. Andrew Nealen, Rutgers, /18/2009 1

Ray-Tracing. Misha Kazhdan

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

CS 488. More Shading and Illumination. Luc RENAMBOT

Sung-Eui Yoon ( 윤성의 )

Supplement to Lecture 16

Assignment 6: Ray Tracing

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

Specular reflection. Lighting II. Snell s Law. Refraction at boundary of media

Intro to Ray-Tracing & Ray-Surface Acceleration

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

CS 563 Advanced Topics in Computer Graphics Camera Models. by Kevin Kardian

EECS 487: Interactive Computer Graphics

03 RENDERING PART TWO

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

Illumination Algorithms

Computer Graphics. Ray Tracing. Based on slides by Dianna Xu, Bryn Mawr College

A Brief Overview of. Global Illumination. Thomas Larsson, Afshin Ameri Mälardalen University

Reflection and Shading

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

CS 325 Computer Graphics

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

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

Ray Tracing. Johns Hopkins Department of Computer Science Course : Rendering Techniques, Professor: Jonathan Cohen

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007

Ray Tracing. Local Illumination. Object Space: Global Illumination. Image Space: Backward Ray Tracing. First idea: Forward Ray Tracing

Ray tracing. EECS 487 March 19,

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

Raytracing CS148 AS3. Due :59pm PDT

Final Project: Real-Time Global Illumination with Radiance Regression Functions

Shadows. COMP 575/770 Spring 2013

There are many kinds of surface shaders, from those that affect basic surface color, to ones that apply bitmap textures and displacement.

Photorealism. Photorealism: Ray Tracing. Ray Tracing

Distribution Ray-Tracing. Programação 3D Simulação e Jogos

Lecture 18: Primer on Ray Tracing Techniques

CS-184: Computer Graphics. Administrative

Homework #2. Shading, Ray Tracing, and Texture Mapping

Lecture 11: Ray tracing (cont.)

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

Introduction to 2D and 3D Computer Graphics. Realistic Rendering. -- Radiosity Methods--

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

Illumination. Michael Kazhdan ( /657) HB Ch. 14.1, 14.2 FvDFH 16.1, 16.2

Global Illumination. COMP 575/770 Spring 2013

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

Virtual Reality for Human Computer Interaction

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

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

Distribution Ray Tracing

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

CS5620 Intro to Computer Graphics

CS 4620 Program 4: Ray II

Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Practical Techniques for Ray Tracing in Games. Gareth Morgan (Imagination Technologies) Aras Pranckevičius (Unity Technologies) March, 2014

COMP30019 Graphics and Interaction Ray Tracing

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

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Review for Ray-tracing Algorithm and Hardware

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

Shading, Advanced Rendering. Week 7, Wed Feb 28

Raytracing. COSC 4328/5327 Scott A. King

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

Motivation. Sampling and Reconstruction of Visual Appearance. Effects needed for Realism. Ray Tracing. Outline

3D Space is one of the most rewarding areas

Project 3 Path Tracing

Physically Realistic Ray Tracing

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

521493S Computer Graphics. Exercise 3

Computer Graphics Lecture 11

distribution ray-tracing

Illumination and Reflection in OpenGL CS 460/560. Computer Graphics. Shadows. Photo-Realism: Ray Tracing. Binghamton University.

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

CS354R: Computer Game Technology

Distribution Ray Tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell

COMPUTER GRAPHICS COURSE. Rendering Pipelines

Indirect Illumination

Illumination Modelling

Science 8 Chapter 5 Section 1

Ray Tracing. CS334 Fall Daniel G. Aliaga Department of Computer Science Purdue University

COMP 175 COMPUTER GRAPHICS. Lecture 11: Recursive Ray Tracer. COMP 175: Computer Graphics April 9, Erik Anderson 11 Recursive Ray Tracer

Global Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Raytracing & Epsilon. Today. Last Time? Forward Ray Tracing. Does Ray Tracing Simulate Physics? Local Illumination

Transcription:

Introduction to 2D and 3D Computer Graphics Realistic Rendering -- -- CS447/547 8-1

Ray tracing......allows the observer to see a point on a surface as a result of the interaction of the surface at that point with rays emanating from other places in the scene (so far, we have only considered illumination from light sources!)...allows light rays to be used that reach a surface indirectly via reflection or via transmission through transparent objects...uses global illumination: light that originates from the environment instead of just from direct light CS447/547 8-2

Ray tracing combines......hidden surface removal...shading due to direct illumination...shading due to global illumination from the environment...shadow computation CS447/547 8-3

Ray tracing algorithm......casts imaginary rays from the viewpoint to the objects in the scene...for each pixel, a ray is traced from the viewpoint through the pixel and into the scene...if this ray intersects an object, then the color of the pixel is a result of direct illumination on the object...if this object is reflective and/or transparent, the color of the point includes reflected and transmitted rays traced back to their origin to determine their effects CS447/547 8-4

Ray tracing used for...hidden surface removal... terminates ray traces at the first intersection...the pixels' color is set to that of the object at the closest point of intersection CS447/547 8-5

Regular grid, corresponding to pixels: Invisible Rays cast from the viewpoint View point A ray is fired from the viewpoint through each pixel to which the window maps The rays find the closest object intersected... rays are stopped at the first intersection... CS447/547 8-6

Ray tracing used for...hidden surface removal For each scan line in the image» For each pixel in a scan line Determine the ray from the viewpoint (or center of projection) through the pixel; For each object in the scene If the object is intersected and is closest found so far...then record the intersection and object's name; Set the pixel's color to the closest object intersection; CS447/547 8-7

Ray tracing used for...shading due to direct illumination......takes into account the light source directly reflected on the surface in calculating the color of the pixel CS447/547 8-8

Light Source Regular grid, corresponding to pixels: View point Invisible Rays cast from the viewpoint CS447/547 8-9

Ray tracing used for...shading due to global illumination from the environment......uses the contribution from reflected and transmitted rays to determine the color of a pixel CS447/547 8-10

Reflected rays must be traced backwards to discover their contribution; it may require ray tracing of additional rays at other intersections with objects Light Source CS447/547 8-11 View point

Ray tracing used for...shadow computation...casts an additional ray from the point of intersection to each of the light sources (called shadow rays)...if one of these shadow rays intersects any object along the way, then the object is in the shadow at that point and the shading algorithm ignores the shadow ray's light source CS447/547 8-12

Shadow rays used to determine if an object is producing a shadow on the point of intersection......are not refracted...are simply a straight line from the point of intersection and the light source View point Shadow Ray Light Source CS447/547 8-13

Ray tracing used for...shadow computation......when an object lies in the path from the point of intersection to the light source, the point lies in a shadow...when an opaque object lies in this path, the illumination at this point is reduced to simply be the ambient light...when a semi-transparent object lies in this path, an attenuation factor affects the light at that point CS447/547 8-14

Ray tracing is recursive since......for each pixel a ray is traced backwards from the viewpoint into the scene, which might contain semitransparent objects (those that reflect and refract)...the color seen along this ray is a result of the intersection with the first object encountered during the backwards trace of the ray...the color is made up of local color due to illumination on the surface by direct or ambient light, the color from the reflection of a ray, and the color from the transmission of a ray coming from the refraction direction CS447/547 8-15

The color from the reflection ray can be found by tracing this ray backwards to its first intersection with an object; its color is also made up of direct, reflected, and transmitted color...and so on...and so on... Ray tracing is recursive...because the color of each pixel is based on three contributions......direct/ambient light...reflected light CS447/547 8-16...transmitted light

Point where the ray from the viewpoint intersects the first object Reflected ray Refracted ray View point Transmitted ray Color seen from this direction is based on direct/ambient light, reflected light, & transmitted light CS447/547 8-17

Ray tracing is recursive... Object 4 4 Object 2 15 14 13 12 5 3 10 11 16 6 2 7 8 17 18 20 View point Ray 1 Object 1 9 Object 3 19 21 CS447/547 8-18

Ray tracing is recursive...using a trace depth......which implies that beyond a certain number of intersections, any color contribution to the first level ray will be negligible Ray 1 intersecting Object 1 Ray 2 intersection Ray 11 Ray 10 Ray 7 intersection Ray 3 Ray 20 Ray 17 Ray 8 intersection Ray 4 Ray 5 Ray 18 Ray 9 intersection CS447/547 8-19 Assume the trace depth of 4

Ray tracing assumes that for each ray intersecting a surface...a reflected ray and a refracted ray are generated...the reflection ray is (Incident ray+2*normal*cos(angle))...the refraction ray for a semi-transparent object is caused by a change in the light when it enters different media...the transmitted ray's direction depends on how dense the material is CS447/547 8-20

Surface normal Surface normal Angle Ž Angle Ž Angle Ž Incident ray Reflection Reflected ray Refraction Angle ß Transmitted ray CS447/547 8-21

The transmitted ray......traveling from a more to a less dense material may cause the refracted ray to be parallel to the surface...causes internal reflection...increases the internal reflection as the angle increases Surface normal Surface normal CS447/547 8-22 Less Dense Incident ray Angle ß Transmitted ray More Dense Angle ß=critical angle for this material Incident ray Less Dense Angle Ž Angle Ž Internal Reflected ray More Dense Angle Ž is greater than the critical angle

So...let's see how rays recursively create other rays... Reflected ray Dense material Surface normal View point Primary ray Reflected ray Refracted rays Semi-transparent material Transmitted ray CS447/547 8-23

Direct illumination......is light incident from light source(s)...means a surface receives light directly from a source...creates global illumination when it interacts with a surface and causes reflection and refraction...can be a combination of diffuse light, specular light, and ambient light Global illumination... CS447/547 8-24...arises from the interaction of direct light with reflective and transparent surfaces

Scenes with multiple objects have reflection from......ambient -- surfaces always receive ambient illumination...direct light -- surfaces receive illumination from light sources if they are visible to the source...traced rays of light due to the interaction between objects CS447/547 8-25

Since ray tracing traces all rays from the viewpoint......shadow rays are cast only to direct light sources...the effects of reflected and refracted light sources, like mirrors and lenses, are not reproduced properly...shadows can be created from light rays bouncing off of mirrors, which in real life do not create shadows!...shadows of transparent objects do not refract light, which in real life do! (this is caused since shadow rays are cast in a straight line toward the light source) CS447/547 8-26

Instead, ray tracing can be performed from light sources......to supplement the lighting information from regular ray tracing from the viewpoint...allowing the light's rays to be traced recursively CS447/547 8-27

Ray tracing side effects produce......aliasing artifacts since rays are traced from intersection to intersection as infinitely thin beams...sharp shadows, sharp reflections, and sharp refractions resulting in surrealistic images since a perfect global reflection and transmission environment is assumed Ray tracing problems can be overcome......by distributed ray tracing, which adds a large number of extra rays (which even performs antialiasing!) CS447/547 8-28

Distributed ray tracing causes......reflective surfaces to have blurred reflections (simulating surface imperfections)...transmitting surfaces to blur transmitted rays (simulating the type of material)...blurred shadows and provides antialiasing CS447/547 8-29

Distributed ray tracing......integrates antialiasing...distributes reflected rays producing blurry reflections...distributes transmitted rays producing translucency...distributes shadow rays resulting in penumbrae...distributes ray origins over the viewpoint producing depth of field...distributes rays in time to produce motion blur CS447/547 8-30

Distributed ray tracing... Reflected ray Refracted ray View point Jitters Transmitted ray CS447/547 8-31

Pipeline With ray tracing......the rendering pipeline is very simple, since hidden surface removal, illumination, and antialiasing are combined MC WC VRC Display Surface Abstract Rendering Modeling View Orientation Transform Ray tracing Apply Color Implicit Display Transformation CS447/547 8-32

-- summary Ray tracing......does an excellent job of modeling specular light...still makes objects look surrealistic due to global illumination only using specular reflection and refraction, since tracing diffuse interaction would involve evaluating a very large number of rays at each surface intersection...is limited since it makes use of directionless ambient light (this is how diffuse light interactions are simulated) CS447/547 8-33

-- What if??? For example, using ray tracing to simulate diffuse light would cause a very large number of rays to be cast at each surface intersection Point where the ray from the viewpoint intersects the first object Diffuse reflection Refracted ray CS447/547 8-34 View point Transmitted rays As you can see...this is just the beginning! For just one point, an enormous number of rays would be cast!