
定向光源 将模拟从无限远的源头处发出的光线。这意味着此光源投射出的阴影均为平行,因此适用于模拟太阳光。定向光源放置后,可对其 移动性 进行如下设置:
- 静态——(左图)即无法在游戏中改变光源。这是速度最快的渲染方法,可用于已烘焙的光照。
- 静止——(同见左图)即光源通过 Lightmass 只烘焙静态几何体的投影和反射光照。其他则为动态光源。此设置还允许光源在游戏中改变颜色和强度,但其并不会移动,且允许部分烘焙光照。
- 可移动——(左图)即为完全动态光源,可进行动态投影。这是最慢的渲染方法,但在游戏过程中拥有最高灵活性。
下图展示了从开放屋顶照射进来的日光。


左图只显示了光照,右图则启用了 阴影视锥,展现定向光源发出的平行光线。
光照方向(左图所示)以箭头指出了光线传播的方向,以便使用者根据需要来放置光源的方向。
定向光源属性
定向光源的属性分为以下5类:光源、光束、Lightmass、光照函数和级联阴影贴图。
光源
属性 | 描述 |
Source Angle | Angle subtended by a light source in degrees. Defaults to 0.5357, which is the angle for our sun. |
Source Soft Angle | Angle subtended by a soft light source in degrees. |
Use Temperature | When disabled, uses white as an illuminant. |
Temperature | Color temperature in Kelvin of the blackbody illuminant. White is 6500K. |
影响场景(Affects World) | 完全禁用光源。无法在运行时设置。如要在运行时禁用光源的效果,须修改其 可视性 属性。 |
投射阴影(Casts Shadows) | 光源是否投射阴影。 |
间接光照强度(Indirect Lighting Intensity) | 缩放光源发出的间接光照贡献。 |
Volumetric Scattering Intensity | Intensity of the volumetric scattering from this light. |
Intensity | Total energy that the light emits. |
Light Color | The color that the light emits. |
Shadow Cascade Bias Distribution | Controls the depth bias across cascades. Use this to mitigate the shadow acne difference on shadow cascades transition. |
Cast Modulated Shadows | Whether to cast modulated shadows from dynamic objects (mobile only). |
Modulated Shadow Color | Color to modulate against the scene color when rendering modulated shadows (mobile only). |
Shadow Amount | The amount of shadow occlusion. A value of 0 means no occlusion and no shadow. |
Specular Scale | The multiplier on specular highlights. Use with care. Any values besides 1 are not physical. |
Shadow Resolution Scale | Scales the resolution of shadow maps used to shadow this light. |
Shadow Bias | Controls how accurate the shadows from this light are. |
Shadow Slope Bias | Controls how accurate the self-shadowing of whole scene shadows from this light is. This contributes to Shadow Bias by increasing the amount of bias depending on the slope of a surface. |
Shadow Filter Sharpen | How much to sharpen shadow filtering for this light. |
Contact Shadow Length | Length of screen space ray trace for sharp contact shadows. |
Contact Shadow Length in World Space Units | Whether to use world space units for the Contact Shadow Length. |
Cast Translucent Shadows | Whether this light is allowed to cast dynamic shadows through translucent objects. |
Cast Shadows from Cinematic Objects Only | Whether the light should only cast shadows from components marked as bCastCinematicShadows. This is useful for setting up cinematic Movable spotlights aimed at characters and avoiding the shadow depth costs of the background. This option only works with dynamic shadow maps, not with static shadowing or Ray Traced Distance Field shadows. |
Dynamic Indirect Lighting | Whether the light should be injected into the Light Propagation Volume. |
Force Cached Shadows for Movable Primitives | Enables cached shadows for movable primitives. |
Lighting Channels | Channels that this light should affect. |
Cast Static Shadows | Whether this light casts static shadows. |
Cast Dynamic Shadows | Whether this light casts dynamic shadows. |
Affect Translucent Lighting | Whether the light affects translucency or not. |
Transmission | Whether to transmit through surfaces with subsurface scattering profiles. |
Cast Volumetric Shadow | Whether to shadow volumetric fog. |
Cast Deep Shadow | Whether to cast high-quality hair strands self-shadowing. |
Cast Ray Traced Shadows | Sets whether ray-traced shadows are enabled for this light. The options are:
|
Affect Ray Tracing Reflections | Whether to affect objects in reflections when ray-traced reflection is enabled. |
Affect Ray Tracing Global Illumination | Whether to affect global illumination when ray-traced global illumination is enabled. |
Deep Shadow Layer Distribution | Changes the deep shadow layers distribution. A value of 0 is linear distribution (uniform layer distribution), and 1 is exponential. |
光束
属性 | 描述 |
光束遮挡(Light Shaft Occlusion) | 确定此光源是否会对雾气和大气之间的散射形成屏幕空间模糊遮挡。 |
遮挡遮罩暗度(Occlusion Mask Darkness) | 控制遮挡遮罩的暗度,值为1则无暗度。 |
遮挡深度范围(Occlusion Depth Range) | 和相机之间的距离小于此距离的物体均会对光束构成遮挡。 |
光束泛光(Light Shaft Bloom) | 确定是否渲染此光源的光束泛光。 |
泛光缩放(Bloom Scale) | 缩放叠加的泛光颜色。 |
泛光阈值(Bloom Threshold) | 场景颜色必须大于此阈值,方可在光束中形成泛光。 |
Bloom Max Brightness | When exposure is applied, this value constrains scene color brightness. |
泛光着色(Bloom Tint) | 对光束发出的泛光效果进行着色时所使用的颜色。 |
光束覆盖方向(Light Shaft Override Direction) | 可使光束从另一处发出,而非从该光源的实际方向发出。 |
Lightmass
属性 | 描述 |
光源角度(Light Source Angle) | 定向光源的自发光表面相对于接收物而延展的角度,影响半影尺寸。 |
间接光照饱和度(Indirect Lighting Saturation) | 数值为0时将完全去除此光照在Lightmass中的饱和度,为1时则保持不变。 |
阴影指数(Shadow Exponent) | 控制阴影半影的衰减。 |
Use Area Shadows for Stationary Light | Whether to use area shadows for stationary light precomputed shadow maps. |
光照函数
属性 | 描述 |
光照函数材质(Light Function Material) | 应用到该光源的光照函数材质。 |
光照函数缩放(Light Function Scale) | 缩放光照函数投射。 |
光照函数淡化距离(Light Function Fade Distance) | 在此距离中,光照函数将完全淡化为 已禁用亮度(Disabled Brightness) 中的值。 |
已禁用亮度(Disabled Brightness) | 光照函数已指定但被禁用时应用到光源的亮度因子,以之前的属性为例:光照函数淡化距离(Light Function Fade Distance)。 |
级联阴影贴图
属性 | 描述 |
Num Dynamic Shadow Cascades | Number of cascades to split the view frustum into for the whole scene. |
Distribution Exponent | Controls whether the cascades are distributed closer to the camera (larger exponent) or further from the camera (smaller exponent). |
Transition Fraction | Proportion of the fade region between cascades. |
Distance Fadeout Fraction | Controls the size of the fade out region at the far extent of the dynamic shadow's influence. |
Dynamic Shadow Distance MovableLight | How far Cascaded Shadow Map dynamic shadows will cover for a movable light, measured from the camera. |
Dynamic Shadow Distance StationaryLight | How far Cascaded Shadow Map dynamic shadows will cover for a stationary light, measured from the camera. |
Inset Shadows for Movable Objects | (Stationary lights only) Whether to use per-object inset shadows for movable components, even though cascaded shadow maps are enabled. |
Far Shadow Cascade Count | A value of 0 means no Distant Shadow Cascades. |
Far Shadow Distance | Distance at which the far shadow cascade should end. |
大气和云层
更多信息和演示可参阅定向光源交互和阴影中的体积云部分。
属性 | 描述 |
---|---|
大气和云层 | |
大气日光(Atmosphere Sun Light) | 定向光源是否能够与大气及云层相互作用并生成视觉上的日轮——这些共同组成了视觉上的天空。 |
在云层上投射阴影(Cast Shadows on Clouds) | 光源是否应该将不透明对象的阴影投射在云层上。如果场景中存在第二个定向光源(比如太阳或月亮),并且启用了 大气日光(Atmosphere Sun Light) 以及将 大气日常索引(Atmosphere Sun Light Index) 设置为 1,则该选项会被禁用。 |
在大气上投射阴影(Cast Shadows on Atmosphere) | 使用SkyAtmosphere时,光源是否应该将不透明网格体的阴影投射到大气中。 |
投射云层阴影(Cast Cloud Shadows) | 是否应该将云层的阴影投射到大气和其他场景元素上。 |
云层散射亮度比例(Cloud Scattering Luminance Scale | 调整光线散射在云测参与介质(cloud participating media)中的光线贡献。有助于修正我们当前多重散射方案只是一种近似效果的问题。 |
高级属性 | |
大气日光索引(Atmosphere Sun Light Index) | 引擎支持在任何时候显示两个大气光源来表示太阳和月亮,或者是两个太阳。使用此索引来设置主光源和副光源。例如,太阳是0,月亮是1。 |
大气日轮色标(Atmosphere Sun Disk Color Scale) | 日轮亮度相乘的色标(color scale)。 |
逐像素大气透射(Per Pixel Atmosphere Transmittance) | 是否在不透明网格体上应用逐像素大气透射,而非使用全局透射。 |
云层阴影强度(Cloud Shadow Strength) | 阴影的强度。数值越高,光线阻挡越多。 |
云层在大气上的阴影强度(Cloud Shadow on Atmosphere Strength) | 大气上阴影的强度。设置为0时,会禁用大气上的阴影。 |
云层在表面上的阴影强度(Cloud Shadow on Surface Strength) | 阴影在不透明和半透明表面上的强度。设置为0时,会禁用阴影在不透明和半透明表面上的强度。 |
云层阴影深度偏移(Cloud Shadow Depth Bias) | 控制应用于体积云阴影贴图的前阴影深度的偏差。 |
云层阴影范围(Cloud Shadow Extent) | 摄像机周围云层阴影贴图的世界空间半径。单位为千米(km)。 |
云层阴影贴图分辨率比例(Cloud Shadow Map Resolution Scale) | 调整云层阴影贴图的分辨率。该分辨率受 r.VolumetricCloud.ShadowMap.MaxResolution 的限制。 |
云层阴影射线采样计数比例(Cloud Shadow Ray Sample Count Scale) | 调整用于阴影贴图追踪的采样数量。该参数受到 r.VolumetricCloud.ShadowMap.RaySampleMaxCount 的限制。 |