General

Settings

Notes

General

In computer graphics Spherical Harmonics (SH) are carriers of lighting potential and they are used to relight objects. This means that SH know the directions along which light could come, but don't know wheather or not it is actually coming. Thus the baking is view independent and light independent. It depends only on object positions and their diffuse colors. Object relighting is done by first pre-calculating certain data in SH file and then interpreting it during rendering. SH are useful in scenes with low frequency (slowly varying in space) lighting, favoring techniques like self occlusion, soft shadows and color bleeding. They are suitable for fly-through animations and animations with changing environment. However they are restricted in dynamic scenes. The moving objects could receive self occlusion and self interreflection, but if they are to receive occlusion and interreflection from other objects, one have to pre-calculate SH for every frame. In V-Ray SH are baked either per vertex or per normal. For round objects per vertex baking is suitable, but for objects with some sharp edges per normal baking is recommended. Per normal is the default distribution and it just needs smoothed normals for the round parts of the object. Another very important issue is that the user should pay additional attention when modeling the geometry. The models should be relatively finely and uniformly subdivided, due to the fact that the only known information is over vertices/normals. A great advantage is that the error of approximation is smooth and results in smooth image in contrast to the majority of the realistic image synthesis algorithms that produce noisy images.

Settings

Basic parameters

 

Sph Harmonics File name - the name of the file in which the spherical harmonics data will be saved.

 

Format - this is the output file format. It could be *.xml for general purposes, V-Ray internal format *.vrsh designed to be used in "Spherical Harmoics" GI engine or both of them.

 

Mode - allows you to select between four different modes of operation.

 

Occlusion (selected object) - spherical harmonics will be exported only for the selected object. When exporting the spherical harmonics V-Ray will only consider direct light.

 

Occlusion(all) - spherical harmonics will be calculated for the whole scene. When exporting the spherical harmonics V-Ray will only consider direct light.

 

Interreflection(selected object) - spherical harmonics will be exported only for the selected object. In this mode V-Ray will also consider secondary bounces of light. It is similar to GI in terms that objects are illuminated by light that is being reflected from other objects.

 

Interreflection(all) - spherical harmonics will be exported for the whole scene. In this mode V-Ray will also consider secondary bounces of light. It is similar to GI in terms that objects are illuminated by light that is being reflected from other objects.

 

Transform - this option allows you to choose wether the spherical harmonics will be exported in World Space or in Object Space. It usually a good idea to export static geometry in World Space, and moving geometry in Object Space.

 

Distribute - spherical harmonics can be created either for each vertex of the geometry or for each normal, this option allows you to choose between those two modes. For round objects it is better to use per Vertex mode while for objects with large flat surfaces the per Normal mode is better and faster.

 

Ray bias - a small positive offset that will be applied when generating the spherical harmonics. This is needed to avoid some undesirable results when calculating the spherical harmonics in corners for example.

 

Bands - this option controls the accuarcy of the spherical harmonics. Larger values make the result closer to the actuall lighting but increases the render times. Smaller values are generated faster but less accurate. Usually values from 3-4 to 8-9 are used.

 

Subdivs - controls the number of samples taken in order to create the spherical harmonics. Higher values produce better results but take longer to render.

 

Interreflection parameters

 

Bounces - this option is only available when one of the interreflection methods is selected. It controls the number of secondary bounces that are going to be traced.

 

Use hit recording - this option is only available when one of the interreflection methods is selected. Enabling it speeds up the calculations by storing a lot of information in the RAM.

 

Memory limit(MBs) - the maximum amount of memory that hit records can use.

 

Adaptive subdivision parameters

 

On - turns on the adaptive subdivision. The engine finds those polygons on the geometry that need more samples, subdivides them and evaluates SH for the newly added normals.

 

Threshold - the engine choose the polygons, over which difference between SH exceed this theshold value, to be subdivided.

 

Depth - the number of subsequent subdivisions. During each subdivision geometry is tessellated into triangles and each one of them is divided either into 4 or into 2 subtriangles.

 

Edge length - the minimum edge length after all subdivisions. This is another stopping criterion.

 

Save in Wavefront .OBJ - check this option if you want to write the resulting subdivided geometry in .obj file. The file name comes from File name parameter. You would like to do that either if you want to observe the result or if you want to use SH in external applications. This file isn't needed for rendering in V-Ray. Everything is kept in the .vrsh file.

 

Notes