Warnung

This document is slightly outdated. FIXME: HiFi hosted content

Tutorial: Add a Scattering Effect

Subsurface Scattering (SSS) is the diffuse reflection caused by light entering a material, being absorbed, scattered, and eventually exiting the material. It's critical for surfaces like paper, marble, wax, and realistic skin. You can add this effect to your avatar in Overte.

Subsurface Scattering Map and Value

Subsurface scattering (SSS) is noticeable when light passes through a thin translucent object like an avatar's skin. It causes the diffusion of light within the shallow top layer of skin.

Scattering is composed of a "scattering value" and a "scattering map". By setting the scattering value and map, you can influence how light scatters on the geometry of an avatar.

  • The scattering value is a [0,1] number which sets the amount of scatter.

  • The scattering map is gray scale image that masks the areas of scatter. It is based on the avatar's UV map.

Add Scattering to an Avatar

You can easily add scattering to an avatar by adding the value and map to the avatar's FST file.

  1. Create a custom avatar and package it using the Avatar Packager.

  2. Create a scattering map for the subsurface scattering in Adobe Photoshop or its equivalent.

  3. Open your avatar's FST file in a text editor of your choice.

  4. Add scattering information to the avatar's FST file. For example:

materialMap = { "body_mat": { "scattering": 1.0, "scatteringMap" : "![skinMap.jpg](http://.../skinMap.jpg)" } }
  1. Wear the avatar to observe the scattering effects in Overte.

Here's an example of the scattering effect. The left image has no scattering and the right image has scattering. You can see the red diffuse reflection along the shadow line.

No Scattering

Streuung

../../_images/no-scattering.png ../../_images/scattering.png

Here are the scattering skin maps for this avatar.

../../_images/skin-map.png ../../_images/skin-map-2.png

You can also check out the following avatars that have scattering effects:

Siehe auch