This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
资源工作流程
Version Control
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
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
VR-Related Classes
创建内容
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

动态反射优化

Dynamic reflections in the scene may significantly drop the performance if they aren't properly set up. For example, the planar reflection doubles the polygon count since it takes into account all geometry in the scene by default. It may raise performance issues in large and heavy scenes.如果未正确设置场景中的动态反射,则可能会严重降低性能。例如,由于默认情况下平面反射考虑了场景中的所有几何图形,因此平面反射使多边形计数加倍。在大型和繁重的场景中可能会引起性能问题。

As an alternative, you can try to keep the number of reflections as low as possible. However, there is a way to optimize dynamic reflections usage without visual losses.作为替代方案,您可以尝试使反射次数尽可能少。但是,有一种方法可以优化动态反射的使用而不会造成视觉损失。

注意
For dynamic reflections to be rendered, the Rendering -> Dynamic Reflections -> Enabled flag should be set.要渲染动态反射,应设置Rendering -> Dynamic Reflections -> Enabled标志。

The number of reflection polygons for each surface can be checked using the Surfaces tab of the Content Profiler tool.每个曲面反射多边形的数量可以使用 Content Profiler 工具的 Surfaces 选项卡进行检查。

Using Reflection Masks
使用反射罩#

The Reflection mask allows controlling rendering of dynamic reflections into the reflection camera viewport. This mask can be set for dynamic Environment Probes and planar reflections. Reflection蒙版 允许控制将动态反射呈现到反射相机视口中。可以为动态Environment Probes平面反射设置此蒙版。

Optimizing planar reflections
优化平面反射#

To optimize the scene with planar reflection probes, you can apply the following approach: set up the scene so that only the required planar reflections are rendered, and use less consuming Screen Space Reflections (SSR) for other reflections. An example workflow is as follows:要使用平面反射优化场景,可以应用以下方法:设置场景,以便仅渲染所需的平面反射,并为其他反射使用较少消耗的Screen Space Reflections (SSR)。示例工作流如下:

  1. Decide, which bit of the viewport mask would be responsible for reflection of the object.决定视口蒙版的哪一位负责对象的反射。
  2. Open the Camera Settings window and enable the selected bit in the Reflection Viewport mask of the camera.

    打开“摄像机设置”窗口,并启用摄像机Reflection Viewport掩码中的选定位。

  3. In the Materials Hierarchy, select the reflective material and enable the same bit in the Reflection Viewport Mask in the Parameters tab of the Material Editor.

    在Materials_Hierarchy中,选择反射材质,然后在“材质编辑器”的Parameters选项卡的“平面反射”的Viewport Mask中启用相同的位。

  4. In the World Hierarchy, select the node to be reflected and go to the Node tab of the Parameters window.在“世界层次结构”中,选择要反射的节点,然后转到Parameters窗口的Node选项卡。
  5. In the Surfaces section, enable the selected bit in the Viewport Mask for all surfaces that should be reflected.
    注意
    You can create the special low-poly LOD surface that will be used for reflections only; the viewport mask of such a LOD shouldn't match the camera's viewport mask to exclude it from rendering.You can create the special low-poly LOD surface that will be used for reflections only; the viewport mask of such a LOD shouldn't match the camera's viewport mask to exclude it from rendering.
    You can create the special low-poly LOD surface that will be used for reflections only; the viewport mask of such a LOD shouldn't match the camera's viewport mask to exclude it from rendering.
    Surfaces部分中,为所有应反射的表面启用Viewport Mask中的选定位。
    注意
    You can create the special low-poly LOD surface that will be used for reflections only; the viewport mask of such a LOD shouldn't match the camera's viewport mask to exclude it from rendering.您可以创建特殊的低多边形LOD曲面,该曲面仅用于反射。这样的LOD的视口蒙版不应与摄影机的视口蒙版匹配,以将其从渲染中排除。
  6. In the Materials Hierarchy, select the material of the node that should be reflected and enable the selected bit in the Viewport Mask in the Common tab of the Materials Editor.

    In the picture below, the reflection viewport mask of the plane has the same matching bit (or bits) with the camera reflection viewport mask and the Viewport masks of the red material ball and its material. The viewport masks of the other material balls don't have a matching bit with the reflection camera viewport mask and/or with the planar reflection viewport mask and, therefore, they aren't reflected:In the picture below, the reflection viewport mask of the plane has the same matching bit (or bits) with the camera reflection viewport mask and the Viewport masks of the red material ball and its material. The viewport masks of the other material balls don't have a matching bit with the reflection camera viewport mask and/or with the planar reflection viewport mask and, therefore, they aren't reflected:

    Masked planar reflectionMasked planar reflection
    In the picture below, the reflection viewport mask of the plane has the same matching bit (or bits) with the camera reflection viewport mask and the Viewport masks of the red material ball and its material. The viewport masks of the other material balls don't have a matching bit with the reflection camera viewport mask and/or with the planar reflection viewport mask and, therefore, they aren't reflected:Masked planar reflection
    在“材质层次结构”中,选择应反映的节点的材质,然后在“材质编辑器”的Common选项卡的Viewport Mask中启用所选位。

    In the picture below, the reflection viewport mask of the plane has the same matching bit (or bits) with the camera reflection viewport mask and the Viewport masks of the red material ball and its material. The viewport masks of the other material balls don't have a matching bit with the reflection camera viewport mask and/or with the planar reflection viewport mask and, therefore, they aren't reflected:在下图中,平面的反射视口蒙版与相机反射视口蒙版红色实物球及其材质的视口蒙版具有相同的匹配位(或多个位)。 其他材质球的视口罩与反射相机视口罩和/或平面反射视口罩没有匹配的位,因此不会被反射:

    Masked planar reflection遮罩的平面反射
  7. Enable Screen Space Reflections to produce reflections of other nodes in the scene: on the Menu Bar, toggle the Rendering -> Features -> SSR option on.
    注意
    The SSR effect should be also enabled for the reflective material: go the Post Processing section of the States tab and check if the SSR option is enabled.The SSR effect should be also enabled for the reflective material: go the Post Processing section of the States tab and check if the SSR option is enabled.

    Masked planar reflection + SSRMasked planar reflection + SSR
    The SSR effect should be also enabled for the reflective material: go the Post Processing section of the States tab and check if the SSR option is enabled.Masked planar reflection + SSR
    启用Screen Space Reflections产生场景中其他节点的反射:在菜单栏上,将Rendering -> Features -> SSR选项打开。
    注意
    The SSR effect should be also enabled for the reflective material: go the Post Processing section of the States tab and check if the SSR option is enabled.还应为反射材质启用SSR效果:转到States选项卡的Post Processing部分,并检查是否启用了SSR选项。

    Masked planar reflection + SSR遮罩的平面反射+ SSR

