Setting Up Materials
Setting Up Properties
Landscape Tool
Sandworm (Experimental)
Extending Editor Functionality
Usage Examples
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes


This section covers types of dynamic light sources and lights-related concepts.本节介绍动态光源的类型和与照明有关的概念。

Light Sources光源#

To create a light source, open the Menu bar and click Create -> Lights.要创建光源,请打开菜单栏,然后​​单击Create -> Lights

Light sources provide direct real-time lighting which is used for shading on the Deferred and Forward passes of the Rendering Sequence.光源提供直接的实时照明,用于在 Deferred Forward 渲染序列的顺序。

The light's Mode defines the impact of the light source on the light baking process and affects rendering of shadows from it:灯光的 模式 定义光源对灯光烘焙过程的影响,并影响光源的阴影渲染:

  • Dynamic light sources provide direct real-time lighting only and are turned off while light baking is being calculated. Such light sources provide dynamic shadows only. 动态光源仅提供直接的实时照明,并且在计算光烘焙时将其关闭。此类光源仅提供动态阴影。
  • Static lights sources contribute to baking of indirect lighting and remain enabled all the time providing direct real-time lighting. When baked, such light sources are not to be moved; otherwise, this option can cause lack of physical accuracy registered by the eye. Static light sources are able to provide both cached and mixed shadows. 静态光源有助于间接照明的烘焙,并始终保持启用状态,以提供直接的实时照明。烘烤时,请勿移动此类光源。否则,此选项可能会导致眼睛看不到实际的准确性。静态光源能够提供缓存的阴影和混合的阴影。

World LightWorld Light#

The World Light is an infinitely remote light source casting orthographically projected beams onto the scene. The shadows cast by this light are parallel, which provides a realistic simulation of the light of celestial bodies, such as the Sun and the Moon. World Light是一种无限遥远的光源,可以将正交投影的光束投射到场景上。这种光投射的阴影是平行的,可以对太阳和月亮等天体的光进行逼真的模拟。

The World Light takes part in the Scattering simulation. World Light参与了 Scattering 模拟。

Omni LightOmni Light#

The Omni Light is a point source emitting light in all directions and realistically reproducing shadow cast. This type of light serves to simulate light sources with bright center and equal roll-off of intensity. Omni Light proves useful for general lighting purposes in indoor scenes because of its nondirectional qualities. Omni Light是一种点光源,它可以向各个方向发光,并可以真实地再现阴影投射。这种类型的光用于模拟中心明亮且强度均匀下降的光源。 Omni Light具有非定向性,因此被证明可用于室内场景中的常规照明。

Projected LightProjected Light#

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光源从单个点投射光线,从而形成聚焦在特定方向的聚焦光束。这种类型的光以金字塔的形式可视化。由于其形式,它是通用的,可以方便地用于模拟多种发光源:例如汽车前灯,闪光灯或路灯。

Area LightsArea Lights#

By default, light sources are represented by a point that emits lighting. Both Omni and Projected light sources have the Shape settings intended to define the shape of an area light source. Area light sources provide wider light spots and correct specular highlights on geometry.默认情况下,光源由发光的点表示。 Omni Projected 光源均具有 Shape设置 ,用于定义面光源的形状。面光源可提供更宽的光斑并在几何体上提供正确的镜面反射高光。

The following shapes are available:可以使用以下形状:

  • Sphere Sphere
  • Capsule Capsule
  • Rectangle Rectangle
Soft shadows from area lights are simulated by using the Penumbra settings.使用 Penumbra 设置模拟区域灯光的柔和阴影。

Lighting Transparent Objects照明透明物体#

Non-opaque geometry is shaded on the Forward pass of the Rendering Sequence. Since all light sources are applied to each transparent surface in a cycle, it is highly recommended to keep the number of lights affecting transparent objects as low as possible for optimal performance. 非不透明几何图形在“渲染序列”的 Forward 阶段被着色。由于所有光源都以循环的方式应用于每个透明表面,因此强烈建议将影响透明物体的光的数量保持在尽可能低的水平,以实现最佳性能。

Global Lights Settings include Forward Per-Object Limits where you can limit the number of certain light sources that affect each transparent object at a time.全局光源设置包括 转发每个对象限制 ,您可以在其中限制一次影响每个透明对象的某些光源的数量。

Emissive Objects发射物体#

The mesh_base and decal_base materials has support for the Emission feature, so any geometry can be made a bright surface. However, it will not illuminate the environment, only glow is rendered by default. Lighting from an emissive object can be baked into GI and computed in real time by using Screen-Space GI. mesh_base材质支持 Emission 功能,因此可以将任何几何形状制成明亮的表面。但是,它不会照亮环境,默认情况下仅渲染光晕。可以使用 Screen-Space GI 将来自发光物体的照明烘焙到GI中并进行实时计算。


Scissor TestScissor Test#

All Omni and Projected light sources are subject to a common deferred optimization technique - the Scissor Test: for each light source a scissor rectangle is found to define its bounds and, therefore, the area of its influence. The scissor rectangle defines the render target for the current light source, since everything that falls outside the region is not affected by the light at the current moment.所有 Omni Projected 光源均受通用延迟优化技术的限制-Scissor Test:对于每个光源,均会发现一个剪刀矩形以定义其边界,并且因此,其影响范围。剪刀矩形定义了当前光源的渲染目标,因为落在该区域之外的所有物体都不会受到当前光线的影响。

Enable the Scissors visual helper or use the render_show_scissors 1 console command to enable visualization of the Scissor Test.启用 Scissors 视觉助手,或使用render_show_scissors 1控制台命令启用Scissor Test的可视化。

Scissor rectangles for omni light sources.剪刀矩形用于全向光源。

Omni light sources with Point shape and shadows disabled are additionally batched in groups defined by the Batching options:禁用了点形状和阴影的Omni光源还按 Batching 选项定义的组进行了批处理:

This optimization enables you to engage huge numbers of omni lights with no significant performance drop.此优化使您可以使用大量的全向灯光,而性能不会明显下降。

Batching of 1024 omni lights.批处理1024个全向灯。

Interleaved Lights Rendering交错光渲染#

In this mode lighting is rendered during the Deferred pass in half resolution (1/4 of all pixels) with subsequent reconstruction of neighboring pixels using the data from previous frames, making it possible to reduce rendering load.在此模式下,在“递延”过程中以一半的分辨率(所有像素的1/4)渲染照明,并随后使用来自先前帧的数据重建相邻像素,从而可以减少渲染负载。

Interleaved Ligts Rendering settings.交错的Ligts渲染设置。

For more details refer to the Interleaved Lights Rendering article.有关更多详细信息,请参见 交错的灯光渲染 文章。

See Also也可以看看#

最新更新: 2020-11-11