光源
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
照明透明物体#
非不透明几何图形在“渲染序列”的 Forward 阶段被着色。由于所有光源都以循环的方式应用于每个透明表面,因此强烈建议将影响透明物体的光的数量保持在尽可能低的水平,以实现最佳性能。
全局光源设置包括 转发每个对象限制 ,您可以在其中限制一次影响每个透明对象的某些光源的数量。
Emissive Objects发射物体#
The mesh_base, decal_base and particles_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 Test#
所有 Omni 和 Projected 光源均受通用延迟优化技术的限制-Scissor Test:对于每个光源,均会发现一个剪刀矩形以定义其边界,并且因此,其影响范围。剪刀矩形定义了当前光源的渲染目标,因为落在该区域之外的所有物体都不会受到当前光线的影响。
启用 Scissors 视觉助手,或使用render_show_scissors 1控制台命令启用Scissor Test的可视化。
禁用了点形状和阴影的Omni光源还按 Batching 选项定义的组进行了批处理:
此优化使您可以使用大量的全向灯光,而性能不会明显下降。
交错光渲染#
在此模式下,在“递延”过程中以一半的分辨率(所有像素的1/4)渲染照明,并随后使用来自先前帧的数据重建相邻像素,从而可以减少渲染负载。
有关更多详细信息,请参见 交错的灯光渲染 文章。
See Also也可以看看#
- The Light Sources section.光源部分。
- The Lights Optimization article. 灯光优化文章。
- Video Tutorial: Lighting. 视频教程:照明.