UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials

Probe Light Source

The lightmap can only cope with the task of illuminating static objects. Probe light source expands the application field of precomputed lighting: this approach allows to bring the ultra-realistic touch by handling scene with dynamic objects without any detrimental effects on frame rates.

Spherical Harmonics

Probe light represents the incident illumination on the basis of spherical harmonics. Despite the fact, that lighting in scenes is usually a complex phenomenon, composed of variety of independent sources as well as large and consistently lit areas like skylight or ceiling lamps, the general lighting distribution is well approximated by only 9 spherical harmonics parameters. Conceptually speaking, the final image is rendered using a sum of spherical harmonic basis functions, scaled by the lighting coefficients. This function, controlling the irradiance from the source in 3D environment, use the surface normal and are defined over the whole object, making it possible to generate an image of light distribution regardless of particular orientation of its surfaces and from any viewpoint. The lighting coefficients can also be tweaked programmatically, if the direct control of the appearance is necessary. After calculating this coefficients for the specific environment (which is done automatically by grabbing), the probe light can successfully illuminate the dynamic objects imitating diffuse reflections from the surrounding surfaces. Using spherical harmonics functions guarantees that when animating the scenes, moving the lights or rotating models, the intensity of lighting will not fluctuate, crawl, pulse or have any other objectionable artifacts.

For more detailed information see the following papers: "An Efficient Representation for Irradiance Environment Maps" and "Spherical Harmonic Lighting".

Features

For more exact approximation of the prolonged space, such as long corridors and elongated halls, probe light source can be set to have an ellipsoid shape by defining the radius values along tree axes. Thanks to this feature, the spatial impression of the scene will be much more efficient.

Usage

It should be marked out, that to render all the probe light sources illuminating some given object, only a single pass is required. As probe lights are effectively generated at low computational cost, it is efficient to add them in great numbers and arrange in the way simulating the global illumination in real time. The plausible effect is achieved due to applying linear interpolation between the sources.

The grabbing presets, on the base of which a probe light bakes the necessary spherical harmonics coefficients, can be saved and loaded from .dds file, providing a handy tool for relighting a scene in one mouse click.

See also

Last update: 2017-07-03