Real- -time time global global illumination illumination in in Real interactive applications applications and and interactive games games László Szirmay Szirmay- -Kalos Kalos László
Motto Motto In theory, there is no difference In theory, there is no difference between theory and practice. between theory and practice. In practice, there is. In practice, there is.
Global I llumination I llumination rendering rendering Global 1. Visibility determination pixel 2. Illumination computation - New visibility and Illumination tasks
Pure Local Local I llumination I llumination Pure 1. Color computation uses just local information pixel 2. Visibility only from the camera 3. Object order is free
GPU hardware achitecture achitecture GPU hardware Interface vertices Transform+ Vertex Illumination Shader Geometry Shader triangles Clipping + Viewport transf. + Rasterization + interpolation fragments Fragment Texture Texturing Shader memory Compositing (Z-buffer, transparency)
Keys to to GPUGI GPUGI Keys � Importance, reuse, and pre Importance, reuse, and pre- -computation computation � � Simplification Simplification � � Exploit the GPU Exploit the GPU � – Multipass Multipass rendering rendering – � Results Results of of a a previous previous pass pass can can only only be be used used � – Render Render- -to to- -texture texture – � Results Results of of one one pass pass can can be be used used by by another another pass pass � – Floating Floating point point textures textures – � HDR HDR radiance radiance and and geometric geometric data data in in texture texture memory memory �
Simplified GI Simplified GI Approximated Participating multiple scattering media Artifact free composition Environment maps Localized Environment maps Small, Dynamic Large, Static objects environment Shadow, caustics Shadow, caustics Simpflied GI Precompution-aided GI Simplified GI
Beyond local Beyond local illumination illumination Local illumination Variance Shadow maps Localized Environment maps Localized Diffuse/glossy irradiance maps Map, Obscurances, ambient occlusion, Texture Light path maps Photon map, light cube map
= unfolding unfolding atlas = rure atlas Textrure Text u y x z v
1. Pre- -computation aided computation aided 1. Pre methods methods � Obscurances Obscurances, ambient occlusion , ambient occlusion � � Light maps Light maps � � Light path maps Light path maps �
Fake methods ( obscurances obscurances, , Fake methods ( ambient occlusion) ambient occlusion) Good for macrostructure and mesostructure
Light maps Light maps ∫ Ω L in ( x , ω ’ ) f ( x )cos θ ’ d ω ’ = f ( x ) ∫ Ω L in ( x , ω ’ ) cos θ ’ d ω ’ = L ( x ) Irradiance
Allowing dynamic lighting Allowing dynamic lighting point Exit Entry point
Preprocessing: : Exit Exit points points Preprocessing 1. Entry points: random 2. Exit points: correspond to texel centers
Preprocessing: : Transfer Transfer Preprocessing from entry entry to to exit exit points points from entry point with unit irradiance
Preprocessing: : Preprocessing Reference point point illumination illumination Reference unit irrad Virtual lights
Entry point 2 Compression: PCA Entry point 1
Having the transfer factors Having the transfer factors
with stairs stairs Room with : Room Results: Results 4Mb per obj 16K entries 32 clusters 50 FPS
2. Environment map 2. Environment map based techniques based techniques � Specular Specular reflections and refractions reflections and refractions � � Diffuse/glossy indirect illumination Diffuse/glossy indirect illumination � � Global/localized approaches Global/localized approaches �
Environment Environment mapping mapping
Problems of of environment environment Problems map based based reflections reflections map Environment map Reference
Localization: distance map Localization: distance map distance color
Ray tracing of distance maps Ray tracing of distance maps
Comparison of of Comparison Localized Refrections Refrections Localized
Multiple interreflections interreflections Multiple � So far we decomposed the scene to the So far we decomposed the scene to the � reflector and to the “rest” reflector and to the “rest” � If all reflectors have their own distance If all reflectors have their own distance � map, it is correct. map, it is correct. Frame 2 Frame 1
With multiple distance maps With multiple distance maps
Caustics- -Causticus Causticus- -Kaustikos Kaustikos Caustics
Caustic path generation Caustic path generation
distance Caustics Caustics point location power
Texture modulation modulation Texture Quads or points with dummy pos Texture uv of photon positions Vertex Pixel shader shader Billboard positions 32 x 32 Lit texture or Light map 256 x 256 filter
Summation with Summation with alpha blending alpha blending
Results (triangle) Results (triangle)
Results (billboards) (billboards) Results
Application: : Ray Ray- -tracing tracing Application effects in in games games effects
Diffuse/ glossy reflection Diffuse/ glossy reflection L ( x , ω o ) = ∫ Ω L in ( y , ω i ) f ( ω i , x , ω o ) cos θ ’ d ω i cos θ ’ x
Diffuse/ / Glossy Glossy Diffuse reflections reflections cos θ ’ o No self-occlusions! ∫ Ω L in ( o , ω i ) cos θ ’ d ω i
Localized diffuse/ Localized diffuse/ glossy maps glossy maps radiance distance
3. Participating media 3. Participating media Participating Particles billboards medium r r r ( ) ω = ω ⋅ − α + α ⋅ + ω L ( j , ) I ( j , ) ( 1 ) C E j j j j Outgoing Incoming In-scattering Emission transparency radiance radiance term
I lluminating participating I lluminating participating media: inscattering inscattering term term media: light source slice 1 light sky color pass slice 2 slice 3 final gathering pass billboard
Explosions Explosions Particles Dust: 16 Fire: 135 Smoke: 112 FPS Spherical: 70 Planar: 80
Shaded smoke Shaded smoke
Recommend
More recommend