EECS 487: Interactive Computer Graphics

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

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

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

Distribution Ray Tracing

Distributed Ray Tracing

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

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

Reading. Distribution Ray Tracing. BRDF, revisited. Pixel anti-aliasing. ω in. Required: Shirley, section Further reading:

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

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

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

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

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

Physically Realistic Ray Tracing

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

Reading. 8. Distribution Ray Tracing. Required: Watt, sections 10.6,14.8. Further reading:

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

Global Illumination The Game of Light Transport. Jian Huang

Anti-aliasing and Monte Carlo Path Tracing

Ray tracing. EECS 487 March 19,

distribution ray-tracing

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Computer Graphics Project

Local vs. Global Illumination & Radiosity

Sung-Eui Yoon ( 윤성의 )

distribution 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.

Lighting and Shading

Raytracing. COSC 4328/5327 Scott A. King

Ray Tracing Part 2. CSC418/2504 Introduction to Computer Graphics. TA: Muhammed Anwar

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

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

Advanced Ray Tracing

Distributed Ray Tracing

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

Raytracing CS148 AS3. Due :59pm PDT

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

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

CS-184: Computer Graphics. Administrative

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

Depth of Field for Photorealistic Ray Traced Images JESSICA HO AND DUNCAN MACMICHAEL MARCH 7, 2016 CSS552: TOPICS IN RENDERING

Ray-Tracing. Misha Kazhdan

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Photorealism: Ray Tracing

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

COMP371 COMPUTER GRAPHICS

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity

Monte-Carlo Ray Tracing. Antialiasing & integration. Global illumination. Why integration? Domains of integration. What else can we integrate?

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

Schedule. MIT Monte-Carlo Ray Tracing. Radiosity. Review of last week? Limitations of radiosity. Radiosity

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

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

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

Advanced Shading I: Shadow Rasterization Techniques

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

MIT Monte-Carlo Ray Tracing. MIT EECS 6.837, Cutler and Durand 1

Shadows. COMP 575/770 Spring 2013

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

Sampling: Antialiasing - Intro

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

Lecture 7 - Path Tracing

Shading I Computer Graphics I, Fall 2008

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

Lecture 18: Primer on Ray Tracing Techniques

Theoretically Perfect Sensor

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

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

Comp 410/510 Computer Graphics. Spring Shading

Theoretically Perfect Sensor

CptS 548 (Advanced Computer Graphics) Unit 3: Distribution Ray Tracing

Building a Fast Ray Tracer

Ray-tracing Acceleration. Acceleration Data Structures for Ray Tracing. Shadows. Shadows & Light Sources. Antialiasing Supersampling.

Illumination Models and Surface-Rendering Methods. Chapter 10

Today. Acceleration Data Structures for Ray Tracing. Cool results from Assignment 2. Last Week: Questions? Schedule

The Rendering Equation and Path Tracing

CS5620 Intro to Computer Graphics

Philipp Slusallek Karol Myszkowski. Realistic Image Synthesis SS18 Instant Global Illumination

Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows

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

Illumination & Shading

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Topic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source

Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

SAMPLING AND NOISE. Increasing the number of samples per pixel gives an anti-aliased image which better represents the actual scene.

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

Project 3 Path Tracing

Intro to Ray-Tracing & Ray-Surface Acceleration

Topic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component

The Rendering Equation & Monte Carlo Ray Tracing

Homework 3: Shading, Raytracing, and Image Processing

Ray Tracing. Kjetil Babington

CPSC GLOBAL ILLUMINATION

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

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

Virtual Reality for Human Computer Interaction

MITOCW MIT6_172_F10_lec18_300k-mp4

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

Interactive Methods in Scientific Visualization

COMP371 COMPUTER GRAPHICS

Transcription:

