Global Illumination Adapted from… Thomas Funkhouser Princeton University C0S 526, Fall 2002 Additional material from… H.W. Jensen, Realistic Image Synthesis Using Photon Mapping, A.K. Peters Ltd., 2001
Overview • Global illumination • Rendering equation • Overview of solution methods
Direct Illumination � � � � � � � � � ω = ω + ω ω ω ω • ω L ( x ' , ' ) L ( x ' , ' ) f ( x ' , , ' ) L ( x ' , )( n ) d o e r i Ω L Light Camera � ω d � � � ω ω n ' Ω ' x
Direct Illumination Philip Dutré
Global Illumination � � � � � � � � � ω = ω + ω ω ω ω • ω L ( x ' , ' ) L ( x ' , ' ) f ( x ' , , ' ) L ( x ' , )( n ) d o e r i Ω Surface Light Surface � ω d � � � ω ω n ' Ω ' x
Global Illumination Jensen Ray tracing Henrik Wann Jensen
Global Illumination Jensen + soft shadows Henrik Wann Jensen
Global Illumination Jensen + caustics Henrik Wann Jensen
Global Illumination Jensen + indirect diffuse illumination Henrik Wann Jensen
Rendering Equation � � � � � � � � � ω = ω + ω ω ω ω • ω L ( x ' , ' ) L ( x ' , ' ) f ( x ' , , ' ) L ( x ' , )( n ) d o e r i Ω Surface Surface � ω d � � � ω ω n ' Ω ' x Kajiya 1986
Rendering Equation (2) � → = → + → → → L ( x ' x " ) L ( x ' x " ) f ( x x ' x " ) L ( x x ' ) V ( x , x ' ) G ( x , x ' ) dA e r S dA x x " Θ o � � � ω ω n ' Θ′ i Θ′ Θ cos cos = i o G ( x , x ' ) ' x − 2 x x ' dA ' Kajiya 1986
Solution Methods • OpenGL • Radiosity • Ray tracing • Distribution ray tracing • Path tracing
Path Types
Path Types? Henrik Wann Jensen
Path Types? Paul Debevec
Path Types? Henrik Wann Jensen
Path Types? RenderPark
Path Type Notation • Introduced by [Heckbert, 1990] • Vertices of the light path can be: � L – a light source � E – the eye � S – a specular reflection � D – a diffuse reflection • Combinations of paths: � (k)+ one or more of k events � (k)* zero or more of k events � (k)? zero or one k event � (k|k’) a k or a k’ event • Examples: � Radiosity: LD*E � Ray Tracing: LD?S*E � Path Tracing: L(D|S)*E � Caustics: LS+DE
Path Types • OpenGL � LDE • Ray tracing � LD?S*E • Radiosity � LD*E • Path tracing � L(D|S)*E John Hart
OpenGL � � � � � � � � � ω = ω + ω ω ω ω • ω L ( x ' , ' ) L ( x ' , ' ) f ( x ' , , ' ) L ( x ' , )( n ) d o e r i Ω Camera Light Assume Assume direct illumination direct illumination from point lights from point lights � � � and ignore visibility and ignore visibility ω ω n ' Ω ' x nlights � � � � � � � � ω = ω + ω ω ω ω • L ( x ' , ' ) L ( x ' , ' ) f ( x ' , , ' ) L ( x ' , )( n ) o e r i = i 1
Ray Tracing � � � � � � � � � ω = ω + ω ω ω ω • ω L ( x ' , ' ) L ( x ' , ' ) f ( x ' , , ' ) L ( x ' , )( n ) d o e r i Ω Camera Surface Light Assume Assume � � � specular reflection specular reflection ω ω n ' is only significant is only significant Ω indirect illumination indirect illumination ' x nlights � � � � � � � � ω = ω + ω ω ω ω • + L ( x ' , ' ) L ( x ' , ' ) f ( x ' , , ' ) L ( x ' , )( n ) specular o e r i = 1 i
Ray Tracing Algorithm
Radiosity � → = → + → → → L ( x ' x " ) L ( x ' x " ) f ( x x ' x " ) L ( x x ' ) V ( x , x ' ) G ( x , x ' ) dA e r S dA Assume everything is Lambertian Assume everything is Lambertian x j Θ o � n � = + B ( x ' ) B ( x ' ) f ( x ' ) B ( x ) V ( x , x ' ) G ( x , x ' ) dA Θ′ e r , d i S ρ x ' ( x ' ) � = + d B ( x ' ) B ( x ' ) B ( x ) V ( x , x ' ) G ( x , x ' ) dA dA π e i S N � 1 V ( x , x ' ) G ( x , x ' ) � � = + ρ = B B B F where F dA dA i e , i i j ij π ij j i A = j 1 i A A i j
Path Tracing � � � � � � � � � ω = ω + ω ω ω ω • ω L ( x ' , ' ) L ( x ' , ' ) f ( x ' , , ' ) L ( x ' , )( n ) d o e r i Ω Perform Neumann series expansion Perform Neumann series expansion � � � � � � � � = e + ω = ω ω ω ω • ω L L TL T ( x ' , ' ) g f ( x ' , , ' ) g ( x ' , )( n ) d where r Ω = + + + + 2 3 L L TL T L T L ... e e e e • Convergent approximation • Also suggested by [Kajiya, 1986]
Path Tracing T 2 L e T 3 L e L e TL e L e L e +TL e +T 2 L e L e +…+T 3 L e L e +TL e Philip Dutré
Path Tracing Algorithm
Distribution Ray Tracing � � � � � � � � � ω = ω + ω ω ω ω • ω L ( x ' , ' ) L ( x ' , ' ) f ( x ' , , ' ) L ( x ' , )( n ) d o e r i Ω Estimate integral Estimate integral � ω for each reflection for each reflection ' � ω � by random sampling by random sampling ω � � 4 ω ω 3 � � 5 2 ω n 6 � Ω ω Also: 1 ' x • Depth of field • Motion blur • etc.
Distribution Ray Tracing • Random direction is computed as follows. • Given two uniformly distributed random variables,
Monte Carlo Path Tracing � � � � � � � � � ω = ω + ω ω ω ω • ω L ( x ' , ' ) L ( x ' , ' ) f ( x ' , , ' ) L ( x ' , )( n ) d o e r i Ω Estimate integral Estimate integral for each pixel for each pixel by random sampling by random sampling Also: • Depth of field • Motion blur • etc.
Ray Tracing vs. Path Tracing Path tracing Ray tracing Jim Kajiya
Bidirectional Path Tracing • Role of source and receiver can be switched, flux does not change • Exploiting duality can increase convergence rate Philip Dutré
Bidirectional Path Tracing Philip Dutré
Tracing From Eye Philip Dutré
Tracing from Lights Philip Dutré
Bidirectional Path Tracing Philip Dutré
Bidirectional Path Tracing Algorithm
Bidirectional Path Tracing (RenderPark 98) Philip Dutré
Summary • Global illumination � Rendering equation • Overview of solution methods � OpenGL � Radiosity � Ray tracing � Distribution ray tracing � Path tracing
Recommend
More recommend