skip to main content
research-article

Fast and accurate spherical harmonics products

Published:10 December 2021Publication History
Skip Editorial Notes Section

Editorial Notes

The authors have requested minor, non-substantive changes to the Version of Record and, in accordance with ACM policies, a Corrected Version of Record (CVoR) was published on August 16, 2022. The authors provided an incorrect funder ID number in the original published version of record. The CVoR corrects this error. For reference purposes, the VoR may still be accessed via the Supplemental Material section on this page.

Skip Abstract Section

Abstract

Spherical Harmonics (SH) have been proven as a powerful tool for rendering, especially in real-time applications such as Precomputed Radiance Transfer (PRT). Spherical harmonics are orthonormal basis functions and are efficient in computing dot products. However, computations of triple product and multiple product operations are often the bottlenecks that prevent moderately high-frequency use of spherical harmonics. Specifically state-of-the-art methods for accurate SH triple products of order n have a time complexity of O(n5), which is a heavy burden for most real-time applications. Even worse, a brute-force way to compute k-multiple products would take O(n2k) time. In this paper, we propose a fast and accurate method for spherical harmonics triple products with the time complexity of only O(n3), and further extend it for computing k-multiple products with the time complexity of O(kn3 + k2n2 log(kn)). Our key insight is to conduct the triple and multiple products in the Fourier space, in which the multiplications can be performed much more efficiently. To our knowledge, our method is theoretically the fastest for accurate spherical harmonics triple and multiple products. And in practice, we demonstrate the efficiency of our method in rendering applications including mid-frequency relighting and shadow fields.

Skip Supplemental Material Section

Supplemental Material

