Fast Approximation to Spherical Harmonics Rotation - PowerPoint PPT Presentation

1 / 41
About This Presentation
Title:

Fast Approximation to Spherical Harmonics Rotation

Description:

University of Central Florida. Kadi Bouatouch. IRISA / INRIA Rennes. Jaroslav Kriv nek ... Kriv nek, Pascal Gautron, Sumanta Pattanaik, and Kadi Bouatouch. ... – PowerPoint PPT presentation

Number of Views:199
Avg rating:3.0/5.0
Slides: 42
Provided by: jaroslav6
Category:

less

Transcript and Presenter's Notes

Title: Fast Approximation to Spherical Harmonics Rotation


1
Fast Approximation to Spherical Harmonics Rotation
Jaroslav Krivánek Czech Technical University
Jaakko Konttinen University of Central Florida
Sumanta Pattanaik University of Central Florida
Kadi Bouatouch IRISA / INRIA Rennes
Jirí ára Czech Technical University
2
Presentation Topic
  • What?
  • Rotate a spherical function represented
    byspherical harmonics
  • How?
  • Approximation by a truncated Taylor expansion
  • Why?
  • Applications in real-time rendering and global
    illumination

3
Unfortunate Finding
  • Our technique is only MARGINALLY FASTER than a
    previous technique.

4
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?
  • Ill explain later.

5
Talk Overview
  • Spherical Harmonics
  • Spherical Harmonics Rotation
  • Previous Techniques
  • Our Rotation Approximation
  • Applications Results
  • Conclusions

6
Talk Overview
  • Spherical Harmonics
  • Spherical Harmonics Rotation
  • Previous Techniques
  • Our Rotation Approximation
  • Applications Results
  • Conclusions

7
Spherical Harmonics
  • Basis functions on the sphere

8
Spherical Harmonics

9
Spherical Harmonics
Function represented by a vector of coefficients
n order
10
Talk Overview
  • Spherical Harmonics
  • Spherical Harmonics Rotation
  • Previous Techniques
  • Our Rotation Approximation
  • Applications Results
  • Conclusions

11
SH Rotation Problem Definition
  • Given coefficients ?, representing a
    sphericalfunction
  • find coefficients ? for directly from
    coefficients ?.

12
SH Rotation Matrix
  • Rotation linear transformation by R
  • R spherical harmonics rotation matrix
  • Given the desired 3D rotation, find the matrix R

13
Talk Overview
  • Spherical Harmonics
  • Spherical Harmonics Rotation
  • Previous Techniques
  • Our Rotation Approximation
  • Applications Results
  • Conclusions

14
Previous Work Molecular Chemistry
  • Ivanic and Ruedenberg 1996
  • Choi et al. 1999
  • Slow
  • Bottleneck in rendering applications

15
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
zxzxz-decomposition Kautz et al. 02
  • Decompose the 3D rotation into ZYZ Euler angles
    R RZ(a) RY(b) RZ(g)

17
zxzxz-decomposition Kautz et al. 02
  • R RZ(a) RY(b) RZ(g)
  • Rotation around Z is simple and fast
  • Rotation around Y still a problem

18
zxzxz-decomposition Kautz et al. 02
  • Rotation around Y
  • Decomposition of RY(b) into
  • RX(90)
  • RZ(b)
  • RX(-90)
  • R RZ(a) RX(90) RZ(b) RX(-90) RZ(g)
  • Rotation around X is fixed-angle
  • pre-computed matrix

19
zxzxz-decomposition Kautz et al. 02
  • Optimized implementation unrolled code
  • 4-6 x faster

20
Talk Overview
  • Spherical Harmonics
  • Spherical Harmonics Rotation
  • Previous Techniques
  • Our Rotation Approximation
  • Applications Results
  • Conclusions

21
Our Rotation
  • zyz decomposition R RZ(a) RY(b) RZ(g)
  • RY(b) approximated by a truncated Taylor
    expansion

22
Taylor Expansion of RY(b)
23
Taylor Expansion of RY(b)
  • 1.5-th order Taylor exp.
  • Fixed, sparse matrices

24
SH Rotation Results
  • L2 error for a unit length input vector

25
Talk Overview
  • Spherical Harmonics
  • Spherical Harmonics Rotation
  • Previous Techniques
  • Our Rotation Approximation
  • Applications Results
  • Conclusions

26
Application 1 Radiance Caching
  • Global illumination smooth indirect term
  • Sparse computation
  • Interpolation

27
Incoming Radiance Interpolation
  • Interpolate coefficient vectors ?1 and ?2

28
Interpolation on Curved Surfaces
29
Interpolation on Curved Surfaces
  • Align coordinate frames in interpolation

R
30
Radiance Caching Results
31
Radiance Caching Results
Direct illumination
Direct indirect
32
More radiance caching Temporal radiance caching,
345, room 210
33
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 withthe
    modulated normal
  • Rotation implemented in fragment shader

34
Normal Mapping Results
Rotation Ignored
Our Rotation
35
Normal Mapping Results
Rotation Ignored
Our Rotation
36
Comparison Time per rotation (CPU)
Order 6
Order 10
T ms
T ms
  • DirectX October 2004 1.8 x slower than Ivanic

37
Talk Overview
  • Spherical Harmonics
  • Spherical Harmonics Rotation
  • Previous Techniques
  • Our Rotation Approximation
  • Applications Results
  • Conclusions

38
Conclusion
  • Proposed approximate SH rotation
  • Slightly faster than previous technique
  • SH Rotation Speed
  • Our approximation
  • DX 9.0c (up to order 6)
  • zxzxz-decomposition with unrolled code
  • Lesson learned
  • Micro-optimization important for fair comparisons

39
Future Work
  • Fast approximate rotation for wavelets

40
Questions
Code on-line (SH rotation, radiance
caching) http//moon.felk.cvut.cz/xkrivanj/projec
ts/rcaching
?
?
?
?
?
?
?
?
41
Appendix Bibliography
  • Krivánek et al. 2005 Jaroslav Krivá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)63426347,
    1996.Joseph Ivanic and Klaus Ruedenberg.
    Additions and corrections Rotation matrices for
    real spherical harmonics. J. Phys. Chem. A,
    102(45)90999100, 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)88258831, 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 13th Eurographics workshop
    on Rendering, pages 291296. Eurographics
    Association, 2002.
Write a Comment
User Comments (0)
About PowerShow.com