Working with Fast Subsurface Scattering Shaders

 
 
 

You can create fast subsurface scattering effects using three different methods:

Fast Subsurface Scattering Phenomena

The fast subsurface scattering material phenomena are pre-configured groups of shaders designed to produce a scattering effect. A material phenomenon "takes over" the entire definition of a material (you'll notice that all ports on the material node, expect for the Material port, become grayed out when a phenomenon is connected). As such, all you need to do is connect the shader to the Material port of the object's Material node and you can begin tuning all the parameters needed for the effect in one place.

These are the Softimage fast subsurface scattering phenomena:

These are the fast mental ray fast subsurface scattering phenomena:

Creating Fast Subsurface Scattering

For the purpose of this example the Fast Simple (misss) phenomenon is used, but any of the material phenomena (listed above) can be used in the same way to create a subsurface scattering effect.

  1. Select the object to which you want to apply the subsurface scattering effect and press 7 to open the render tree.

  2. From the preset manager, drag a Fast Simple (misss) node to the render tree workspace.

  3. Connect the Fast Simple node's output to the Material node's Material port.

  4. Double click the Fast Simple node to open its property editor.

  5. Set the following parameters to define the effect:

    • Set the surface illumination parameters. See Defining the Surface Illumination.

    • Set the front and back scattering parameters. See Defining Scattering.

    • Enable and control the amount of indirect illumination, such as global illumination and final gathering, that gets sampled and stored in the lightmap and scattered over the object's surface.

  6. If desired, you can apply a bump or displacement map, as described in Adding Bump and Displacement Maps.

Creating Fast Skin Subsurface Scattering

The fast skin variants of the fast subsurface scattering phenomena are specifically designed to simulate human skin. They supports three levels of light scattering, two levels of specular highlights, and glossy raytraced reflections. All of the scattering, illumination and specularity layers are added together to produce the final skin effect.

Applying and tuning the fast skin effect is almost identical to creating the effect with the fast subsurface scattering phenomena.

Fast Subsurface Scattering Shader Compounds

The fast subsurface scattering shader compounds are provided as examples to help you create subsurface scattering effects using the component shaders. You can explore the internal structure of the SimpleSSS and the SkinSSS shader compounds available from the SSS Compounds category in the preset manager. Just drag and drop either shader compound into the render tree workspace and edit it to view how the subsurface scattering component shaders contained within it are connected together.

It is important to note that these shader compounds are built using the Softimage versions of the mental ray component shaders. Their layout and the parameters they exposed may not match the mental ray component shaders exactly, but their node connections still provide valid examples for both.

Generating Lightmaps for the SSS Compounds

If you are creating a fast subsurface scattering effect using the SSS shader compounds then you will have to generate a separate writable lightmap image for each object connected to an SSS shader compound. The SSS shader compound needs to be local to each object using this effect, otherwise the lightmap shader simply overwrites the results of a previous lightmap shader.

If you edit the SSS shader compounds, you will notice that they already contain a Sub-Surface Lightmap Write shader that is connected to the branch of the render tree containing the material to be sampled. The Lightmap Write shader's Lightmap input and output ports are exposed in the compound node.

  1. Select the object for which you want to create the fast subsurface scattering effect and open the render tree (press 7).

  2. From the preset manager, drag and drop either the SSS Compounds SimpleSSS or SkinSSS node to the render tree workspace.

  3. Connect the shader compound's Surface output to the Material's Surface input port.

  4. Connect the shader compound's Lightmap output to the Material's Lightmap input port.

  5. Now you must create a lightmap file for the effect. Choose User Tools Create SSS Lightmap from the render tree command bar. This generates a lightmap image clip and writable image source for the object's sampled material.

  6. Connect the sss_lightmap_clip node to the shader compound's Lightmap input port.

Fast Subsurface Scattering Component Shaders

The fast subsurface scattering component shaders are available for you to use individually in your own particular render tree setup. Each shader's inputs and outputs can be connected as you wish and you are not restricted by the "black-box" implementation of a material phenomenon.

For examples of how to connect the fast subsurface scattering component shaders, see the Fast Subsurface Scattering Shader Compounds.

These are the mental ray subsurface scattering component shaders:

Generating Lightmaps for the misss Component Shaders

If you are creating a fast subsurface scattering effect from "scratch" using the component shaders then you will have to generate your own lightmap file using the misss_lightmap_write shader.

  1. Connect the misss_lightmap_write shader to the Material node's Lightmap port.

  2. Connect the branch of the render tree containing the material you wish to sample to misss_lightmap_write's input port.

    Generally, misss_lambert_gamma is used, but any illumination shader can be used to sample the lighting in the model for the lightmap. For example, you can use mib_illum_lambert or even experiment with a mib_illum_phong and the scattering of specular reflections.

  3. Once you've made your connections, choose User Tools Create SSS Lightmap from the render tree command bar. This generates a lightmap image clip and a writable image source for the object's sampled material.

  4. Connect the sss_lightmap_clip node into the misss_lightmap_write's lightmap port.

Creating Shader Compounds

Once you have built your render tree network of subsurface scattering shaders, you can package it up as a shader compound exposing only those inputs and outputs required to tweak the effect and then apply it to the objects in your scenes. For more information, see Shader Compounds.

You can also use the ready-made SSS Compounds available in the preset manager, see Fast Subsurface Scattering Shader Compounds.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License