环境
In order to achieve physically correct atmosphere rendering and decent ambient lighting, the environment system simulates Scattering by interpolating special pre-computed Look-UP Textures (LUTs).为了实现正确的大气渲染和良好的环境照明,环境系统通过内插特殊的查找纹理(LUT)来模拟 散射 。
The Environment Settings are available in the Render Settings (choose Window -> Settings in the main menu, then, in the Settings window, go to Runtime -> World -> Render -> Environment). 环境设置 在“渲染设置”中可用(在主菜单中选择Window -> Settings,然后在Settings窗口中转到Runtime -> World -> Render -> Environment)。
There are three Environment Presets enabling you to interpolate between the most of the parameters. Presets work as layers: the first preset will overlay the zero one, the second will overlay the first and the zero ones. By configuring the presets it is possible to create a smooth transition between different weather conditions by tweaking the Intensity scroll bars.共有三个 Environment Presets ,可让您在大多数参数之间进行插值。预设用作图层:第一个预设将覆盖零个,第二个将覆盖第一个和零个。通过配置预设,可以通过调整强度滚动条在不同天气状况之间创建平滑过渡。
Scattering散射#
The atmosphere rendering is based on interpolation between several LUTs (Look-Up Textures) describing different states of the sky during the day.大气渲染是基于几个LUTs (Look-Up Textures)之间的插值,这些插值描述了白天的不同天空状态。
- The Base LUT texture defines the base color of the sky given the current position of the light source. Base LUT纹理定义给定光源当前位置的天空的基色。
- The Mie LUT texture defines the Mie light (the color of the light around the Sun and the Moon). Mie LUT纹理定义了Mie光(太阳和月球周围的光的颜色)。
- The Light Color texture defines the color of the World Light for different times of day. Light Color纹理定义了一天中不同时间的World Light的颜色。
Base LUT Texture |
Mie LUT Texture |
Light Color LUT Texture |
The scattering simulation is affected by the current enabled World Light Source that automatically generates the dynamic environment cubemap providing lighting and reflections for all objects in the scene.散射模拟受当前启用的World Light Source影响,该参数会自动生成动态环境立方体贴图,为场景中的所有对象提供照明和反射。
The Scattering option of the World Light provides the following lighting types: World Light的Scattering选项提供以下照明类型:
- None — render the atmosphere as if there were no global lights, that is, there will be no sky color gradient in any direction. None —像没有全局光照一样渲染气氛,也就是说,在任何方向上都没有天空颜色渐变。
- Sun — render the atmosphere in accordance with the Sun's lighting. Sun —根据太阳的光照渲染气氛。
- Moon — render the atmosphere in accordance with the Moon's lighting. Moon —根据月球的照明渲染气氛。
The Disable Angle setting for the World Light defines a critical angle above the horizon, where the light source is still enabled. Thus, an appropriate day-night cycle is easy to implement: you can create two World Lights representing the Sun and the Moon, which are to replace each other along with the global time. World Light的Disable Angle设置定义了地平线上方的临界角,仍在该角度启用光源。 因此,很容易实现适当的昼夜循环:您可以创建两个代表太阳和月亮的世界之光,它们将随着全球时间相互替换。
The Environment Settings also include settings for Ambient lighting intensity, Haze, Celestial Bodies and more. 环境设置还包括环境光照强度,雾度,天体等设置。
Image-Based Lighting基于图像的照明#
Ambient lighting and reflections can also be defined by a cube map set as the Environment Texture. You can download suitable images from such websites as polyhaven.com. We recommend using an HDR or uncompressed EXR image for better shading results. Note that lossy compression types B44, B44A, PIX24, which the EXR format may use, are not supported. 环境照明和反射也可以通过设置为Environment Texture的立方体贴图进行定义。你可以从 polyhaven.com 等网站下载合适的图片。我们建议使用 HDR 或未压缩的 EXR 图像,以获得更好的阴影效果。请注意,EXR格式可能使用的有损压缩类型B44, B44A, PIX24 是 不支持的。
Additionally, a Sky Object is used to recreate the atmosphere in the scene. It can represent a hemisphere or a full sphere with a cubemap assigned, tiled with clouds texture to produce plausible and inexpensive dynamic clouds.另外,使用Sky Object可以重新创建场景中的气氛。它可以表示分配有立方体贴图的半球或整个球体,并用云纹理平铺以产生合理且廉价的动态云。
See Also也可以看看#
- Controlling environment presets by using the RenderEnvironmentPreset Class.使用 RenderEnvironmentPreset 类控制环境预设。
- The Environment content sample.Video Tutorial: How To Customize Environment Lighting. Environment内容示例。