References

  1. E Oran Brigham. 1988. The fast Fourier transform and its applications. Prentice-Hall, Inc. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Taco S. Cohen, Mario Geiger, Jonas Köhler, and Max Welling. 2018. Spherical CNNs. In International Conference on Learning Representations.Google ScholarGoogle Scholar
  3. Carlos Esteves, Christine Allen-Blanchette, Ameesh Makadia, and Kostas Daniilidis. 2018. Learning so(3) equivariant representations with spherical cnns. In Proceedings of the European Conference on Computer Vision. 52--68.Google ScholarGoogle ScholarCross RefCross Ref
  4. Xuejun Hao and Amitabh Varshney. 2004. Real-time rendering of translucent meshes. ACM Transactions on Graphics 23, 2 (2004), 120--142. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. DJ Hofsommer and ML Potters. 1960. Table of Fourier coefficients of associated Legendre functions. Proceedings of the Koninklijke Nederlandse Akademie van Wetenschappen: Series A: Mathematical Sciences 63, 5 (1960), 460--480.Google ScholarGoogle Scholar
  6. Teturo Inui, Yukito Tanabe, and Yositaka Onodera. 1999. Group theory and its applications in physics. Vol. 78. Springer Verlag.Google ScholarGoogle Scholar
  7. Jan Kautz, Peter-Pike Sloan, and Jaakko Lehtinen. 2005. Precomputed Radiance Transfer: Theory and Practice. In ACM SIGGRAPH 2005 Courses. 1--es. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Jan Kautz, John Snyder, and Peter-Pike Sloan. 2002. Fast Arbitrary BRDF Shading for Low-Frequency Lighting Using Spherical Harmonics. Rendering Techniques 2, 291-296 (2002), 1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Jaakko Lehtinen. 2007. A framework for precomputed and captured light transport. ACM Transactions on Graphics 26, 4 (2007), 13--es. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Jaakko Lehtinen and Jan Kautz. 2003. Matrix radiance transfer. In Proceedings of the 2003 symposium on Interactive 3D graphics. 59--64. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Christian Lessig, Mathieu Desbrun, and Eugene Fiume. 2014. A constructive theory of sampling for image synthesis using reproducing kernel bases. ACM Transactions on Graphics 33, 4 (2014), 1--14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Xinguo Liu, Peter-Pike J Sloan, Heung-Yeung Shum, and John Snyder. 2004. All-Frequency Precomputed Radiance Transfer for Glossy Objects. Rendering Techniques 2004 (2004). Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik, Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng. 2020. NeRF: Representing scenes as neural radiance fields for view synthesis. In European conference on computer vision. 405--421.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Ren Ng, Ravi Ramamoorthi, and Pat Hanrahan. 2003. All-frequency shadows using non-linear wavelet lighting approximation. In ACM SIGGRAPH 2003 Papers. 376--381. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Ren Ng, Ravi Ramamoorthi, and Pat Hanrahan. 2004. Triple product wavelet integrals for all-frequency relighting. In ACM SIGGRAPH 2004 Papers. 477--487. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Derek Nowrouzezahrai, Patricio D. Simari, and Eugene Fiume. 2012. Sparse zonal harmonic factorization for efficient SH rotation. ACM Transactions on Graphics 31, 3 (2012), 23:1--23:9. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Jacopo Pantaleoni, Luca Fascione, Martin Hill, and Timo Aila. 2010. Pantaray: fast ray-traced occlusion caching of massive scenes. ACM Transactions on Graphics 29, 4 (2010), 1--10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Adrien Poulenard, Marie-Julie Rakotosaona, Yann Ponty, and Maks Ovsjanikov. 2019. Effective rotation-invariant point cnn with spherical harmonics kernels. In 2019 International Conference on 3D Vision. 47--56.Google ScholarGoogle ScholarCross RefCross Ref
  19. Ravi Ramamoorthi. 2009. Precomputation-based rendering. Foundations and Trends in Computer Graphics and Vision 3, 4 (2009), 281--369. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Ravi Ramamoorthi and Pat Hanrahan. 2001. An Efficient Representation for Irradiance Environment Maps. In Proceedings of the 28th Annual Conference on Computer Graphics and Interactive Techniques (SIGGRAPH '01). 497--500. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Zhong Ren, Rui Wang, John Snyder, Kun Zhou, Xinguo Liu, Bo Sun, Peter-Pike Sloan, Hujun Bao, Qunsheng Peng, and Baining Guo. 2006. Real-time soft shadows in dynamic scenes using spherical harmonic exponentiation. In ACM SIGGRAPH 2006 Papers. 977--986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Nathanaël Schaeffer. 2013. Efficient spherical harmonic transforms aimed at pseudospectral numerical simulations. Geochemistry, Geophysics, Geosystems 14, 3 (2013), 751--758.Google ScholarGoogle ScholarCross RefCross Ref
  23. Peter-Pike Sloan. 2008. Stupid spherical harmonics (sh) tricks. In Game developers conference, Vol. 9. 42.Google ScholarGoogle Scholar
  24. Peter-Pike Sloan, Jesse Hall, John Hart, and John Snyder. 2003a. Clustered principal components for precomputed radiance transfer. ACM Transactions on Graphics 22, 3 (2003), 382--391. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Peter-Pike Sloan, Jan Kautz, and John Snyder. 2002. Precomputed radiance transfer for real-time rendering in dynamic, low-frequency lighting environments. In Proceedings of the 29th annual conference on Computer graphics and interactive techniques. 527--536. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Peter-Pike Sloan, Xinguo Liu, Heung-Yeung Shum, and John Snyder. 2003b. Bi-scale radiance transfer. ACM Transactions on Graphics 22, 3 (2003), 370--375. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Peter-Pike Sloan, Ben Luna, and John Snyder. 2005. Local, deformable precomputed radiance transfer. ACM Transactions on Graphics 24, 3 (2005), 1216--1224. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Nico Sneeuw and Richard Bun. 1996. Global spherical harmonic computation by two-dimensional Fourier methods. Journal of Geodesy 70, 4 (1996), 224--232.Google ScholarGoogle ScholarCross RefCross Ref
  29. John Snyder. 2006. Code generation and factoring for fast evaluation of low-order spherical harmonic products and squares. MSR-TR-2006-53 (May 2006), 9.Google ScholarGoogle Scholar
  30. Bo Sun and Ravi Ramamoorthi. 2009. Affine double-and triple-product wavelet integrals for rendering. Transactions on Graphics 28, 2 (2009), 1--17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Weifeng Sun and Amar Mukherjee. 2006. Generalized Wavelet Product Integral for Rendering Dynamic Glossy Objects. In ACM SIGGRAPH 2006 Papers. 955--966. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Justus Thies, Michael Zollhöfer, and Matthias Nießner. 2019. Deferred Neural Rendering: Image Synthesis Using Neural Textures. ACM Transactions on Graphics. 38, 4 (2019), 12 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Karvel K Thornber and David W Jacobs. 2006. Broadened-specular reflection and linear subspaces for object recognition. US Patent 7,058,217.Google ScholarGoogle Scholar
  34. Yu-Ting Tsai and Zen-Chung Shih. 2006. All-frequency precomputed radiance transfer using spherical radial basis functions and clustered tensor approximation. ACM Transactions on Graphics 25, 3 (2006), 967--976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Jingwen Wang and Ravi Ramamoorthi. 2018. Analytic Spherical Harmonic Coefficients for Polygonal Area Lights. ACM Transactions on Graphics 37, 4 (2018). Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Jiaping Wang, Peiran Ren, Minmin Gong, John Snyder, and Baining Guo. 2009. All-frequency rendering of dynamic, spatially-varying reflectance. In ACM SIGGRAPH Asia 2009 papers. 1--10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Jiaping Wang, Kun Xu, Kun Zhou, Stephen Lin, Shimin Hu, and Baining Guo. 2006. Spherical Harmonics Scaling. The Visual Computer 22 (Sept 2006), 713--720. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Lifan Wu, Guangyan Cai, Shuang Zhao, and Ravi Ramamoorthi. 2020. Analytic spherical harmonic gradients for real-time rendering with many polygonal area lights. ACM Transactions on Graphics 39, 4 (2020), 134--1.Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Kun Xu, Yue Gao, Yong Li, Tao Ju, and Shi-Min Hu. 2007. Real-time homogenous translucent material editing. In Computer Graphics Forum, Vol. 26. Wiley Online Library, 545--552.Google ScholarGoogle Scholar
  40. Kun Xu, Li-Qian Ma, Bo Ren, Rui Wang, and Shi-Min Hu. 2011. Interactive hair rendering and appearance editing under environment lighting. ACM Transactions on Graphics 30, 6 (2011), 1--10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Kun Xu, Wei-Lun Sun, Zhao Dong, Dan-Yong Zhao, Run-Dong Wu, and Shi-Min Hu. 2013. Anisotropic Spherical Gaussians. ACM Transactions on Graphics 32, 6 (2013), 209:1--209:11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Tomoya Yamaguchi, Tatsuya Yatagawa, Yusuke Tokuyoshi, and Shigeo Morishima. 2020. Real-time rendering of layered materials with anisotropic normal distributions. Computational Visual Media 6, 1 (2020), 29--36.Google ScholarGoogle ScholarCross RefCross Ref
  43. Ling-Qi Yan, Yahan Zhou, Kun Xu, and Rui Wang. 2012. Accurate Translucent Material Rendering under Spherical Gaussian Lights. Computer Graphics Forum 31, 7 (2012), 2267--2276. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Alex Yu, Ruilong Li, Matthew Tancik, Hao Li, Ren Ng, and Angjoo Kanazawa. 2021. Plenoctrees for real-time rendering of neural radiance fields. arXiv preprint arXiv:2103.14024 (2021).Google ScholarGoogle Scholar
  45. Kun Zhou, Yaohua Hu, Stephen Lin, Baining Guo, and Heung-Yeung Shum. 2005. Precomputed shadow fields for dynamic scenes. In ACM SIGGRAPH 2005 Papers. 1196--1201. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Fast and accurate spherical harmonics products

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM Transactions on Graphics
      ACM Transactions on Graphics  Volume 40, Issue 6
      December 2021
      1351 pages
      ISSN:0730-0301
      EISSN:1557-7368
      DOI:10.1145/3478513
      Issue’s Table of Contents

      Copyright © 2021 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 10 December 2021
      Published in tog Volume 40, Issue 6

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader