This page has been translated automatically.
Setting Up Materials
Setting Up Properties
Landscape Tool
Extending Editor Functionality
World Nodes
Sound Objects
Pathfinding Objects
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
Content Optimization
Material Nodes Library
Art Samples

Environment Probe

Environment Probe is a light source which also provides reflections on an object inside the probe by using a cubemap (pre-baked or dynamically changing each frame). In UNIGINE, Environment Probe has two types of projections:Environment Probe是一种光源,它也可以通过使用立方体贴图(预烘焙或动态更改每帧)在探针内部的对象上提供反射。在UNIGINE中,Environment Probe具有两种类型的投影:

  • Box projection — works better for indoor scenes (when the room has a 3D box shape) or box-shaped outdoor scenes (back alley between buildings).盒子投影-适用于室内场景(房间为3D盒子形状)或盒子形状的户外场景(建筑物之间的后巷)。
  • Spherical projection — works better for all other cases (reflections on car, spherical room, etc.).球形投影-在所有其他情况下(汽车,球形房间等的反射)效果更好。

With Environment Probe you can create reflections instead of creating reflection materials.使用Environment Probe,您可以创建反射而不是创建反射材料。

By default Environment Probe is used for reflections only; as for lighting, it is recommended to simulate it using Voxel Probe and Lightmaps. This approach ensures the best result, however you can still use Environment Probe for ambient lighting.默认情况下,Environment Probe仅用于反射。至于照明,建议使用Voxel Probe光照贴图。这种方法可确保获得最佳结果,但是您仍然可以使用Environment Probe进行环境照明

See Also也可以看看#


Environment Probe is a great thing to increase performance, decrease the number of materials and make the life of content designers easier.Environment Probe对于提高性能,减少材料数量以及使内容设计者的生活更加轻松是一件好事。

Environment Probe uses cubemaps that were baked (or grabbed with a special tool). The cubemap will play the role of the reflection and the light simulation. Here is an example:Environment Probe使用烘焙(或用特殊工具抓取)的立方体贴图。立方体贴图将扮演反射和灯光模拟的角色。这是一个例子:

We have two houses with different color of the interior and put same objects (with reflection material, for example, metal) into these houses. What will happen?我们有两间内部颜色不同的房屋,并将相同的物体(例如反射材料,例如金属)放入这些房屋中。会发生什么?

If we don't speak about the dynamic reflections, you'll need to reflect the interior on each object. But interiors have different ambient color, and that is why you'll need to create 2 different materials for them. Not optimized at all.如果我们不谈论动态反射,则需要反射每个对象的内部。但是内部具有不同的环境颜色,这就是为什么您需要为它们创建2种不同的材料的原因。根本没有优化。

Environment Probe removes this flaw. Once you added an object, you don't think about the reflection material for it. Environment Probe will map the cubemap to the object.Environment Probe消除了此缺陷。添加对象后,便无需考虑其反射材料。 Environment Probe将立方体贴图映射到对象。

There is a difference in mapping cubemaps to transparent and non-transparent objects:将立方体贴图映射到透明和非透明对象有一个区别:

  • If an object is transparent, Environment Probe will map the cubemap only if the entire object is inside the radius of Environment Probe. Otherwise, the object won't be affected by Environment Probe at all.如果对象是透明的,则仅当整个对象在Environment Probe的半径内时,Environment Probe才会映射立方体贴图。否则,该对象将完全不受Environment Probe的影响。
  • If an object is non-transparent, Environment Probe will map the cubemap to any part of the object which is inside the radius of the probe.如果对象是非透明的,则Environment Probe会将立方体贴图映射到对象半径在探针半径内的任何部分。
Transparent object affected by Environment Probe透明对象受Environment Probe影响
Non-transparent object affected by Environment ProbeEnvironment Probe影响的非透明对象

