This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Программирование
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Dynamic Reflections Optimization

Dynamic reflections in the scene may significantly drop the performance if they aren't properly set up. For example, the planar reflection twices 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.

Notice
For dynamic reflections to be rendered, the Rendering -> Dynamic Reflections -> Enabled flag should be set.

Using Reflection Masks#

A reflection mask allows controlling rendering of dynamic reflections into the camera viewport. It can be set for dynamic environment probes and planar reflections.

To optimize the scene with planar reflections, you can apply the following approach: set up the scene so that only certain planar reflections are rendered, and the other ones are produced by the less consuming screen space reflections (SSR):

  1. Open the Camera Settings window.

  2. Specify the Reflection mask of the camera to make it render only certain reflections.

  3. In the Materials Hierarchy, select the reflective material and specify the Planar Reflection Mask in the Parameters tab of the Material Editor. This mask should match at least one bit of the camera reflection mask; otherwise, reflections won't be rendered.

  4. In the World Hierarchy, select the node to be reflected and go to the Node tab of the Parameters window.
  5. In the Surfaces section, specify the Viewport Mask for all surfaces that should be reflected. The mask should match the reflection mask of the reflective material.
    Notice
    You can create the special low-poly LOD surface that will be used for reflections only: in this case, the viewport mask of such a LOD shouldn't match the camera's viewport mask to exclude it from rendering.
  6. In the Materials Hierarchy, select the material of the node that should be reflected and specify the Viewport Mask in the Common tab of the Materials Editor. This mask should match the reflection mask of the reflective material as well.

    On the picture below, the reflection mask of the plane matches the camera's reflection mask and the viewport masks of the red material ball and its material. The viewport masks of the other material balls don't match the reflection masks and, therefore, they aren't reflected:

    Masked Planar Reflection
  7. Enable the screen space reflections to produce reflections of other nodes in the scene: in the Menu Bar, toggle the Rendering -> Features -> SSR option on.
    Notice
    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

Dynamic reflections provided by environment probes can be optimized the same way described above. To specify the reflection mask for the environment probe, go to the Environment Probe tab of the Parameters window and set the Reflection Mask parameter in the Baking Settings section.

Notice
The reflection mask takes effect only when the Dynamic flag is set for the environment probe.

On the left picture below, the reflection mask of the environment probe matches the camera's reflection mask and the viewport masks of the red material ball and its material. On the right picture, the reflection mask of the environment probe doesn't match the camera's reflection mask:

Masked Reflection Provided by Environment Probe
Notice
An example of using reflection masks is also available in the Content Optimization video tutorial.

Setting Up Reflection Distance#

Another method that allows optimizing rendering of dynamic reflections is to set the distance at which reflections are turned off:

Notice
This method is available for dynamic reflections provided by Environment Probes only.
  1. In the Menu Bar, choose Windows -> Settings and go to the Visibility Distances section of the Settings window that opens.

  2. For the Dynamic Reflections parameter, specify the distance from the camera, starting from which the reflections aren't rendered.
Last update: 27.12.2018
Build: ()