Analytical Motion Blur Rasterization with Compression 1 Carl Johan Gribel Michael Doggett1 1,2 Tomas Akenine-Möller Lund University 2 Intel Corproration 1 söndag den 27 juni 2010 Motivation söndag den 27 juni 2010 Motivation • • Human visual system designed to detect motion • Motion blur aids the motion detection of the visual system This fails when presented too few images, or too much motion per image - motion gets jumpy söndag den 27 juni 2010 Talk outline • Edge Equations and exact exposure intervals - analytic inside-test - visibility management • Computing the time integral - opaque/translucent resolve • Compression söndag den 27 juni 2010 Previous work • Accumulation buffer [HA90][WGER05][DWS88] - expensive - strobing artifacts • Stochastic [CCC87] [AMMH07][McGuire et al. HPG2010] - correct solution but slow convergence • Single sample analytical visibility [KB83] Extended with stochastic shading by Sung et al. [SPW02] - details missing for visibility computations söndag den 27 juni 2010 Edge Equation primer for static triangle p1 (x0 , y0 ) p2 söndag den 27 juni 2010 p0 Edge Equation primer for static triangle p1 (x0 , y0 ) p2 söndag den 27 juni 2010 p0 Edge Equation primer for static triangle p1 (x0 , y0 ) e1 < 0 p2 3D homogeneous space: söndag den 27 juni 2010 p0 e1 = (p2 × p0 ) · (x0 , y0 , 1) Edge Equation primer for static triangle p1 e0 e2 e1 p2 3D homogeneous space: söndag den 27 juni 2010 p0 e1 = (p2 × p0 ) · (x0 , y0 , 1) Edge Equation primer for moving triangle söndag den 27 juni 2010 Edge Equation primer for moving triangle söndag den 27 juni 2010 Edge Equation primer for moving triangle r0 q0 p0 (t) = (1 − t)q0 + tr0 söndag den 27 juni 2010 t ∈ [0, 1] Edge Equations p1 (t) (x0 , y0 ) p2 (t) p0 (t) e1 (t) = (p2 (t) × p0 (t)) · (x0 , y0 , 1) = (((1 − t)q2 + tr2 ) × ((1 − t)q0 + tr0 )) · (x0 , y0 , 1) 2 = (f t + gt + h) · (x0 , y0 , 1) söndag den 27 juni 2010 Edge Equations p1 (t) (x0 , y0 ) p2 (t) p0 (t) e1 (t) = (p2 (t) × p0 (t)) · (x0 , y0 , 1) = (((1 − t)q2 + tr2 ) × ((1 − t)q0 + tr0 )) · (x0 , y0 , 1) 2 = (f t + gt + h) · (x0 , y0 , 1) We also derive the analytical depth function d(t) ... söndag den 27 juni 2010 t=0.0 depth function t=1.0 0.33 1.0 t t=0.0 t=1.0 söndag den 27 juni 2010 Rasterization • For each pixel of bounding box, compute 2nd degree solutions • Insert intervals into per-pixel list söndag den 27 juni 2010 d t söndag den 27 juni 2010 d t söndag den 27 juni 2010 d Resolve to final pixel color t söndag den 27 juni 2010 Opaque resolve d • Sweep over time and keep track of overlapping intervals • • Pick colors of the closest intervals Blend together for final color t söndag den 27 juni 2010 Opaque resolve d • Sweep over time and keep track of overlapping intervals • • Pick colors of the closest intervals Blend together for final color t söndag den 27 juni 2010 Opaque resolve d • Sweep over time and keep track of overlapping intervals • • Pick colors of the closest intervals Blend together for final color t söndag den 27 juni 2010 Translucent resolve • d Sweep over time and keep track of overlapping intervals • Alpha-blend each subsection • Blend together for final color α = 1.0 { { α = 0.6 t söndag den 27 juni 2010 Translucent resolve • d Sweep over time and keep track of overlapping intervals • Alpha-blend each subsection • Blend together for final color α = 1.0 { { α = 0.6 t söndag den 27 juni 2010 Translucent resolve • d Sweep over time and keep track of overlapping intervals • Alpha-blend each subsection • Blend together for final color α = 1.0 { { α = 0.6 t söndag den 27 juni 2010 Compression • Will end up with lots of intervals • But, can expect spatial & temporal coherency • Proposal: merge similar intervals söndag den 27 juni 2010 Compression: Oracle function O(∆i , ∆j ) • Metric for interval similarity • Merge pairs of intervals deemed most similar söndag den 27 juni 2010 d ∆i ∆j t O(∆i , ∆j ) = s h1 max(tj − e ti , 0)+ h2 |¯ zi − zj |+ h3 |ki − kj |+ e h4 (ti − s ti + h5 (|ci −cj |) söndag den 27 juni 2010 e tj − s tj )+ temporal proximity d ∆i ∆j t O(∆i , ∆j ) = s h1 max(tj − e ti , 0)+ h2 |¯ zi − zj |+ h3 |ki − kj |+ e h4 (ti − s ti + h5 (|ci −cj |) söndag den 27 juni 2010 e tj − s tj )+ temporal proximity depths d ∆j ∆i t O(∆i , ∆j ) = s h1 max(tj − e ti , 0)+ h2 |¯ zi − zj |+ h3 |ki − kj |+ e h4 (ti − s ti + h5 (|ci −cj |) söndag den 27 juni 2010 e tj − s tj )+ temporal proximity depths slope d ∆i ∆j t O(∆i , ∆j ) = s h1 max(tj − e ti , 0)+ temporal proximity depths slope e tj temporal coverage h2 |¯ zi − zj |+ h3 |ki − kj |+ e h4 (ti − s ti + h5 (|ci −cj |) söndag den 27 juni 2010 − s tj )+ d ∆i ∆j t O(∆i , ∆j ) = s h1 max(tj − e ti , 0)+ temporal proximity depths slope e tj temporal coverage color norm h2 |¯ zi − zj |+ h3 |ki − kj |+ e h4 (ti − s ti + h5 (|ci −cj |) söndag den 27 juni 2010 − s tj )+ d ∆i ∆j t O(∆i , ∆j ) = s h1 max(tj − e ti , 0)+ temporal proximity depths slope e tj temporal coverage color norm h2 |¯ zi − zj |+ h3 |ki − kj |+ e h4 (ti − s ti + h5 (|ci −cj |) weights söndag den 27 juni 2010 − s tj )+ Interval merging • • • Merge interval pair with lowest Oracle value Combine temporal coverage Blend attributes d d t söndag den 27 juni 2010 t Compression with occlusion söndag den 27 juni 2010 39 intervals 8 intervals 77 intervals 8 intervals Results söndag den 27 juni 2010 GT söndag den 27 juni 2010 4 spp 16 spp Analytical Compression: 8 söndag den 27 juni 2010 Compression: 8 söndag den 27 juni 2010 Ground Truth Stochastic 12 spp Analytical, compression 8 söndag den 27 juni 2010 söndag den 27 juni 2010 söndag den 27 juni 2010 Compression Rates GT söndag den 27 juni 2010 Rate 4 Rate 6 Rate 8 Rate 10 Compression: 64 söndag den 27 juni 2010 Compression: 64 söndag den 27 juni 2010 Algorithm summary • Time-dependent edge equations to compute exact exposure intervals • Visibility management by using a linear approximation of a cubic rational depth function • Blur translucent geometry by performing alphablending extended in time • We propose a compression algorithm to address fixed memory requirements söndag den 27 juni 2010 Future work • GPU implementation (in progress) • Motion blurred shadows (in progress) • Apply decoupled shading • Analytical spatial anti-aliasing • Higher order motion söndag den 27 juni 2010 Danke ! söndag den 27 juni 2010 Danke ! * No bunnies were harmed during the research söndag den 27 juni 2010 Compression failure case Fast moving fence 24 spp söndag den 27 juni 2010 Analytical 16 intervals 256 spp Depth approximation error 108 Relative depth error histogram 107 106 105 104 103 102 101 100 0.001% söndag den 27 juni 2010 0.01% 0.1% 1% 10% 100%