If you put several Environment Probe nodes that affect a non-transparent object (rendered in the deferred pass) their cubemaps will be blended smoothly. Here is an example, a long corridor which has walls painted in different colors.如果您放置几个影响非透明对象的Environment Probe节点(在延期通行证)他们的立方体贴图将被平滑地融合。这是一个示例,一条长长的走廊上有涂有不同颜色的墙壁。

We put two Environment Probe nodes and they both affect the object (when the object is in the intercrossing area). If you have large locations, you should use several Environment Probe nodes instead of one to make the final image more realistic.我们放置了两个Environment Probe节点,它们都影响对象(当对象位于交叉区域中时)。如果位置较大,则应使用多个Environment Probe节点而不是一个,以使最终图像更加逼真。

The SSR (Screen Space Reflections) effect makes the final image more realistic, because it appends reflections that cannot be baked into cubemaps. Using Environment Probe and SSR is a great method for pretty fast imitation of reflections with dynamic lighting.SSR(屏幕空间反射)效果使最终图像更加逼真,因为它附加了无法烘焙到立方体贴图中的反射。使用Environment ProbeSSR是通过动态照明非常快速地模仿反射的好方法。

Multiple Environment Probe for Transparent Objects透明对象的多环境探针#

The Multiple Environment Probes option set for a transparent object (rendered in the forward pass) allows several Environment Probe nodes affect the object and map their cubemaps to it.为透明对象设置的Multiple Environment Probes选项(在前传)允许多个Environment Probe节点影响对象并将其多维数据集映射到该对象。

  • When the option is disabled, only the last set Environment Probe will affect the object. At that, the entire object must be inside the radius of Environment Probe. Otherwise, it won't be affected by this Environment Probe at all.禁用该选项时,只有最后设置的Environment Probe会影响该对象。那时,整个对象必须在Environment Probe的半径内。否则,它将完全不受此Environment Probe的影响。
  • When the option is enabled, the object will be lit by the whole Environment Probe: each probe will affect the part of the object, which is inside the probe. Cubemaps of Environment Probe nodes will be blended in the intercrossing areas.启用该选项后,对象将被整个Environment Probe照亮:每个探针都会影响对象的一部分,该部分位于探针内部。 Environment Probe节点的立方体贴图将在交叉区域混合。
Rendering of multiple Environment Probe nodes must be enabled via Rendering -> Transparent -> Multiple Environment Probes.必须通过Rendering -> Transparent -> Multiple Environment Probes启用多个Environment Probe节点的渲染。
Multiple Environment Probes is off: only the left cubemap is mapped to the objectMultiple Environment Probes已关闭:仅左侧立方体贴图已映射到对象
Multiple Environment Probes is on: both cubemaps are mapped and blendedMultiple Environment Probes启用:映射和混合两个立方体贴图

Adding Environment Probe添加环境探针#

To add an Environment Probe node to the scene via UnigineEditor, do the following:要通过UnigineEditor将Environment Probe节点添加到场景中,请执行以下操作:

  1. Run the project with UnigineEditor.跑步UnigineEditor的项目。
  2. On the Menu bar, click Create -> Lights and select the required shape of Environment Probe: box or sphere. The projection shape can be changed after it is created via the Parameters window.在菜单栏上,单击Create -> Lights,然后选择Environment Probe所需的形状:框或球体。这投影形状通过Parameters窗口创建后可以对其进行更改。

  3. Place Environment Probe.放置Environment Probe
  4. Grab the cubemap texture for Environment Probe. You can grab it via the Parameters window or use the Bake Lighting tool. 抓取Environment Probe的立方体贴图纹理。您可以通过Parameters窗口来抓取它,也可以使用Bake Lighting工具。
  5. Adjust the Environment Probe settings.调整Environment Probe设定
  • You can't bake realtime lights (Omni Light, Projected Light, etc.) to Environment Probe. The best you can do is to place spheres with emission materials instead of lights, adjust emission intensity and then bake lighting. However, the result will look worse than you'd have with realtime lights.您不能将实时灯光(Omni Light, Projected Light等)烘烤为Environment Probe。最好的办法是用发光材料代替光来放置球体,调整发射强度,然后烘烤照明。但是,结果看起来比实时照明的效果要差。
  • Use the Bake to Environment Probes option to define if a surface should have its reflections baked to Environment Probe.使用Bake to Environment Probes选项定义曲面是否应将其反射烘焙为Environment Probe

