This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
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
Учебные материалы

Оптимизация динамических отражений

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.Количество полигонов в отражениях для каждой поверхности можно проверить на вкладке Surfaces инструмента Content Profiler.

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 mask позволяет контролировать рендеринг динамических отражений во вьюпорте камеры отражения . Эту маску можно установить для динамических 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.

    В иерархии материалов выберите отражающий материал и включите тот же бит в Planar Reflection Viewport Mask на вкладке Parameters в редакторе материалов.

  4. In the World Hierarchy, select the node to be reflected and go to the Node tab of the Parameters window. В Иерархии мира выберите узел для отражения и перейдите на вкладку Node окна Parameters.
  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
    В иерархии материалов выберите материал узла, который должен быть отражен, и включите выбранный бит в поле Viewport Mask на вкладке Common редактора материалов.

    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 также должен быть включен для отражающего материала: перейдите в раздел Post Processing на вкладке States и проверьте, включена ли опция SSR.

    Masked planar reflection + SSR Маскированное плоское отражение + SSR

Optimizing environment probe reflectionsОптимизация отражений Environment Probe#

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, можно оптимизировать таким же образом, как описано выше. Чтобы указать маску Reflection Viewport для Environment Probe, перейдите в раздел Environment Probe окна Parameters и установите параметр Reflection Viewport Mask в разделе Baking Settings.

Примечание
The Reflection Viewport mask takes effect only when the Realtime Update mode is set for the Environment Probe. Маска Reflection Viewport действует, только если включен режим Realtime Update для Environment Probe.

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 красного материального шара и его материала. На правом рисунке маска Reflection Viewport для Environment Probe не соответствует маске Reflection Viewport камеры:

Masked reflection provided by environment probe Маскированное отражение, обеспечиваемое зондом среды
Примечание
An example of using reflection masks is also available in the Content Optimization video tutorial. Пример использования масок отражения также доступен в видеоуроке Оптимизация контента .

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Источники Environment Probe#

This method is suitable for dynamic reflections provided by Environment Probes only.Этот метод подходит только для динамических отражений, предоставляемых 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 укажите расстояние от камеры, начиная с которого отражения не отображаются.

Planar Reflection ProbesПлоские отражения#

To optimize Planar Reflection Probe, you can try to adjust the following parameters of its material:Чтобы оптимизировать источник Planar Reflection Probe, вы можете попробовать настроить следующие параметры его материала:

  • Visibility Distance and Fade Distance not to render the reflecting surface at all, when the camera is far from it.Расстояния Visibility Distance и Fade Distance, чтобы вообще не отображать отражающую поверхность, когда камера находится далеко от нее.
  • Reflection Distance to avoid rendering reflections that can't be seen, when the camera is far from the reflecting surface.Reflection Distance чтобы избежать отображения невидимых отражений, когда камера находится далеко от отражающей поверхности.
  • Distance Scale to apply the less detailed LODs to reflections at a closer distance, than to the corresponding reflected objects.Distance Scale для применения менее детализированных LOD к отражениям на более близком расстоянии, чем к соответствующим отраженным объектам.
  • ZFar to limit the viewing frustum that is used for reflection grabbing to avoid rendering reflections of unnesessary distant objects.ZFar для ограничения усеченного угла обзора, который используется для захвата отражений, чтобы избежать отображения отражений ненужных удаленных объектов.
Последнее обновление: 22.06.2023
Build: ()