Ray Tracing EECS 487: Interactive Computer Graphics Lecture 29: Distributed Ray Tracing Introduction and context ray casting Recursive ray tracing shadows reflection refraction Ray tracing implementation Distributed Ray Tracing anti-aliasing motion blur depth-of-field glossy surface translucency soft-shadows Why Does Ray Tracing Look Obviously Computer Generated? Crisp images... too perfect : surfaces are perfectly shiny glass is perfectly clear everything in perfect focus every object is completely still even the shadows have perfect silhouettes but... up close, edges are jagged Distributed Ray Tracing Replace each single ray with a distribution of multiple rays a.k.a. distribution ray tracing average results together Multiple rays everywhere: multiple primary rays through a pixel: supersampling: distribute rays spatially motion blur: distribute rays temporally depth of field: distribute rays through a lens multiple shadow rays to sample an area light soft shadows multiple reflection rays glossy surfaces (blurry reflection, rough specular) multiple refraction rays translucency l 1 shadow rays l 2 t r n multiple secondary rays d (primary ray)

Supersampling Instead of point sampling the color of a pixel with a ray, we cast multiple rays from eye (primary rays) through different parts of one pixel and average down the results for example, cast n n sub-pixel rays, and average the results together: c pixel = 1 n 1 n 1 c n 2 subpixel(i, j ) i=0 j=0 Non-fixed Sampling Patterns Super-sampling doesn t eliminate aliasing, it simply pushes it to higher frequencies supersampling captures more high frequencies, but frequencies above the supersampling rate are still aliased fundamentally, problem is that the signal is not bandlimited aliasing happens Other than regular, fixed sampling pattern, sampling can also be stochastic (a.k.a., random, probabilistic, or Monte Carlo) Curless08 Durand08 Stochastic Supersampling uniform Stratified Sampling Samples taken at non-uniformly spaced random offsets Replaces low-frequency aliasing pattern by noise, which is less objectionable to humans However, with random sampling, we could get unlucky, e.g., all samples in one corner over 80% of the samples are black while the pixel should be light grey stochastic To prevent clustering of the random samples, divide domain (pixel) into non-overlapping regions (sub-pixels) called strata Take one random sample per stratum Jittered sampling is stratified sampling with per-stratum sample taken at an offset from the center of each stratum: one sample per stratum randomly perturb the sample location size of perturbation vector limited by the subpixel distance patented by Pixar! one pixel one pixel Durand08 Durand

Temporal Aliasing: Motion Blur Aliasing happens in time as well as in space the sampling rate is the frame rate: 30Hz (NTSC), 25Hz (PAL), 24Hz (film) if we point-sample time, objects have a jerky, strobbed look, e.g., sampling at ¼ rotation Temporal Aliasing: Motion Blur Film automatically does temporal anti-aliasing photographic film integrates over the exposure time this shows up as motion blur in the photographs or move backward, e.g., sampled at ¾ rotation see http://www.michaelbach.de/ot/mot_wagonwheel/index.html fast moving objects move large distances between frames be careful when doing collision detection! Curless, Hanrahan Hodgins06, London et al. Temporal Aliasing: Motion Blur To avoid temporal aliasing we need to average over time also Sample objects temporally cast multiple rays from eye through the same point in each pixel each of these rays intersects the scene at a different time: r(e, d, t) average out results The result is still-frame motion blur and smooth animation t 0 t 1 t 2 Hodgins06,Durand08,Merrell08 Depth of Field and Aperture depth of field: distances for which C 0.01 object f: front; r: rear Object is considered in focus if on an 8 10 print viewed at a distance of 10, diameter of C 0.01 (1930 s standard!) Later human study shows that C should be 0.003 normankoren.com/tutorials/mtf6.html image plane Thin lens equation 1/s + 1/d = 1/f where f is lens focal length a = aperture C = circle of confusion

Depth of Field Real cameras have lenses with focal lengths only one plane is truly in focus points away from the focus project as circle of confusion the further away from the focus the larger the circle The range of distances that appear in focus is the depth of field smaller apertures (larger f-numbers) result in greater depth of field Depth of field can be simulated by distributing primary rays through different parts of a lens assembly Hart08 DoF: Implementation Start rays at lens plane A B C Standard ray tracing: all rays emanate from B pixel D uses ray BD pixel E, for object behind (or in front of) the focal plane, uses ray BE E D Put image plane at focal plane Distributed ray tracing: rays emanate from lens plane pixel D uses rays AD, BD, CD pixel E averages rays AE, BE, CE to simulate more accurately, first refract primary rays through lens Hart08 DoF: Implementation Or simply select eye positions randomly from a square region Glossy Surfaces Ray tracing simulates perfect specular reflection, true only for perfect mirrors and chrome surfaces Most surfaces are imperfect specular reflectors: surface microfacets perturb direction of reflected rays reflect rays in a cone around perfect reflection direction Phong specular lighting tries to fake this with the m shi exponent /Shirley02 RTR,TP3

