Create a subsurface scattering effect with your physically based shader

You can create a subsurface scattering effect with your StingrayPBS node by setting the surface as opaque and setting the Density attribute to less than 1.

  1. Assign a StingrayPBS shader to your object, and select Custom under the Preset Material drop-down list to create a new ShaderFX graph.
  2. Select the Standard Base node, and set the Blend Mode to Opaque.
  3. Create a Material Variable node.

    In the Attribute Editor, set its Type to Scalar. You can optionally rename the node to Subsurface Scattering for more clarity.

  4. Connect the Material Variable node Result output to the Standard Base node Density input.
  5. Adjust the Subsurface Scattering value in the Attribute Editor after you close the ShaderFX editor.

    In this example, the light is behind the sphere. When the Density input is left unconnected, the sphere appears dark as no light passes through.

    When the Density input (Subsurface Scattering value) is set to 0.2, light penetrates through the surface of the translucent object and the sphere appears lit.

    Note:

    Pattern texture courtesy of www.cgtextures.com.