Case Study: Finding Nemo
| The subsurface scattering model developed for human skin in Finding Nemo was based on the SIGGRAPH papers A Practical Model For Subsurface Light Transport (Jensen et al. 2001) and A Rapid Hierarchical Rendering Technique for Translucent Materials (Jensen and Buhler 2002). Developed for Pixar’s Renderman renderer, Tomson (2003) describes the crucial factors that needed to be taken into consideration during development:
Mathematical Scattering Model Total illumination due to subsurface scattering was calculated for each point P with normal N by summing the contributions of irradiance from surrounding points on the surface (see Subsurface Scattering Explained for a more detailed explanation on this). Tomson (2003) represents this with the following formula: Subsurf(P, N) = S AiI(Pi, Ni)T(P, Pi)B(P, Pi, N, Ni) Where Ai is the area represented by a sample, I(Pi, Ni) is the diffuse contribution at Pi (where Pi is a point being sampled) and T(P, Pi) is the attenuation through the material from Pi to P. B is the bounce attenuation which will be discussed later. In Jensen et al.‘s (2001) paper on subsurface light transport, he uses an absorption coefficient, a scattering coefficient, an extinction coefficient (the absorption coefficient plus the scattering coefficient) and a phase function to determine relatively physically accurate attenuation. In Tomson’s (2003) model, Renderman’s smoothstep function to calculate attenuation between the point being sampled (Pi) and the point being shaded (P). This is an approximation that would speed up render times, proves to be sufficiently accurate and ensures that light eventually becomes fully extinct rather than getting exponentially closer to zero. The full Renderman function call is listed below: T(P, Pi) = (1 - smoothstep(0, D, length(P – Pi)))/(3D 2 p/10) This model needs to take into account the fact that the area between the shading point and the sampling point may be air and not skin (when the portion of skin is concave). This is solved by including a bounce attenuation factor. Whether the area between a shading point and a sample point is air can be determined if:
Figure 1: This is a graphical representation of the Bounce Attneutation factor So bounce attenuation is defined by: B(P, N, Pi, Ni) = 1 - (1 – N.Ni)(1 – N.L)/2 Where P and Pi are the point being shaded and the sample point respectively and N and Ni are their respective normals. L is the vector pointing from the sampling point to the point being shaded. The total illumination due to subsurface scattering is calculated and stored in a point cloud file. Figure 2:The image on the left is subsurface scattering without Bounce Attneuation being taken into account. You can see that the area about the eyelid is incorrectly illuminated. Calculating the Scattering The point cloud of irradiance samples generated is then used to build an octree of irradiance samples. For each point on a surface, the samples that contribute to illuminance due to subsurface scattering are determined by traversing the octree and accumulating the illumination from sample points with a distance from the point being shaded less than or equal to a predefined value D (again this is discussed in more detail in Subsurface Scattering Explained). In this implementation, this is all computed by a Renderman C++ DSO (Dynamic Shared Object). On The Fly Irradiance Cache On the fly irradiance cache is implemented in this model to ensure integration with lighting. By caching the radiance on the fly, a lighting technical director can change light parameters and render the results out without having to regenerate the scatter map. Again this is accomplished in the Renderman DSO and I will not go into technical details. |