Glossy Reflections: Implementation Instead of mirror images: For each ray-object intersection highlights can be soft blurred reflections of objects instead of shooting one ray in the perfect specular reflection (mirror) direction, stochastically sample multiple rays within the cone about the specular angle strength of reflection drops off rapidly away from the specular angle, probability of sampling that direction should fall off similarly Glossy Reflections Nearby objects reflect more clearly because distribution still narrow θ perfect mirror θ Farther objects reflect more blurry because distribution has spread polished surface θ near far object object θ Hart08,Yu08,Durand08 Translucency RTR, Curless09,Hart08 Shadows Similar, but for refraction Darkness caused when part or all of the illumination from a light source is blocked by an occluder (shadow caster) instead of distributing rays around the reflection ray, distribute them around the refracted ray self-shadowing: both occluder and receiver occluder/ caster shadow Transparent Translucent shadow receiver Merrell08,Curless08 AkenineMöller02

Hard and Soft Shadows Point light sources give unrealistic hard shadows Light sources that extend over an area (area light sources) cast soft-edged shadows some points see all the light: fully illuminated some points see none of the light source: the umbra some points see part of the light source: the penumbra point light source penumbra area light source occluder umbra penumbra Ray Tracing Area Light Source to Create Soft Shadows Cast multiple shadow rays from surface, distributed across the surface of the light: each ray to a different point on the light source inside the umbra, no shadow rays get through to light inside the penumbra, some shadow rays get through and some parts of the are light is visible outside the penumbra, all shadow rays get through shadow rays Durand,Chenney outside the penumbra inside umbra in the penumbra Chenney Ray Tracing Area Light Source to Create Soft Shadows At each point, sum the contributions of shadow rays from that point to find the strength of shadow: hits/rays = % illuminated Sampling Area Light Anti-aliasing: break a pixel into a grid of sub-pixels and distribute rays over the sub-pixels Soft-shadows: break an area light into a grid of N = n n point lights, each with 1/N-th the intensity of the base light sample the light, not the pixel each primary ray generates multiple shadow rays per light Shirley02 20% illuminated Durand

Classic Recursive Ray Tracing trace(ray) { (point, normal) = ray.intersect(scene); return shade(point, normal) shade(pt, normal) { color = 0 for each light source { if(!intersect(shadow_ray, scene)) color += direct_illumination if(specular) color += F * trace(reflected_ray) // also add transmitted color return color render() { for each pixel { generate primary/viewing ray pixel_color = trace(primary_ray) Distributed Area-Light Sampling trace(ray) { render() { for each pixel { generate primary/viewing ray pixel_color = trace(primary_ray) (point, normal) = ray.intersect(scene); return shade(point, normal) shade(pt, normal) { color = 0 for each light source { generate N random shadow rays foreach (shadow ray) { if(!intersect(shadow_ray, scene)) color += direct_illumination*1/n if(specular) color += F * trace(reflected_ray) // also add transmitted color return color Sample Distribution? Uniform distribution gives rise to sharp transitions/patterns inside penumbra 4 eye rays per pixel in both cases: supersampled ray tracing: one shadow ray per eye ray centered distributed ray tracing: 16 shadow rays per eye ray uniform Stochastic Sampling of Area Light Area light represented as a rectangle in 3D, each ray-object intersection samples the area-light at random: r = c + ξ 1 a + ξ 2 b, where ξ 1 and ξ 2 are random variables Stratified sampling of the area light with samples spaced uniformly plus a small perturbation { r(i, j), 0 i, j n 1 r(0, 0) b c a r(3, 3) area light Pharr Shirley

Sampling Rate As with stochastic super-sampling for antialiasing, light sampling rate must be high, otherwise high-frequency noise becomes visible Pharr stochastic ray tracing: 4 eye rays per pixel one shadow ray per eye ray random distributed ray tracing: 4 eye rays per pixel 16 shadow rays per eye ray jittered