This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
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
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

环境

The environment system simulates Scattering by interpolating specific pre-computed Look-UP Textures (LUTs) to achieve physically correct atmosphere rendering and decent ambient lighting.为了实现正确的大气渲染和良好的环境照明,环境系统通过内插特殊的查找纹理(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)。

Environment Settings

Environment Settings环境设置

Three Environment Presets enable you to interpolate between most of the parameters. Presets work as layers: Preset 1 overlays Preset 0, Preset 2 overlays Presets 1 and 0. By configuring the presets, it is possible to create a smooth transition between different weather conditions by tweaking the Intensity scroll bars.共有三个 Environment Presets ,可让您在大多数参数之间进行插值。预设用作图层:第一个预设将覆盖零个,第二个将覆盖第一个和零个。通过配置预设,可以通过调整强度滚动条在不同天气状况之间创建平滑过渡。

UNIGINE Environment Settings

The transition between two Environment presets两个环境预设之间的过渡

Out of the box, the Environment Presets have the following configurations based on physical light scattering models:开箱即用,环境预设有以下配置基于物理光散射模型:

  • Preset 0 — sunny daylight with clear sky.阳光明媚,天空晴朗。
  • Preset 1 — cloudy sky (slight or moderate overcast).Preset 1 -多云天气(轻度或中度阴天)。
  • Preset 2 — night/custom additional preset.Preset 2 - night/自定义附加预设。
Default Preset 0默认的预设0
Default Preset 1默认的预设1
Default Preset 2默认的预设2

Environment lighting consists of the following components:环境照明由以下几部分组成:

  • Ambient Lighting; 环境照明;
  • Environment Reflections;环境反射;
  • Sky.

You can control the intensity of each component by using the Intensity Settings of each preset:你可以通过使用每个预设值的Intensity Settings来控制每个组件的强度:

Direct sunlight + Sky + Ambient lighting + Environment reflections阳光直射 + 天空 + 环境照明 + 环境反射
Direct sunlightDirect sunlight
Direct sunlight + Sky Direct sunlight + Sky
Direct sunlight + Sky + Ambient lighting Direct sunlight + Sky + 环境>
注意
  • Note how Ambient lighting affects the color of shadowed areas, making them more saturated by the sky (e.g., more bluish in the default Preset 0). Refer to the Global Illumination section if you need to simulate realistic light propagation in a virtual environment.请注意环境光如何影响阴影区域的颜色,使它们在天空中更加饱和(例如,在默认的 Preset 0 中更蓝)。 如果您需要在虚拟环境中模拟真实的光传播,请参阅 Global Illumination部分。
  • If you need to change reflections locally, for example, indoors, use an Environment Probe with a unique cube map or consider other types of reflections.如果需要在本地(例如室内)更改反射,请使用具有唯一立方体贴图的Environment Probe或考虑其他类型的 反射

Scattering散射#

Scattering

The atmosphere rendering is based on interpolation between several LUTs (Look-Up Textures) describing different sky states during the day.大气渲染是基于几个LUTs (Look-Up Textures)之间的插值,这些插值描述了白天的不同天空状态。

Scattering LUT settings

Scattering LUT settings分散LUT设置
  • 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 the 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 cube map 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: Scattering option of the World Light provides the following lighting types:

  • None — render the atmosphere as if there were no global lights: there will be no sky color gradient in any direction. None —像没有全局光照一样渲染气氛,也就是说,在任何方向上都没有天空颜色渐变。
  • Sun —根据太阳的光照渲染气氛。
  • Moon —根据月球的照明渲染气氛。

Scattering options of the World Light World Light的散射选项

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 will replace each other with global time. 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.

Day-night cycle using 2 World Lights使用2个世界之光的昼夜循环

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.也可以通过设置为cubemap set as the Environment Texture. It is recommended to use an HDR image for better shading results.

Environment Texture settings环境纹理设置

The Blend Mode parameter is accountable for the blending mode of the Environment texture and the color of Scattering LUTs.Blend Mode参数对Environment纹理的混合模式和Scattering LUTs的颜色负责。

Additionally, a Sky Object is used to recreate the atmosphere in the scene. It can represent a hemisphere or a sphere with a cube map assigned, tiled with clouds texture to produce plausible and inexpensive dynamic clouds.另外,使用Sky Object可以重新创建场景中的气氛。它可以表示分配有立方体贴图的半球或整个球体,并用云纹理平铺以产生合理且廉价的动态云。

Haze阴霾#

The Haze settings stand for atmospheric haze rendering used to add fog effects and define the scene's atmosphere: from an aerial perspective at large distances to height-modulated mist or dense fog nearby.0 _igt设置站大气霾雾呈现用于添加效果和定义场景的氛围:从空中角度远距离height-modulated雾或附近浓雾。

You can choose to render haze based on either a specified solid color or Scattering LUTs. The latter option is recommended as it provides accurate haze color corresponding to the Environment lighting.您可以选择渲染基于指定的实色Scattering LUTs。后一个选项是推荐的,因为它提供了准确的雾霾颜色对应的环境照明。

By choosing the Gradient Mode, you can make the haze look more realistic for a specific distance range. The following modes are available:通过选择 梯度模式,你可以让雾霾在特定的距离范围内看起来更真实。支持以下模式:

  • Sun — render the atmosphere in accordance with the sun's lighting.0 _igt使阴霾更现实寻找短距离范围(例如,近地表霾)。
  • Moon — render the atmosphere in accordance with the moon's lighting.Long Distance Range使雾霾看起来更真实的远程范围(例如,雾霾在山区)。
  • Short Distance Range makes the haze look more realistic for a short distance range (for example, near-surface haze).Physically Based haze rendering mode offers height-dependent density control and the best result for realistic outdoor environments.

The Haze feature samples the colors of the Scattering LUTs; however, the configuration of the default presets is not always suitable for dense fog simulation. If fog covers geometry at a distance and the sun has a relatively low angle to the horizon, there might be Mie sunlight visible in front of geometry. To avoid this and get visually pleasing results, prepare a dimmer Mie LUT texture to make Mie light indistinguishable from the Base sky color: Haze特征对Scattering LUTs的颜色进行了采样;但是,default presets的配置并不总是适合于浓雾模拟。如果雾在一定距离上覆盖了几何图形,而太阳与地平线的角度相对较低,那么在几何图形前面可能会出现米氏阳光。为了避免这种情况,并得到视觉上令人愉快的结果,准备一个较暗的米色LUT纹理,使米色光与天空基准色难以区分:

An example of a custom Mie LUT texture.An example of a custom Mie LUT texture.

See Also也可以看看#

最新更新: 2022-12-14
Build: ()