This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
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
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Postprocess Materials

Unigine offers a number of materials to create image postprocessing effects out of the box. These effects are applied after the scene in the viewport has been rendered, but before outputting it onto the screen. (Other postprocessing effects, such as HDR and DOF, can be adjusted directly in Render settings).
Postprocess materials are found in a unigine_postmaterial library.

There are two types of postprocess materials:

  1. Full-screen postprocesses. (To apply them, you need to perform only steps 1-3).
  2. Postprocesses applied to selected materials. These are: (To apply them, you need to perform all steps).

How to Apply Postprocess Materials

  1. In the Material editorchoose a postprocess material (any one starting withpost_*).

    A list of postprocess materials in the Materials editor

  2. If it is tweakable and you want to use non-default values, inherit this material into the material library of your project.
  3. Open Render settings->Common tab and copy the name of postprocess material you want to apply into RenderorPostfield, depending on the order they should be rendered in.
    • If you specify your postprocess material in the Renderfield, it will be rendered before any other postprocesses (such as HDR, DOF, etc.) are applied.
      For example, we would not want subsurface scattering to be applied after the HDR blur. If we specify post_filter_scattering here, in Render field, sub-surface scattering is rendered first and HDR is applied after it.
    • On the contrary, postprocess material set in the Postfield are rendered in the very end, after everything else has already been drawn. For example, such postprocess will also affect the color of glowing areas or HDR flares.
    If you want to use several postprocess materials at the same time, separate their names in any of these fields by a comma with no whitespace.

    Copy postprocess materials into Render or Post field in Render settings

    If it is a full-screen postprocess, that is it: the postprocess will be applied on the spot.
    However, some postprocesses can be applied per material. To use them, you need to perform the following actions as well.

  4. Make sure that Main menu->Render tab -> Auxiliary bufferoption is checked.

    Auxiliary buffer should be enabled

  5. In the Material editorchoose a material you want to apply the postprocess for.
  6. Go to the Statestab ->Passes -> Auxiliarypass and set itDefault. It means that the material is rendered into theauxiliary color buffer.

    Enable Auxiliary pass for the material that should be postprocessed

How to Mask Postprocess Materials

You can create up to three postprocess materials and mask which one should be used for rendering.

  1. For the postprocess material, choose States->Maskand setred.

    Select auxiliary color mask

  2. Go to the surface material to be rendered with a postprocess. Choose Parameterstab and double-click on theAuxiliary -> Colorfield.

    On the States tab, double click on the Auxiliary color

  3. Set Green and Blue channels to 0.

    Set Green and Blue to 0

This way only the postprocess with a red mask will be applied to the rendered material.
Last update: 2017-07-03
Build: ()