Subsurface Scattering Explained

Introduction

BRDF and BSSRDF

Subsurface Scattering Explained

A Practical Model for Subsurface Light Transport (2001) Jensen et al.

Case Study: Finding Nemo

Glossary

References

Light that hits a surface has some component reflected and some transmitted. Because light entering the material (transmitted light) is moving between two mediums with differering indices of refraction, fresnel is required to calculate the change in direction of the light. Reflected light is dealt with using a diffusion approximation and the transmitted light is then dealt with using subsurface scattering (see Figure 1).

Figure 1: Some incident light is reflected while some is transmitted through the medium under refraction

The transmitted light is then scattered in the medium it is traveling through and some of this scattered light makes its way back to the surface resulting in light contribution to other points on the surface. Since this contribution is being emitted from beneath the surface of the material, it is more of a luminous type of light resulting in a softer appearance than reflected light. Any light that enters the medium and does not reach the surface again will eventually die out (or become extinct) (see Figure 2).

In the implementation discussed in Case Study 1: Finding Nemo this extinction is calculated using Renderman's smoothstep() function which allows the intensity of an incident of scattered light to reach zero. The distance at which the incident of light becomes completely extinct (D) is provided by the user and in effect, creates a radius around the point of incidence which determines which points on the surface can be affected by light scattered from that incident. In actual fact, the falloff from the intensity of light would be exponential and never quite reach zero in a physically accurate model.

Figure 2: The scattering of light beneath the surface of a material. Notice how some light makes its way back to the surface of the material

Now that we have a radius for light scattering, we need a way to store the effect this scattering light has on other points on the surface. When a shader is calculating the color of a surface, it systematically moves through each point on the surface and accumulates the contribution of the various types of light, textures etc. to the current point. This means that calculating the effects of subsurface scattering using the method described above would require a bit of reverse engineering. This is not possible to do within a shader so the effects of subsurface scattering from each point on any other point within the scattering radius (D) need to be calculated in a pre-pass and stored in a file. This file is called a point cloud file.

This is where the maths comes in. In order to calculate illuminance values for the point cloud, Marengo (2005) describes the following steps. For every point on the surface:

  • Start with a a point P and a scatter radius D.
  • Calculate a normalizing factor for the radius: norm = 3*PI*D^2/10

 

Figure 3: The scatter radius D

  • Distribute all the sample points Xi within the scatter radius. For each point Xi calculate:
    • The representative surface area: Ai
    • The distance from P as ri = distance(P, Xi)
    • The irradiance Ii = Cl * dot(Ni, Li)
  • The final contribution Ki from Xi as: Ki = Ii * (1 – smooth(0, D, ri)) * A / norm

So for every point on a surface P, the final contribution for each value of Ki is added to an accumulator and the total is the total luminance for that point due to subsurface scattering.

Figure 4: Calculating the contribution of light for point P from a sample Xi

The only issue is that the luminance value for a point cloud will need to be calculated every time it falls within the radius of a point P due to the value Ki essentially being a function of the distance ri from point Xi to point P. It would make much more sense to calculate its value once and then weight it against its distance from P.

Marengo (2005) describes the following approach:

  • For every shade point find N number of the nearest point cloud points
  • Calculate the subsurface scattering for each point in this group and store the result in an attribute for the point cloud point.
  • The resulting subsurface scattering for the shade point is a weighted sum of all the points in this group.

So with this approach, if a point cloud point that has already been calculated is used for a separate shade point, the subsurface scattering does not need to be recalculated.

Figure 5: The contribution of N scatter points on a point P