This page provides a tutorial on V-Ray Spherical Harmonics settings for lighting.

Page Contents




In this tutorial we will show how to use the V-Ray Spherical Harmonics tools for lighting a simple scene.

The first part of this tutorial is related to baking the SH in files, while the second part is dedicated to the interpretation of these files by Spherical Harmonics GI engine. 

For complete information on parameters meanings see Spherical Harmonics Options and Spherical Harmonics GI Engine.

Maya starting scene can be found here. Required version Maya 2009 or higher.




Spherical Harmonics Baking

1. Set V-Ray as the current rendering engine.

2. Model the scene paying additional attention to the fine and uniform subdivision of the geometry.

3. Assign materials.

4. In Render Settings, in Render Settings | V-Ray Common tab tab go to the Baking Engine Settings rollout and set the Baking engine to Spherical harmonics. This will enable Spherical harmonics options button.

5. Click the Spherical harmonics options button to call Spherical Harmonics Baking Engine options window.

Set Options

Next, you will set several options.

  1. Fill in File name or click on Browse button to select location for the output file. (If File name field is empty, default path will be used.)
  2. Set Format to *.vrsh. (*.xml file format is designed to be parsed by foreign applications.)
  3. Set Mode to Interreflection (all). (You could set also Occlusion (all), but Occlusion (selected object)and Interreflection (selected object) cannot be rendered by V-Ray. These modes are designed for foreign applications.)
  4. Set Distribute to per Normal. (If we choose per Vertex the baking engine will calculate only one SH per vertex and this will smooth our sharp edges. per Normal is the predominant setting in the majority of situations.)
  5. Set Ray bias to 0.0001.
  6. Set Bands to 7.
  7. Set Subdivs to 70.
  8. Set Bounces to 2.
  9. Enable Use hit recording.
  10. Render the scene and wait until SH are calculated.

Spherical Harmonics Rendering

  1. In Render Settings, in VRay Common tab go to Image File Output and set Baking engine to None.
  2. In Render Settings, in Indirect Illumination tab check On option, set Primary bounces Engine to Spherical Harmonics and Secondary bounces Engine to None. Spherical Harmonics GI rollout will appear.
  3. Set parameters in Spherical Harmonics GI rollout:
  4. In Basic parameters select the *.vrsh file in File name field. Precalc light per frame parameter has meaning only when rendering animation with changing lighting, so it's value doesn't matter for this tutorial.
  5. In Sample environment check On option and set Subdivs to 8. We'll use just a few samples to sample the environment, because in this example we'll use plain white color for environment. In scenes with complex environment textures we should use far more samples to approximate the lighting.
  6. In VRay tab, in Environment rollout turn on Override Environment and put white color in Background texture.
  7. Turn off Apply filtering for now.
  8. Render.

  9. Now turn off Sample environment and add a Maya Directional Light to the scene.
  10. Render some images with different light positions. The color bleeding and the shadows are computed from the precomputed spherical harmonics without additional calculations.



Intensity = 1.0

Intensity = 2.95


You may notice ringing artifacts in object shadows in the images above. To soften them turn on the Apply filtering option and play with the Filter Strength parameter to balance between ringing and blurring.


Filter Strength = 0.0

Filter Strength = 0.6

Filter Strength = 1.0


11. Combine environment lighting with directional lights and experiment!


  • Keep in mind that SH are interpolated over polygons, so closely placed surfaces, where some vertices of a polygon are well lit and others aren't, could cause artifacts.