Download presentation
Presentation is loading. Please wait.
Published byCecily McCoy Modified over 9 years ago
1
Fast Approximation to Spherical Harmonics Rotation Sumanta Pattanaik University of Central Florida Kadi Bouatouch IRISA / INRIA Rennes Jaroslav Křivánek Czech Technical University Jaakko Konttinen University of Central Florida Jiří Žára Czech Technical University ComputerGraphicsGroup
2
Jaroslav Křivánek – Spherical Harmonics Rotation2/40 Presentation Topic What? Rotate a spherical function represented by spherical harmonics How? Approximation by a truncated Taylor expansion Why? Applications in real-time rendering and global illumination
3
Jaroslav Křivánek – Spherical Harmonics Rotation3/40 Unfortunate Finding Our technique is only MARGINALLY FASTER than a previous technique.
4
Jaroslav Křivánek – Spherical Harmonics Rotation4/40 Questions You Might Want to Ask Q1: So why taking up a SIGGRAPH sketch slot? Found out only very recently. Q2: And before? Implementation of previous work was NOT OPTIMIZED. Q3: Does optimization change that much? In this case, it does (4-6 times speedup). Q4: How did you find out? I’ll explain later.
5
Jaroslav Křivánek – Spherical Harmonics Rotation5/40 Talk Overview Spherical Harmonics Spherical Harmonics Rotation Previous Techniques Our Rotation Approximation Applications & Results Conclusions
6
Jaroslav Křivánek – Spherical Harmonics Rotation6/40 Talk Overview Spherical Harmonics Spherical Harmonics Rotation Previous Techniques Our Rotation Approximation Applications & Results Conclusions
7
Jaroslav Křivánek – Spherical Harmonics Rotation7/40 Spherical Harmonics Basis functions on the sphere
8
Jaroslav Křivánek – Spherical Harmonics Rotation8/40 Spherical Harmonics + ++++ +++
9
Jaroslav Křivánek – Spherical Harmonics Rotation9/40 Spherical Harmonics Function represented by a vector of coefficients: n … order
10
Jaroslav Křivánek – Spherical Harmonics Rotation10/40 Talk Overview Spherical Harmonics Spherical Harmonics Rotation Previous Techniques Our Rotation Approximation Applications & Results Conclusions
11
Jaroslav Křivánek – Spherical Harmonics Rotation11/40 SH Rotation – Problem Definition Given coefficients , representing a spherical function find coefficients for directly from coefficients .
12
Jaroslav Křivánek – Spherical Harmonics Rotation12/40 SH Rotation Matrix Rotation = linear transformation by R: R … spherical harmonics rotation matrix Given the desired 3D rotation, find the matrix R
13
Jaroslav Křivánek – Spherical Harmonics Rotation13/40 Talk Overview Spherical Harmonics Spherical Harmonics Rotation Previous Techniques Our Rotation Approximation Applications & Results Conclusions
14
Jaroslav Křivánek – Spherical Harmonics Rotation14/40 Previous Work – Molecular Chemistry [Ivanic and Ruedenberg 1996] [Choi et al. 1999] Slow Bottleneck in rendering applications
15
Jaroslav Křivánek – Spherical Harmonics Rotation15/40 Previous Work – Computer Graphics [Kautz et al. 2002] zxzxz-decomposition THE fastest previous method THE method we compare against THE method nearly as fast as ours if properly optimized
16
Jaroslav Křivánek – Spherical Harmonics Rotation16/40 zxzxz-decomposition [Kautz et al. 02] Decompose the 3D rotation into ZYZ Euler angles: R = R Z ( ) R Y ( ) R Z ( )
17
Jaroslav Křivánek – Spherical Harmonics Rotation17/40 zxzxz-decomposition [Kautz et al. 02] R = R Z ( ) R Y ( ) R Z ( ) Rotation around Z is simple and fast Rotation around Y still a problem
18
Jaroslav Křivánek – Spherical Harmonics Rotation18/40 zxzxz-decomposition [Kautz et al. 02] Rotation around Y Decomposition of R Y ( ) into R X (+90˚) R Z ( ) R X (-90˚) R = R Z ( ) R X (+90˚) R Z ( ) R X (-90˚) R Z ( ) Rotation around X is fixed-angle pre-computed matrix
19
Jaroslav Křivánek – Spherical Harmonics Rotation19/40 zxzxz-decomposition [Kautz et al. 02] Optimized implementation – unrolled code 4-6 x faster
20
Jaroslav Křivánek – Spherical Harmonics Rotation20/40 Talk Overview Spherical Harmonics Spherical Harmonics Rotation Previous Techniques Our Rotation Approximation Applications & Results Conclusions
21
Jaroslav Křivánek – Spherical Harmonics Rotation21/40 Our Rotation 1. zyz decomposition: R = R Z ( ) R Y ( ) R Z ( ) 2. R Y ( ) approximated by a truncated Taylor expansion
22
Jaroslav Křivánek – Spherical Harmonics Rotation22/40 Taylor Expansion of R Y ( )
23
Jaroslav Křivánek – Spherical Harmonics Rotation23/40 Taylor Expansion of R Y ( ) “1.5-th order Taylor exp.” Fixed, sparse matrices
24
Jaroslav Křivánek – Spherical Harmonics Rotation24/40 SH Rotation – Results L2 error for a unit length input vector
25
Jaroslav Křivánek – Spherical Harmonics Rotation25/40 Talk Overview Spherical Harmonics Spherical Harmonics Rotation Previous Techniques Our Rotation Approximation Applications & Results Conclusions
26
Jaroslav Křivánek – Spherical Harmonics Rotation26/40 Application 1 – Radiance Caching Global illumination: smooth indirect term Sparse computation Interpolation
27
Jaroslav Křivánek – Spherical Harmonics Rotation27/40 Incoming Radiance Interpolation Interpolate coefficient vectors 1 and 2 p1p1 p2p2 p
28
Jaroslav Křivánek – Spherical Harmonics Rotation28/40 Interpolation on Curved Surfaces
29
Jaroslav Křivánek – Spherical Harmonics Rotation29/40 Interpolation on Curved Surfaces Align coordinate frames in interpolation pp1p1 R
30
Jaroslav Křivánek – Spherical Harmonics Rotation30/40 Radiance Caching Results
31
Jaroslav Křivánek – Spherical Harmonics Rotation31/40 Radiance Caching Results Direct illumination Direct + indirect
32
Jaroslav Křivánek – Spherical Harmonics Rotation32/40 More radiance caching: Temporal radiance caching, 3:45, room 210
33
Jaroslav Křivánek – Spherical Harmonics Rotation33/40 Application 2 – Normal Mapping Original method by [Kautz et al. 2002] Environment map Arbitrary BRDF Extended with normal mapping Needs per-pixel rotation to align with the modulated normal Rotation implemented in fragment shader
34
Jaroslav Křivánek – Spherical Harmonics Rotation34/40 Normal Mapping Results Rotation IgnoredOur Rotation
35
Jaroslav Křivánek – Spherical Harmonics Rotation35/40 Normal Mapping Results Rotation IgnoredOur Rotation
36
Jaroslav Křivánek – Spherical Harmonics Rotation36/40 Comparison – Time per rotation (CPU) DirectX October 2004: 1.8 x slower than Ivanic Order 6Order 10 T [ s]
37
Jaroslav Křivánek – Spherical Harmonics Rotation37/40 Talk Overview Spherical Harmonics Spherical Harmonics Rotation Previous Techniques Our Rotation Approximation Applications & Results Conclusions
38
Jaroslav Křivánek – Spherical Harmonics Rotation38/40 Conclusion Proposed approximate SH rotation Slightly faster than previous technique SH Rotation Speed 1. Our approximation 2. DX 9.0c (up to order 6) 3. zxzxz-decomposition with unrolled code Lesson learned Micro-optimization important for fair comparisons
39
Jaroslav Křivánek – Spherical Harmonics Rotation39/40 Future Work Fast approximate rotation for wavelets
40
Jaroslav Křivánek – Spherical Harmonics Rotation40/40 Questions ? ? ? ? ? ? ? ? Code on-line (SH rotation, radiance caching) http://moon.felk.cvut.cz/~xkrivanj/projects/rcaching
41
Jaroslav Křivánek – Spherical Harmonics Rotation41/40 Appendix – Bibliography [Křivánek et al. 2005]Jaroslav Křivánek, Pascal Gautron, Sumanta Pattanaik, and Kadi Bouatouch. Radiance caching for efficient global illumination computation. IEEE Transactions on Visualization and Computer Graphics, 11(5), September/October 2005. [Ivanic and Ruedenberg 1996]Joseph Ivanic and Klaus Ruedenberg. Rotation matrices for real spherical harmonics. direct determination by recursion. J. Phys. Chem., 100(15):6342–6347, 1996. Joseph Ivanic and Klaus Ruedenberg. Additions and corrections : Rotation matrices for real spherical harmonics. J. Phys. Chem. A, 102(45):9099– 9100, 1998. [Choi et al. 1999]Cheol Ho Choi, Joseph Ivanic, Mark S. Gordon, and Klaus Ruedenberg. Rapid and stable determination of rotation matrices between spherical harmonics by direct recursion. J. Chem. Phys., 111(19):8825–8831, 1999. [Kautz et al. 2002] Jan Kautz, Peter-Pike Sloan, and John Snyder. Fast, arbitrary BRDF shading for low-frequency lighting using spherical harmonics. In Proceedings of the 13 th Eurographics workshop on Rendering, pages 291–296. Eurographics Association, 2002.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.