Spherical Harmonics Tricks News

Spherical Harmonics Tricks

Priceless tool for production rendering.

Spherical Harmonics is a priceless tool for production rendering: It uses periodic functions on the surface of a sphere to isolate or accumulate influence from a certain direction.

In U-Render we use it to get diffuse ambient illumination based on HDR environment maps in real-time.

In this article we’ll avoid being too technical. Our aim is simply to give you an overview about this mathematical concept and its extremely useful applications. Ready? Let’s go!

What are Spherical Harmonics?

Spherical Harmonics (SH) were introduced by Pierre Simon de Laplace in 1782, to calculate gravity influence. They basically are a data representation.

You can use them to solve issues in different areas: from problems in gravitational, electric fields and in heat equations to quantum chemistry and physics to model the electron configuration in atoms.

Because of their potential to encode any information signal over a sphere, they are perfect for Computer Graphics (CG). Now, the whole story becomes more interesting for you. Do you know how to use SH in CG?


  • image relighting,
  • image based rendering with controllable lighting,
  • HDR environment maps,
  • volumetric scattering effects,
  • atmospheric scattering and other more.

In particular, SH lighting is a way to calculate the illumination on 3D models from Image Based Lighting (IBL) sources in order to enable you to catch, relight and display Global Illumination (GI) style images in real-time. Comparing it with Ray-tracing using GI, the computational effort is relatively lower. This is why, Spherical Harmonics are also a fast alternative for diffuse illumination. Since Spherical Harmonics create diffuse ambient light by making the entire image brighter, you need to set Ambient Occlusion (AO) to darken certain areas. SH and AO are both two similar mathematical demonstrations. Using them together permits you to reach a more balanced result. See picture below.

Spherical Harmonics Tricks News

Another way of thinking to Spherical Harmonics is seeing them as a method to encode an image over a sphere (that can represent incoming light, occlusion, or other types of data), in terms of their frequency representation. Hypothetically, you can represent any kind of resolution with infinite bands. However, only the first few bands are usually employed.

Find out the benefits of Spherical Harmonics!

Using SH has some great advantages:

  • the rotation is continuous and regular because they are camera view independent,
  • no stitching lines,
  • they couldn’t be squeezed or snapped,
  • they’re easy for vector units to control.
Spherical Harmonics Tricks News

In real-time rendering, they compute all the incoming light by adding the light sources and then multiplying it by the surface functions. The color of the object also clearly influence the diffuse light.

Last but not least, the combination of SH and AO enables you to have stunning results in photorealism.

If you want to know more about this topic, we suggest an interesting paper made by the University of California, in San Diego: “Analytic Spherical Harmonic Gradients for Real-Time Rendering with Many Polygonal Area Lights”, ACM Trans. Graph., Vol. 39, No. 4, Article 1, July 2020.

Now it’s your turn! Download sample HDR images. With accurate reflections and image based lighting, you’ll create amazing and realistic scenes.

Try U-RENDER for Free

Sign up for a free trial license to fully unlock U-Render and test it in your own production environment.


Deliver stunning results in final frame quality within the blink of an eye!