Single Scattering in Refractive Media with Triangle Mesh Boundaries

Similar documents
Single Scattering in Refractive Media with Triangle Mesh Boundaries

CPSC GLOBAL ILLUMINATION

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

GAMES Webinar: Rendering Tutorial 2. Monte Carlo Methods. Shuang Zhao

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

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

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

Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes

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

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

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

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

Intro to Ray-Tracing & Ray-Surface Acceleration

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

Ray Casting of Trimmed NURBS Surfaces on the GPU

Accurate computation of single scattering in participating media with refractive boundaries

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

Ray tracing based fast refraction method for an object seen through a cylindrical glass

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

Lightcuts: A Scalable Approach to Illumination

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

LightSlice: Matrix Slice Sampling for the Many-Lights Problem

Supplement to Lecture 16

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping

Lighting and Shading

CS 465 Program 5: Ray II

Accurate Computation of Single Scattering in Participating Media with Refractive Boundaries

6.837 Introduction to Computer Graphics Final Exam Tuesday, December 20, :05-12pm Two hand-written sheet of notes (4 pages) allowed 1 SSD [ /17]

Korrigeringar: An introduction to Global Illumination. Global Illumination. Examples of light transport notation light

Accelerating Ray Tracing

03 RENDERING PART TWO

Direct Rendering of Trimmed NURBS Surfaces

The Traditional Graphics Pipeline

The Rendering Equation & Monte Carlo Ray Tracing

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

Photorealism: Ray Tracing

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

Interactive Shadowed Caustics Using Hierarchical Light Volumes

Illumination and Shading

Review for Ray-tracing Algorithm and Hardware

The Traditional Graphics Pipeline

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

Scalable many-light methods

Pipeline Operations. CS 4620 Lecture 10

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

Pipeline Operations. CS 4620 Lecture 14

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

SUMMARY. CS380: Introduction to Computer Graphics Ray tracing Chapter 20. Min H. Kim KAIST School of Computing 18/05/29. Modeling

Sung-Eui Yoon ( 윤성의 )

Chapter 7 - Light, Materials, Appearance

Ray Tracing. CS116B Chris Pollett Apr 20, 2004.

Discussion. Smoothness of Indirect Lighting. History and Outline. Irradiance Calculation. Irradiance Caching. Advanced Computer Graphics (Spring 2013)

Dispersion (23.5) Neil Alberding (SFU Physics) Physics 121: Optics, Electricity & Magnetism Spring / 17

Lightcuts. Jeff Hui. Advanced Computer Graphics Rensselaer Polytechnic Institute

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

Voxel-Based Global-Illumination

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

Shading, Advanced Rendering. Week 7, Wed Feb 28

Light: Geometric Optics

COMPUTER GRAPHICS AND INTERACTION

Row Tracing with Hierarchical Occlusion Maps

NVIDIA Case Studies:

Computer Graphics Ray Casting. Matthias Teschner

Real-Time Ray Tracing Using Nvidia Optix Holger Ludvigsen & Anne C. Elster 2010

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

Bidirectional Lightcuts

6. Illumination, Lighting

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

CS-184: Computer Graphics. Administrative

CS 4204 Computer Graphics

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

CS 4620 Program 4: Ray II

The Rendering Equation and Path Tracing

To Do. Real-Time High Quality Rendering. Motivation for Lecture. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing

The Traditional Graphics Pipeline

Global Illumination The Game of Light Transport. Jian Huang

The Rendering Equation. Computer Graphics CMU /15-662

Ray tracing. EECS 487 March 19,

Irradiance Gradients. Media & Occlusions

Lecture 10: Ray tracing

Interactive Ray Tracing: Higher Memory Coherence

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

Illumination & Shading: Part 1

Computer Graphics. - Ray Tracing I - Marcus Magnor Philipp Slusallek. Computer Graphics WS05/06 Ray Tracing I

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

