From BlenderWiki

Jump to: navigation, search
Image 1a: Marble Dog with SSS. Watch especially the ears and the paws.
Image 1b: And the same without SSS.

Many organic and some inorganic skins are not totally opaque right at the surface, so light does not just bounce off the top surface. Instead, some light also penetrates the skin surface, and scatters around inside, taking on the color of the insides and emerging back out to blend with the surface reflection. Human/animal skin, the skin of grapes, tomatoes, fruits, wax, gels (like honey, or Jello) and so on all have subsurface scattering (SSS), and photo-realism really cannot be achieved without it.

SSS can be found in the Material buttons (F5), and is limited to diffuse shading only, it does not affect specular shading.

How it works

Image 2: First pass of SSS.

Actually calculating the light path beneath the surface of an object would be practically impossible. But it has been shown that it is not necessary to do this, and that one can use a different approach.

Blender calculates SSS in two steps:

  • At first the brightness of the surface is calculated, from the frontside of the object as well as from it's backside. This is pretty much the same as in a normal render. Ambient-Occlusion, Radiosity, the type of diffuse Shader, the light color etc. is taken into account (Image 2).
  • In the second step the image is rendered finally, but now the SSS shader replaces the diffuse shader. Instead of the lamps the calculated lightmap is used. The brightness of a surface point is the calculated "Average" of the brightness of it's surrounding points. Depending on your settings the whole surface may be taken into account, and it's a bit more complicated than simply calculating the average, but don't bother too much with the math behind it.

Instead let's see what SSS does to a distinct light point.

Image 3a: No SSS.
Image 3b: Small SSS radius.
Image 3c: SSS radius enlarged.
Image 3d: SSS with very large green radius value.

If you turn on SSS the light is distributed over a larger Area. The size of this area depends on the radius values. Instead of distributing all colors with the same amount, you may choose different radius values for each of the RGB-Colors.

If you use a very large radius value for a color, its light is evenly distributed over the whole object.

Enabling SubSurface Scattering

Image 4: The SSS Panel. SSS is already enabled.
  • Enable SSS by clicking on the Subsurface Scattering button. You will see your preview panel render change somewhat, as additional processing kicks in.
  • Various pre-sets are defined for you, selected by clicking the Selector to the right of Custom. If you don't like any of them, you can define a Custom set. When you select a pre-set, the Radius values, the color and the IOR are set for you. The remaining options are not set (because they are mostly dependent on the size of your object).

SubSurface Scattering doesn't need raytracing. But since it is dependent on the incident light and shadows, you need proper shadow calculation (which may need raytracing).

Options

The numeric sliders control how the light is scattered:

Scale
The scale of your object, in Blender units, across which you want the scattering effect to take place. For the presets scale 1.0 means 1 Blender unit equals 1 millimeter, scale 0.001 means 1 Blender unit equals 1 meter. If you want to work out what scale value to use in your scene, just use the formula: (size in blender units)/(real world size in millimetres)= scale
Radius R, Radius G and Radius B
The light blurring radius. As the light travels through the object and back up to emerge from the surface at some other point, it creates a path length. These sliders allow you to adjust the average length of that path. The longer the path length is, the more evenly this color is distributed.
IOR
The IOR value determines the falloff of incident light. Higher values means that light falls off faster. The effect is quite subtle and changes the distribution function only a little bit. By the examination of many different materials a value of 1.3 to 1.5 have been found fitting. If you know the exact material you are trying to simulate, see our IOR table.

Error

This parameter controls how precisely the algorithm samples the surrounding points. Leaving it at 0.05 should give images without artifacts. It can be set higher to speed up rendering, potentially with errors. Setting it at 1.0 is a good way to quickly get a preview of the look, with errors.

The color swatch and blend control the color of the SSS shader.

<swatch>
This has two effects:
  1. If you think of the SSS as a strange sort of lamp, this would be the lights color.
  2. It also affects the scattering - the darker the color the more the light is scattered.
So if you set it to green, the lit areas of the object will appear in green, and green is scattered only a little. Therefore the darker areas will appear in red and blue. You can compensate the different scattering by setting a larger radius for the color.
Col
This controls how much the R, G, B option modulates the diffuse color and textures. Note that even with this option set to 0.0, the R, G, B option still influences the scattering behavior.
Tex
How much the surface texture is blurred along with the shading.
Front
Factor to increase or decrease the frontscattering. When light enters through the front of the object, how much is absorbed or added? (Normally 1.0 or 100%).
Back
Factor to increase or decrease the backscattering. Light hitting an object from behind can go all the way through the object and come out on the front of the object. This happens mostly on thin objects, like hands and ears.


Developing your own SSS material

Follow these simple steps to make your own SSS material:

  • Set the SSS color on a value of your choice, normally the predominant color of the object. If you want to use different radiuses for the colors, don't make it too dark.
  • Set the scale factor. If you want to see much translucency you need small objects or large scale values.
  • Set the radius values.
  • Adjust the brightness with the Front and Back values.


Example: Grapes

Image 5: Subsurface Settings for the Grapes in Image 6.
Image 6a: With SSS.
Image 6b: Difference between 6a and 6c, with strongly enhanced brightness and contrast.
Image 6c: Without SSS.

The skin of the grape is a purple colorramp, and we observe that grapes have a fairly red specular glow. The scene is lit with a bright sun from above and behind, and a wide soft area light as a key light. A cloud texture is used to introduce surface variations.

In the example in (Image 6a), we have SSS turned on to give a green color based on the inside of a grape. The red Radius-Value is quite large, the green Radius-Value is larger than the blue one. We can observe the effects of these settings in (Image 6b). Though the SSS color is green, the green values are only increased at the very bright spots on the grapes. Green and blue are nearly equally scattered (the larger radius for green compensates the green SSS-color). Since red is scattered very much, red is missing on the parts that are lit from front. The red light is scattered all over each grape, so the same amount of light is emitted from a larger area, partially from the backside of the grapes.

Where we see the backsides of the grapes (pointing away from the light) they appear in red. This has two reasons:

  1. Red is scattered stronger than green and blue, so more of the red light reaches the backside of the grapes.
  2. The Back-Light setting is strongly increased. The Front-Light setting is slightly raised to compensate the loss in brightness from the scattering.

Get the .blend file

Example: Skin

Manual-Material-SSS-Skin.jpg

Skin is the holy grail of materials, because it is so varied, so imperfect, and so complex. A good skin render is a combination of procedural, UV-mapped images for color, normal, specularity, ambient, and so on. This example uses SSS to get you started.

The model was a human 1.75 BU high (each BU=1m in real world). We wanted a Caucasian human, so we started with a light tan base material, very little hardness and specularity. For SSS, we started with the "Skin 1" preset. The head was 0.25 BU in diameter, hence the SSS Scale of 0.150, because we do not want light from one side to light up the other; there is supposed to be a skull in there!

Lighting plays an important part in getting the basic skin to look right. For this example I used a 3-point studio rig:

  • Key: Spot placed 5 BU from subject. Energy 2.0, Falloff 5.0, color (0.98, 0.98, 1.0).
  • Fill lights: Hemi placed 5 BU out to the side, 1 BU in front of subject. Energy 0.5, Falloff 10, color white.