This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
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.

post_filter_scattering

This postprocess material allows to create an effect of subsurface scattering. (See how to use postprocess materials).

This material is crucial when rendering human skin. Without it, character face look hard, like dried rubber. Even the highly detailed diffuse, specular, and normal maps used for a character will not make skin look real without subsurface scattering. post_filter_scattering gives the skin realistic reddish color and soft appearance. It simulates the physical process when the incoming light is not only reflected off the skin, but also goes beneath the skin surface, scatters in tissue layers and after that non-absorbed light exits the skin.

With subsurface scattering   Without subsurface scattering
With subsurface scattering
 
Without subsurface scattering

If you are going to use subsurface scattering postprocess, you can increase the detail in the character's diffuse texture and the strength of normals, because they will be blurred and softened.

Notice
Results of post_filter_scattering subsurface scattering directly depend on the Far clipping distance set for the camera. If you change it, the sampled screen radius values will also change and may need to be readjusted.

Parameters

GUI nameXML nameDescription
Screen radiusscreen_radius Distance in the screen space, within which colors will be sampled. It controls how much wrinkles, pores and cavities will be blurred and highlighted.
  • The higher the value, the farther subsurface scattering reaches.
  • Too high values result in ghosting effect.
  • By the minimum value of 0, no subsurface scattering is rendered.
Small Screen radius Large Screen radius
Screen radius = 0.02
Screen radius = 0.07
Sample radiussample_radius Sample radius allows to control how sampling along the edges is performed:
  • If the value is low, edges will be sharp and clear.
  • If the value is high, subsurface scattering will affect areas of different depth values. The edge will be blurred.
  • By the minimum value of 0, no subsurface scattering is rendered.
Small Sample radius Large Sample radius
Sample radius = 0.02
Sample radius = 0.07
Distance powerdistance_power Power that controls how fast the subsurface scattering effect fades out with the distance. This parameter allows to optimize postprocessing load.
  • By the minimum value of 1, the rendered subsurface scattering will not depend on the distance to the camera.
  • The higher the value, the faster subsurface scattering fades out when the camera moves away from the surface.
Direct colordirect_color Color used to simulate the direct component of skin lighting, i.e. it is diffuse light that bounces off the skin.
  • For skin, direct color is cyan-ish or bluish to be an opposite of the scattering color. When they mix, they would make a neutral color.
Scattering colorscattering_color Color used to simulate the subsurface component of skin lighting, i.e. the light that bounces inside of the subsurface tissue layers (epidermis and dermis) before exiting.
  • For skin, subsurface color is reddish, due to blood circulating in skin tissues.

States

GUI nameXML nameDescription
Maskmask Color mask for the materials' auxiliary color. See how to use it as a mask to apply a postprocess only to the selected materials.
Last update: 2017-07-03
Build: ()