This page has been translated automatically.
Getting Started
Migrating to UNIGINE 2.0
C++ API Migration
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

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: ()