When Environment Probe is selected in the UnigineEditor viewport, reference spheres are visualized in the center of the probe:在UnigineEditor视口中选择Environment Probe时,参考球将在探针中心可视化:

  • Reflective sphere helps in estimating the reflection provided by the probe.反射球有助于估计探头提供的反射。
  • Diffused sphere helps in estimating the ambient lighting provided by the probe (requires Ambient lighting to be enabled).扩散球体有助于估计探头提供的环境照明(要求周围启用照明)。

Environment Probe Settings环境探针设置#

The Environment Probe settings can be found in the Node tab of the Parameters window. This tab contains both the parameters attributable to all light sources and the parameters specific for Environment Probe. The specific parameters are described below.可以在Parameters窗口的Node选项卡中找到Environment Probe设置。此标签同时包含所有光源的参数以及特定于Environment Probe的参数。具体参数说明如下。

Common Parameters常用参数#

Projection Shape

Type of projection shape to be used by Environment Probe:Environment Probe使用的投影形状类型:

  • Box projection — works better for indoor scenes (when the room has a 3D box shape) or box-shaped outdoor scenes (back alley between buildings).盒子投影-适用于室内场景(房间为3D盒子形状)或盒子形状的户外场景(建筑物之间的后巷)。
  • Spherical projection — works better for all other cases (reflections on car, spherical room, etc.).球形投影-在所有其他情况下(汽车,球形房间等的反射)效果更好。
Box Projection Size Specifies the size of the box projection.指定框投影的大小。
Attenuation Power Sets the attenuation power for the light.设置衰减功率为光。
Attenuation Distance Sets the attenuation distance for the light.设置衰减距离为光。

Render Parameters渲染参数#

Color Sets the light color in the RGBA format. The color defines both the plausibility of virtual representation and its aesthetic component.设置灯光颜色格式为RGBA。颜色定义了虚拟表示的合理性及其美学成分。

Sets the light color multiplier, which provides fine control over color intensity of the emitted light:设置灯光颜色乘数,它可以很好地控制发射光的颜色强度:

  • The minimum value of 1 corresponds to the least saturated light color.最小值1对应于最小的饱和光颜色。
  • The maximum value of 100 equals the most bright and intense color.100的最大值等于最明亮和最强烈的颜色。
Shadow Mask The Shadow mask controls rendering of a shadow cast by an object lit by a light source.Shadow遮罩控制由光源照亮的对象投射的阴影的渲染。
Viewport Mask Sets the Viewport mask for the light.设置灯光的Viewport蒙版。
Visibility Distance Distance from the camera, in units, up to which Environment Probe will be rendered.距相机的距离(以单位为单位),直到渲染Environment Probe为止。
Fade Distance Distance from the camera, in units, starting from which Environment Probe starts to fade out gradually.距相机的距离(以单位为单位),从该距离开始,Environment Probe开始逐渐消失。
Render Water Renders Environment Probe on water.在水上渲染Environment Probe
Render Transparent Renders Environment Probe on transparent object.在透明对象上渲染Environment Probe
Use Sun Color

Enables the influence of sun light color on Environment Probe.发挥影响太阳光色Environment Probe

When enabled, this option makes the Environment Probe color black at night, or orange at sunset.启用后,此选项可使Environment Probe颜色在夜间变为黑色,而在日落时变为橙色。
Additive Blending Enables the additive blending mode for Environment Probe. This option offers more flexibility in lighting and reflections control. You can use it to blend lighting and reflections of several Environment Probe nodes together and control them separately.启用Environment Probe的加性混合模式。此选项在照明和反射控制方面提供了更大的灵活性。您可以使用它将多个Environment Probe节点的照明和反射混合在一起并分别控制它们.