Today. Rendering algorithms. Rendering algorithms. Images. Images. Rendering Algorithms. Course overview Organization Introduction to ray tracing

Light: Geometric Optics (Chapter 23)

Ray Tracing. Brian Curless CSEP 557 Fall 2016

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

Geometric optics. The University of Texas at Austin CS384G Computer Graphics Don Fussell

Raytracing CS148 AS3. Due :59pm PDT

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

Topics and things to know about them:

Ray Tracing. CPSC 453 Fall 2018 Sonny Chan

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

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

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

Transcription:

Single Scattering in Refractive Media with Triangle Mesh Boundaries Bruce Walter Shuang Zhao Nicolas Holzschuch Kavita Bala Cornell Univ. Cornell Univ. Grenoble Univ. Cornell Univ. Presented at SIGGRAPH 2009 1

Single Scattering Direct illumination in refractive objects is hard Single scatter from a single point light source 2

Single Scattering Direct illumination in refractive objects is hard Single scatter from a single point light source 3

Single Scattering Direct illumination in refractive objects is hard Single scatter from a single point light source 4

Problem Eye ray 5

Problem Find direct illumination at V (receiver) from L (light) L Eye ray V 6

Problem Find direct illumination at V (receiver) from L (light) L Eye ray V P Ignoring refraction 7

Challenges: Bending of Path Find direct illumination at V (receiver) from L (light) Light bends at interface according to Snell s Law L P1 L Eye ray V P Eye ray V Ignoring refraction With refraction 8

Challenges: Multiple Paths Find direct illumination at V (receiver) from L (light) Light bends at interface according to Snell s Law Can have zero, one, or many such paths (and P s) L P1 L Eye ray V P Eye ray V P2 Ignoring refraction With refraction 9

Is it important? Glass tile quality comparison Shadow rays ignore refraction Our method 10

Challenges Summary Bending of paths Multiple paths Shading normals Large triangle meshes 11

Challenges: Shading Normals Geometric normals (NG) vs. shading normals (NS) E.g., interpolated normals, bump maps, normal maps Alters directions and intensities of light paths NG NS NS NG Geometric normals Shading normals NS 12

Challenges: Shading Normals Geometric normals (NG) vs. shading normals (NS) E.g., interpolated normals, bump maps, normal maps Alters directions and intensities of light paths NG NS NS NG Geometric normals Shading normals NS 13

Limitations Finds connections that Cross the boundary exactly once Have no other changes in direction Cost depends on path count and boundary L L L V V V Yes No No 14

Prior Work Diffusion and multiple scatter [eg, Stam 95, Jensen et al. 01, Wang et al. 08] Monte Carlo [eg, Kajiya 86, Veach 97] Beam tracing [eg, Nishita & Nakamae 94, Iwasaki et al. 03, Ernst et al. 05] Photon mapping [eg, Jensen 01, Sun et al. 08, Jarosz et al. 08] Fermat s principle [eg, Mitchell & Hanrahan 92, Chen & Arvo 00] 15

Prior Work Mitchell & Hanrahan 92 Used Fermat s principle and Newton s method Reflection (shown) and refraction Limitations Only supported implicit surfaces Cannot handle shading normals Expensive 3D search Not scalable to complex geometry Mitchell & Hanrahan 92 16

Contributions Support triangles with shading normals Most widely used geometry format Required fundamental problem reformulation New search methods and intensity equations Hierarchical culling Scales to complex objects with many triangles CPU and GPU implementations Interactive performance on some scenes 17

Outline Half-vector formulation Solving for a single triangle Hierarchical culling for meshes Results 18

Fermat s Principle Define optical path length d(p) = η V-P + P-L Extrema of d(p) are the refraction points Cannot handle shading normals P L V Index of refraction = η 19

Half-Vector Formulation Used in micro-facet model [Walter et al. 07] Direction to receiver: ωv = (V - P) / V - P Direction to light: ωl = (L - P) / L - P ωv P ω L L V 20

