You can create fast subsurface scattering effects using three different methods:
Material phenomena: The Fast Subsurface Scattering Phenomena are predefined combinations of shaders packaged into a single shader node. Everything you need to create the effect, including lightmap generation, is handled within one node.
Shader compounds: The pre-packaged Fast Subsurface Scattering Shader Compounds provide examples for how to build subsurface scattering effects from "scratch". Unlike the material phenomena, the shader compounds require that you manually generate your own lightmap files.
Component shaders: Build the effect from "scratch" using the Fast Subsurface Scattering Component Shaders. As with the shader compounds, you'll have to generate your own lightmap files.
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:
Illumination > Fast Simple (misss)
Illumination > Fast Skin (misss)
These are the fast mental ray fast subsurface scattering phenomena:
mental ray > Material Phenomena > misss_fast_simple_phen
mental ray > Material Phenomena > misss_fast_skin_phen
mental ray > Material Phenomena > misss_fast_skin_phen_d (with displacement)
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.
Select the object to which you want to apply the subsurface scattering effect and press 7 to open the render tree.
From the preset manager, drag a Fast Simple (misss) node to the render tree workspace.
Connect the Fast Simple node's output to the Material node's Material port.
Double click the Fast Simple node to open its property editor.
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.
If desired, you can apply a bump or displacement map, as described in Adding Bump and Displacement Maps.
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.
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.
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.
Select the object for which you want to create the fast subsurface scattering effect and open the render tree (press 7).
From the preset manager, drag and drop either the SSS Compounds SimpleSSS or SkinSSS node to the render tree workspace.
Connect the shader compound's Surface output to the Material's Surface input port.
Connect the shader compound's Lightmap output to the Material's Lightmap input port.
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.
Connect the sss_lightmap_clip node to the shader compound's Lightmap input port.
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:
mental ray > Material > misss_fast_shader
mental ray > Material > misss_fast_shader_x
mental ray > Material > misss_skin_specular
mental ray > Material > misss_call_shader
mental ray > Lightmap > misss_lightmap_write
mental ray > Texture > misss_lambert_gamma
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.
Connect the misss_lightmap_write shader to the Material node's Lightmap port.
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.
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.
Connect the sss_lightmap_clip node into the misss_lightmap_write's lightmap port.
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.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License