Ambient Parameters环境参数#

Enabled Enables ambient lighting for Environment Probe. By default, Environment Probe is used for reflections only; as for lighting, it is recommended to simulate it using Voxel Probe and Lightmaps. This approach ensures the best result, however you can still use Environment Probe for ambient lighting by enabling this option.Environment Probe启用环境绑定。默认情况下,Environment Probe仅用于反射;默认为0。至于照明,建议使用Voxel Probe光照贴图。这种方法可确保获得最佳效果,但是通过启用此选项,您仍然可以将Environment Probe用于环境照明。
Global Illumination

Enables the global illumination simulation. Environment Probe generates fake GI by using given cubemap.启用全局照明模拟。 Environment Probe通过使用给定的多维数据集映射生成伪造的GI。

This parameter is available for box projection only.此参数可用于盒子投影只要。
Contrast Sets the contrast of ambient lighting.设置环境照明的对比度。

Reflection Parameters反射参数#

Gloss Corners

Sets the intensity of reflection gloss near the box projection corners.设置框投影角附近的反射光泽强度。

This parameter is available for box projection only.此参数可用于盒子投影只要。

Parallax correction enables rendering of reflections taking into account the camera's position. When this option is disabled, reflection cubemaps are simply projected onto objects, and do not follow the viewer's perspective.Parallax校正功能可以在考虑相机位置的情况下渲染反射。禁用此选项时,反射立方体贴图仅投影到对象上,并且不遵循查看者的角度。

  • 0 (minimum) — parallax correction is disabled (reflections will look like objects are infinitely distant).0(最小值)—禁用视差校正(反射看起来像对象是无限远的)。
  • 1 (maximum) — parallax correction is enabled (reflections will look like objects are at the distance close to the radius of Environment Probe).1(最大值)-启用视差校正(反射看起来像对象的距离接近Environment Probe的半径)。
  • Values in-between represent a linear interpolation factor for parallax correction and are to be set when Environment Probe is used to fit a medium or small object into the environment for additional correction, if necessary.中间的值表示用于视差校正的线性插值因子,并且在必要时将Environment Probe用于将中型或小型物体安装到环境中以进行附加校正时进行设置。
  • This parameter is available for spherical projection only (Box Projection option must be disabled).此参数仅适用于球形投影(必须禁用Box Projection选项)。
  • Parallax correction does not affect reflections on transparent objects.视差校正不会影响透明物体上的反射。

Baking Settings烘焙设置#

Re-grab the cubemap texture, when you make changes to these parameters.对这些参数进行更改后,请重新获取立方体贴图纹理。

Specifies if the reflection is dynamic.指定反射是否是动态的。

The Dynamic Reflections option should be enabled: Rendering -> Features -> Dynamic Reflections.应该启用Dynamic Reflections选项:Rendering -> Features -> Dynamic Reflections
Correct Roughness

Enables one of correction modes for Environment Probe reflections on rough surfaces or disables correction. Available modes are Low, Medium, High, Ultra — they differ in the number of rays used to create a reflection on a rough surface.为粗糙表面上的Environment Probe反射启用一种校正模式,或禁用校正。可用模式为Low, Medium, High, Ultra-它们在用于在粗糙表面上产生反射的光线数量不同。

Available for dynamic mode only.可以用来动态模式只要。
Faces Per Frame

Cubemap update interval.多维数据集贴图更新间隔。

Available for dynamic mode only.可以用来动态模式只要。
  • 1 — Refresh only one face every frame.1 —每帧仅刷新一张脸。
  • 2 — Refresh two faces every frame.2 —每帧刷新两张脸。
  • 3 — Refresh three faces every frame.3 —每帧刷新三张脸。
  • 4 — Refresh four faces every frame.4 —每帧刷新四张脸。
  • 5 — Refresh five faces every frame.5 —每帧刷新五张脸。
  • 6 — Refresh all six faces every frame.6 —每帧刷新所有六个面。