Half-Vector Formulation Used in micro-facet model [Walter et al. 07] Direction to receiver: ωv = (V - P) / V - P Direction to light: ωl = (L - P) / L - P Half-vector: H = (η ωv + ωl) / η ωv + ωl P ω L L ωl ωv V H H η ωv 21

Half-Vector Formulation If H = -N (surface normal) then V, P, L, and N are coplanar Angles obey Snell s Law: η sin(θv) = sin(θl) It is a refraction solution Assuming V and L lie on the correct sides of the normal N L P V H 22

Half-Vector Formulation Find all P such that: H + N = 0 Natural extension to shading normals: H + Ns = 0 Newton s method to find zeroes of: f(p) = H + N P N L V H 23

Newton s Method Review Quadratically convergent near a root Each iteration doubles the precision Chaotic behavior far from a root May diverge or converge to other roots f(x) 0 x0 x2 x1 24

Outline Half-vector formulation Solving for a single triangle Geometric normal - 1D Newton Shading normals - 2D Newton Subdivision oracles Hierarchical culling for meshes Results 25

Triangle Without Shading Normals Solution must lie in plane containing V, L, and NG Unique solution always exists Simple 1D Newton s method converges Typically in just 2 to 4 iterations Check if solution lies within the triangle P NG L V H 26

Triangle Without Shading Normals Solution must lie in plane containing V, L, and NG Unique solution always exists Simple 1D Newton s method converges Typically in just 2 to 4 iterations Check if solution lies within the triangle P NG L V H 27

Triangle with Shading Normal Shading normal, NS, varies over triangle Full 2D search over triangle s area Function f(p) = H + NS maps 2D to 3D Derivative is 2X3 Jacobian matrix is non-invertible Use pseudoinverse for Newton s method:

Triangle with Shading Normal Need good starting points May have zero, one, or multiple solutions Subdivide triangle as needed to isolate solutions 29

Two Triangle Subdivision Oracles Test with strong guarantees Based on [Krawczyk 69], [Mitchell&Hanrahan 92] Conditions guarantee uniqueness and convergence Fast empirical heuristic Based on solid angles of triangle and normals 30

Triangle summary For each triangle: If no shading normals Solve for P with 1D Newton Else if passes the subdivision oracle Solve for P with 2D Newton Else Subdivide into 4 triangles and try again Test if P lies within the triangle 31

Outline Half-vector formulation Solving for a single triangle Hierarchical culling for meshes Results 32

Culling Tests Most triangles contain no solutions for P Three quick culling tests Spindle Sidedness Interval 33

Spindle Culling Test Refraction bends path by angle arccos(1/η) Solutions must lie within circular arc (2d) or spindle (3d) P arccos(1/η) L V 34

Spindle Culling Test Refraction bends path by angle arccos(1/η) Solutions must lie within circular arc (2d) or spindle (3d) P arccos(1/η) L V 35

Spindle Culling Test Refraction bends path by angle arccos(1/η) Solutions must lie within circular arc (2d) or spindle (3d) P arccos(1/η) L V 36

Sidedness Culling Test Light L must be on the outside of surface at P Receiver V must be inside within the critical angle L N arccos(1/η) V 37

Hierarchical Culling for Meshes Apply culling test to groups of triangles Use 6D position-normal tree [Bala et al. 03] Leaves are boundary triangles Boxes and cones bound positions and normals Traverse top-down Position-normal tree 38

Algorithm Summary Build position-normal tree for each boundary mesh For each eye ray Trace until hits surface or volume-scatters at V Select a light source point, L Traverse tree to solve for all P on boundary For each solution point P Check for occlusion along path Compute effective light distance Add contribution to pixel value Eye ray P1 V P2 L 39

Effective Distance to Source Refraction alters usual 1 / r 2 intensity falloff Can focus or defocus the light Compute effective light distance for each path Simple formula for triangles without shading normal Use ray differentials [Igehy 99] for shading normal case See paper for details 40