Optimizing environment probe reflections
优化环境探针反射#

Dynamic reflections provided by Environment Probes can be optimized in the same way as described above. To specify the Reflection Viewport mask for the Environment Probe, go to the Environment Probe section of the Parameters window and set the Reflection Viewport Mask parameter in the Baking Settings section.可以按照与上述相同的方式优化Environment Probes提供的动态反射。要为Environment Probe指定Reflection Viewport蒙版,请转到Parameters窗口的Environment Probe部分,然后在Baking Settings部分中设置Reflection Viewport Mask参数。

注意
The Reflection Viewport mask takes effect only when the Realtime Update mode is set for the Environment Probe.仅当为Environment Probe设置Realtime Update模式时,Reflection Viewport掩码才有效。

In the left picture below, the reflection viewport mask of the Environment Probe matches the camera's Reflection Viewport mask and the Viewport masks of the red material ball and its material. In the right picture, the Reflection Viewport mask of the Environment Probe doesn't match the camera's Reflection Viewport mask:在下面的左图中,Environment Probe的反射视口蒙版与摄影机的Reflection Viewport蒙版以及红色实物球及其材质的Viewport蒙版匹配。在右图中,Environment ProbeReflection Viewport遮罩与相机的Reflection Viewport遮罩不匹配:

Masked reflection provided by environment probe环境探针提供的蒙版反射
注意
An example of using reflection masks is also available in the Content Optimization video tutorial.视频教程 Content Optimization 中也提供了使用反射蒙版的示例。

Setting Up Reflection Distance
设置反射距离#

One more method that allows optimizing rendering of dynamic reflections is to set the distance at which reflections are turned off.允许优化动态反射渲染的另一种方法是设置关闭反射的距离:

注意
此方法仅适用于 Environment Probes 提供的动态反射。
  1. In the Menu Bar, choose Windows -> Settings and go to the Visibility Distances section of the Settings window that opens.

    在菜单栏中,选择Windows -> Settings并转到打开的“设置”窗口的Visibility Distances部分。

  2. For the Dynamic Reflections parameter, specify the distance from the camera, starting from which the reflections aren't rendered.对于Dynamic Reflections参数,请指定距相机的距离,从该距离开始不渲染反射。
最新更新: 2024-12-13
Build: ()