Grab by Bake Lighting Specifies if the cubemap texture is to be modified by the Bake Lighting Tool.指定是否要通过Bake Lighting工具修改立方体贴图纹理。
Reflection Viewport Mask The mask that controls rendering of the Environment Probe's reflections into the reflection camera viewport.面具控制将Environment Probe的反射渲染到反射摄影机视口中。

Resolution of the reflection texture, in pixels.反射纹理的分辨率,以像素为单位。

Setting too high resolution on a low-performance GPU with low memory capacity may cause engine crash.在具有低内存容量的低性能GPU上设置过高的分辨率可能会导致引擎崩溃。
Supersampling Number of samples per pixel used for image grabbing supersampling.用于图像捕获超采样的每像素采样数。
Mipmaps Quality

Quality of mipmaps.mipmap的质量。

Setting too high quality on a low-performance GPU with low memory capacity may cause engine crash.在内存容量低的低性能GPU上设置过高的质量可能会导致引擎崩溃。
Near Clipping Distance to the near clipping plane for image grabbing.到附近的裁剪平面以进行图像捕捉的距离。
Far Clipping

Distance to the far clipping plane for image grabbing.到远剪切平面的距离以进行图像捕获。

An extremely big difference between the Near and Far Clipping Planes can cause baking the space into black. Therefore, if the required Far Clipping Plane value is outside the range, adjust the Near Clipping value proportionately.近裁剪平面和远裁剪平面之间的极大差异会导致将空间烘焙为黑色。因此,如果所需的“远剪切平面”值不在该范围内,请按比例调整“近剪切”值。
Sky Cutout

Cut out sky rendering in Environment Probe and renders dynamic reflection instead of the sky.裁剪Environment Probe中的天空渲染,并渲染动态反射而不是天空。

This parameter can be used to render changes of the sky gradient in a window, when the time of the day changes.当一天中的时间发生变化时,此参数可用于在窗口中呈现天空渐变的变化。
Local Space

Enable local space (local coordinates) for Environment Probe. Can be used for scenes with moving objects.Environment Probe启用局部空间(局部坐标)。可用于带有移动物体的场景。

It is recommended to use this parameter, if you plan to rotate the Environment Probe after baking.如果计划在烘焙后旋转Environment Probe,则建议使用此参数。
You can use the following 7 visibility options together with additive blending to provide more flexibility in light baking. Thus, you can make Environment Probe nodes independent of each other and combine them to produce some sort of dynamic GI effect.您可以将以下7个可见性选项与添加剂混合在以下方面提供更大的灵活性轻度烘烤。因此,您可以使Environment Probe节点彼此独立,并将它们组合以产生某种动态GI效果。
Visibility Sky Enables baking of lighting from the sky to Environment Probe.可以烘烤天空的灯光Environment Probe.
Visibility Light World Enables baking of World Light sources to Environment Probe.启用将World Light源烘焙到Environment Probe.
Visibility Light Omni Enables baking of Omni Light sources to Environment Probe.启用将Omni Light源烘焙到Environment Probe.
Visibility Light Proj Enables baking of Projected Light sources to Environment Probe.启用将Projected Light源烘焙到Environment Probe.
Visibility Voxel Probe Enables baking of other Voxel Probe light sources to Environment Probe.启用将其他Voxel Probe光源烘焙到Environment Probe.
Visibility Emission Enables baking of emission light sources to Environment Probe.可以烘烤排放光源到Environment Probe.
Visibility Lightmap Enables baking of lightmapped surfaces to Environment Probe.可以烘烤光线映射的表面Environment Probe.

Cubemap texture for reflection.反射的多维数据集纹理。


Every bake lighting procedure makes changes to the asset selected in this field when the Grab by Bake Lighting mode is enabled.启用Grab by Bake Lighting模式时,每个烘烤照明过程都会更改在此字段中选择的资产。