Outline Half-vector formulation Solving for a single triangle Hierarchical culling for meshes Results 41

Results - CPU Three scenes without shading normals Teapot Cuboctahedron Amber 42

Results - CPU Three scenes without shading normals Teapot 15.3s Cuboctahedron 13.9s Amber 19.2s 512x512 images, 64 samples per pixel, 8-core 2.83GHz Intel Core2 43

Results - Teapot Teapot quality comparison Shadow rays ignore refraction Our method (15.4s) 44

Results - Teapot Teapot quality comparison Shadow rays ignore refraction Our method (15.4s) 45

Results - Cuboctahedron Cuboctahedron movie (13.9s) 46

Results - GPU Implemented on GPU using CUDA 2.0 1D, 2D Newton iteration Hierarchical pruning Ray tracing based on [Popov et al. 2007] One kernel thread per eye ray Does not yet support all scenes 47

Results - GPU Name Render Time FPS Teapot 0.1 s 10 fps Cuboctahedron 0.14 s 7 fps Amber 0.3 s 3 fps 512x512 images, 2 eye rays per pixel + 40-60 volume samples, nvidia GTX 280, CUDA 2.0 48

Results - GPU Teapot example 10 fps on GPU 49

Results - CPU Three scenes with shading normals Glass tile Glass mosaic Pool 50

Results - CPU Three scenes with shading normals Glass tile 66.9s Glass mosaic 87.8s Pool 59.4s 512x512 images, 64 samples per pixel, 8-core 2.83GHz Intel Core2 51

Results - Glass Tile Photon map (equal time) Our method (66.9s) 52

Results - Glass Mosaic Glass mosaic movie (87.8s) 53

Results - Component Evaluation Evaluation of algorithm components Pool (2632 triangles in boundary) Without Hierarchy Guaranteed Convergence Subdivision Heuristic Time Ratio 1934.6s 32x 141.1s 2.4x 59.4s 1x 54

Results - Bumpy sphere Bumpy sphere (9680 triangles) Volume sampling noise Used 128 samples per pixel Effective distance clamping Intensity Ray depth Our method 304.3 s 55

Results - Bumpy sphere Bumpy sphere (9680 triangles) Shadow rays ignore refraction Our method 56

Results - Bumpy sphere Bumpy sphere (9680 triangles) Path tracing(16x time) Our method 57

Results - Bumpy sphere Bumpy sphere (9680 triangles) Photon map 10M (equal time) Our method 58

Conclusion New method for single scatter in refractive media Applicable to many rendering algorithms New half-vector formulation Efficient culling and search methods Supports shading normals and large triangle meshes Interactive performance for some scenes Future work Better culling Reflections and low-order scattering Multiple interfaces 59

Acknowledgements Sponsors NSF Career 0644175, CPA 0811680, CNS 0615240, CNS 0403340 Intel NVidia Microsoft INRIA sabbatical program PCG Graphics Lab and Elizabeth Popolo 60

The End 61

Results - CPU timings Name Render Triangles Time Surface Other Shading Normals Teapot 15.3 s 12 4096 No Cuboctahedron 13.9 s 20 0 No Amber 19.2 s 36 60556 No Glass tile 66.9 s 798 60 Yes Glass mosaic 87.8 s 20813 1450 Yes Pool 59.4 s 2632 4324 Yes Bumpy Sphere 304.3 s 9680 0 Yes 512x512 images, 64 samples per pixel (128 for bumpy sphere), 8-core 2.83GHz Intel Core2 CPU 62

Newton s Method Iterative root finding method Start with initial guess x0 Iteration: xi+1 = xi - f(xi) / f (xi) f(x) 0 x0 63

Newton s Method Iterative root finding method Start with initial guess x0 xi+1 = xi - f(xi) / f (xi) f(x) 0 x0 x1 64

Newton s Method Iterative root finding method Start with initial guess x0 xi+1 = xi - f(xi) / f (xi) f(x) 0 x0 x2 x1 65