This page has been translated automatically.
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
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Projected Light Source

The projected light source casts light from a single point forming a focused beam aimed in a specific direction. This type of light is visualized in a form of a pyramid. Due to its form, it is versatile and can be conveniently used to simulate the numerous light emitting sources: for example, car headlights, flash light, or street lamps

Projected light sources can produce shadows of accurate perspective projection. They require only a single rendering pass and are performance-cheap if compared to the two previous light source types.

Screenshot of a scene with a directional light

Features

The projected light source has the following specific features:

Field of view

The projected beam can acquire a view-dependent quality to emphasize by means of light the precisely limited area in the scene. The field of view parameter defines the angle of the light clipping in range from 1 (only a very narrow segment is illuminated) to 90 degrees (the whole hemisphere is lit).

Near Clipping Plane

Another tweaking option can do the trick of truncating the light pyramid to necessary extend that aims for the more controllable irradiance distribution. Near clipping plane adjusts the distance relative pyramid vertex for cutting off the top surface.

  • If zero value is set, the projected source does not form a light pyramid.
  • The default 0.1 fits to represent a very small snip emitting the light.

Texture Modulation

In addition to immediate illumination purposes, the considered source offers an optional useful technique for dynamic lighting. It allows to project an arbitrary 2D texture (gray scale or color) onto the scene. All the surfaces receiving the formed light pattern are redrawn in additional rendering pass, required because of manipulations with texture matrix. Textured illumination helps to add subtle variations to the plain lighting or model various creative effects enriching the virtual context.

Screenshot of a scene with a directional light with 2D texture modulation

See also

Last update: 2017-07-03
Build: ()