You can leave the field empty to avoid losing content. In this case a new generated lighting texture will be set for this parameter after the bake lighting procedure. Generated textures are stored in the data/bake_lighting folder.您可以将该字段留空,以免丢失内容。在这种情况下,将在烘烤照明过程之后为此参数设置一个新生成的照明纹理。生成的纹理存储在data/bake_lighting文件夹中。

Cutout By Shadow

Enables clipping of reflections occluded by obstacles (located in shadowed areas relative to the light source). This feature uses the depth texture grabbed for Environment Probe to determine reflections that should be visible.可以裁剪被障碍物遮挡的反射(位于相对于光源的阴影区域中)。此功能使用深度纹理抓住Environment Probe以确定应该可见的反射。

  • This feature does not work with the Dynamic option enabled and does not clip reflections for transparent objects.启用Dynamic选项时,此功能不起作用,并且不裁剪透明对象的反射。
  • The feature takes into account only the shadows cast by surfaces using the Cast Environment Probe Shadows option.该功能仅考虑使用Cast Environment Probe Shadows选项由曲面投射的阴影。

When enabled, the three parameters listed below (Bias, Normal Bias, and Depth Texture) are available.启用后,下面列出的三个参数(Bias, Normal BiasDepth Texture)可用。

Bias Bias that is used to correct inexact shadowing of the scene objects for the Cutout By Shadow feature. It controls the depth offset added to the current depth value stored in the shadow map. Similar to the Bias parameter for shadows. 用于校正Cutout By Shadow功能的场景对象的不精确阴影的偏差。它控制添加到阴影贴图中存储的当前深度值的深度偏移。类似于阴影的Bias参数。
Normal Bias Bias obtained for the Cutout By Shadow feature by shifting the surface on which the shadow falls. The surface is shifted along normals stored in the normal map. Similar to the Normal Bias parameter for shadows.通过移动阴影所在的表面为Cutout By Shadow特征获得的偏差。曲面沿法线贴图中存储的法线移动。类似于阴影的Normal Bias参数。
Depth Texture

Depth texture used for clipping reflections occluded by obstacles.深度纹理,用于剪切障碍物遮挡的反射。

This texture is static and requires re-generation each time the Environment Probe position or size is changed.该纹理是静态的,并且每次更改Environment Probe位置或大小时都需要重新生成。

To grab the depth texture for clipping perform the following steps:要获取用于裁剪的深度纹理,请执行以下步骤:

  1. Place Environment Probe to the desired location and adjust its size, if necessary.如有必要,将Environment Probe放置在所需位置并调整其大小。
  2. Disable all nodes that should not be taken into account when calculating occluded (shadowed) areas.禁用计算遮挡(阴影)区域时不应考虑的所有节点。
  3. Enable the Cutout By Shadow feature and make sure that the Grab by Bake Lighting mode is also enabled.启用Cutout By Shadow功能,并确保还启用了Grab by Bake Lighting模式。
  4. Click Show Bake Lighting and in the window that appears click Bake Selected Probe.单击Show Bake Lighting,然后在出现的窗口中单击Bake Selected Probe
  5. After the textures are generated, you can enable or disable clipping at run time.生成纹理后,可以在运行时启用或禁用裁剪。

Every bake lighting procedure makes changes to the asset selected in this field when the Grab by Bake Lighting mode together with the Cutout By Shadow mode are enabled.启用Grab by Bake Lighting模式和Cutout By Shadow模式时,每个烘烤照明过程都会更改在此字段中选择的资产。

You can leave the field empty to avoid losing content. In this case a new generated depth texture will be set for this parameter after the bake lighting procedure. Generated textures are stored in the data/bake_lighting folder.您可以将该字段留空,以免丢失内容。在这种情况下,将在烘烤光照过程之后为此参数设置一个新的生成的深度纹理。生成的纹理存储在data/bake_lighting文件夹中。

最新更新: 2021-08-24
Build: ()