Blender

BSSRDF in Mitsuba, PBRT and Cycles(Blender)

Rendering translucent materials using Monte Carlo method is computationally
expensive because there are lot of subsurface scattering events.
For fast approach, There are some implementations using the BSSRDF[1].
I will introduce the calculation methods in Mitsuba, PBRT and Cycles(in Blender).
Every renderer is based on the Dipole model [1]. Dipole model assumes that virtual
two lights explain scattering events.

Common items

$\sigma_a, \sigma_s$ : Absorption and scattering coefficients of medium.

$\sigma_t,\ albedo$ : Another way to explain subsurface scattering
These parameters are mutually exclusive with $\sigma_a$ and $\sigma_s$.
In Mitsuba, $\sigma_t$ and $albedo$ are used.
In PBRT, $mfp = 1/\sigma_t$ and $Kd = albedo$ are used.(This is only true under $\sigma_s $>>$ \sigma_t$.)

$IOR$ : Index of refraction

Mitsuba

I wrote this part with reference to the official document(http://www.mitsuba-renderer.org/docs.html)

Sampling strategy

For each dipole instance in the scene, Mitsuba computes the irradiance on a large set of sample positions spread
uniformly over the surface in question. Later during rendering, these illumination samples are convolved with
the diffusion profile using a fast hierarchical technique proposed by Jensen and Buhler[2].

Parameters setting

There are three setting methods. ①~③ are independent of each other. Parameters are decided
by one of them.

①Material name
Material names are defined on the basis of Jensen et al.[1] and Narasima et al.[3]
You can get material names from the official document p.106(http://www.mitsuba-renderer.org/docs.html)

    <shape type="...">
        <subsurface type="dipole">
            <float name="intIOR" value="1.3"/>
            <float name="extIOR" value="1.0"/>
            <string name="material" value="Apple"/>
        </subsurface>
        <bsdf type="plastic">
            <float name="intIOR" value="1.3"/>
            <float name="extIOR" value="1.0"/>
            <spectrum name="diffuseReflectance" value="0"/>
        </bsdf>
    </shape>

②$\sigma_a$ and $\sigma_s$

    <shape type="...">
        <subsurface type="dipole">
            <float name="intIOR" value="1.3"/>
            <float name="extIOR" value="1.0"/>
            <rgb name="sigmaS" value="2.0, 2.0, 2.0"/>
            <rgb name="sigmaA" value="0.0, 0.0, 0.0"/>
        </subsurface>
        <bsdf type="plastic">
            <float name="intIOR" value="1.3"/>
            <float name="extIOR" value="1.0"/>
            <spectrum name="diffuseReflectance" value="0"/>
        </bsdf>
    </shape>

③$\sigma_t$ and $albedo$

    <shape type="...">
        <subsurface type="dipole">
            <float name="intIOR" value="1.3"/>
            <float name="extIOR" value="1.0"/>
           <rgb name="sigmaT" value="2.0 2.0 2.0"/>
            <rgb name="albedo" value="1.0 1.0 1.0"/> 
        </subsurface>
        <bsdf type="plastic">
            <float name="intIOR" value="1.3"/>
            <float name="extIOR" value="1.0"/>
            <spectrum name="diffuseReflectance" value="0"/>
        </bsdf>
    </shape>

Remark

・Scale
This is particularly useful when the scene is not measured in mm and the coefficients need to be scaled accordingly. For example, if the scene is modeled in meters, then a scale factor of 0.001 would be appropriate.

<float name="scale" value="0.001"/> 

・IOR
Because the "dipole" method is responsible for all scattering events, the surface scattering model should only account for specular reflection due to IOR.

PBRT

I wrote this part with reference to the official page(http://www.pbrt.org/fileformat-v3.html)

Sampling strategy

PBRT samples random lines between two points on a sphere and checks intersection the lines and the scene. The size of the sphere is varied based on the BSSRDF function, which gives us a method to sample points on nearby surfaces within a certain distance.
On a steep slope, the method which sample lines along normal axis may fail to sample points. As a solution PBRT uses MIS in three axes sample[4].

Parameters setting

There are three setting methods. ①~③ are independent of each other. Parameters are decided
by one of them.

①Material name
Material names are defined on the basis of Jensen et al.[1] and Narasima et al.[3]
You can get material names from the file (https://github.com/mmp/pbrt-v3/blob/master/src/core/medium.cpp)

MakeNamedMaterial "hoge"
 "string type" [ "subsurface" ]
 "string name" [ "Apple" ] 
 "float eta" [ 1.3 ]
...
 AttributeBegin
    NamedMaterial "hoge"
    Shape "..."
... 
 AttributeEnd

②$\sigma_a$ and $\sigma_s$

MakeNamedMaterial "hoge"
 "string type" [ "subsurface" ]
 "rgb sigma_a" [ 0.000000 0.000000 0.000000 ] 
 "rgb sigma_s" [ 2.000000 2.000000 2.000000 ]
 "float eta" [ 1.3 ]
...
 AttributeBegin
    NamedMaterial "hoge"
    Shape "..."
... 
 AttributeEnd

③$mfp$ and $Kd$

MakeNamedMaterial "hoge" 
"string type" [ "kdsubsurface" ] 
"rgb mfp" [ 0.500000 0.500000 0.500000 ] 
"rgb Kd" [ 1.000000 1.000000 1.000000 ] 
"float eta" [ 1.3 ]
...
 AttributeBegin
    NamedMaterial "hoge"
    Shape "..."
... 
 AttributeEnd

Remark

The roles of Scale and IOR are almost same as in Mitsuba, but there is remark.
・Scale
Only "subsurface"(① and ②) has "Scale". If the scene is modeled in meters, please add following in the material definition.

"float scale" [ 0.001 ]

・IOR(= eta)
In "subsurface", the default value is 1.33.
In "kdsubsurface", it is 1.3.
If you want to compare two methods, you have to make the two values equal.

Cycles

I wrote this part with reference to the official page(https://wiki.blender.org/index.php/Dev:Source/Render/Cycles/Subsurface_Scattering and https://docs.blender.org/manual/en/dev/render/cycles/nodes/types/shaders/sss.html)

Sampling strategy

Cycles's sampling strategy is similar to PBRT's method. Instead of MIS, Cycles takes more line samples until lines hit a surface.

Parameters setting

Unlike the other two renderers, Cycles has only one method which is similar to Mitsuba ③ and PBRT ③.

①$Color, Scale, Radius$
$Color$ corresponds to $albedo$(in Mitsuba) and $Kd$(in PBRT).
$Scale$ corresponds to $scale$(in Mistuba and PBRT).
$Radius$ is similar to $1/\sigma_t$(in Mitsuba) and $mfp$(in PBRT), but $Radius$ limits maximum distance that light can scatter.
cycles.png

Remark

・IOR
The internal IOR value is fixed to 1.3.

Example result

I compared the results with the same scene situation in each renderer.
Cycles adds ambient light by default. I turned it off to compare with other renderers.(https://blender.stackexchange.com/questions/5678/where-does-light-come-from-in-a-cycles-scene-without-lamps)
Cycles fixes material IOR to 1.3. I made other renderes material IOR 1.3.
As mentioned in "common items", $mfp = 1/\sigma_t$ and $Kd = albedo$ is only true under the scene
which has a lot of scattering events, so I limited the following situation.

①Material name

 
Mitsuba ① Apple 64spp

PBRT ① Apple 1024spp

②$\sigma_s$ and $\sigma_a$

 
Mitsuba ② "sigmaS"="2.0, 2.0, 2.0" "sigmaA"="0.0, 0.0, 0.0" 64spp

PBRT ② "sigmaS"="2.0, 2.0, 2.0" "sigmaA"="0.0, 0.0, 0.0" 1024spp

③$\sigma_t$ and $albedo$

 
Mitsuba ③ "sigmaT"="2.0, 2.0, 2.0" "albedo"="1.0, 1.0, 1.0" 64spp

PBRT ③ "mfp"="0.5, 0.5, 0.5" "Kd"="1.0, 1.0, 1.0" 1024spp

Cycles ① "Radius"="0.5, 0.5, 0.5" "Color"="1.0, 1.0, 1.0" 1024spp

$Radius$ limits maximum distance that light can scatter in Cycles, so the result is dark.

[1] Jensen, H. W., Marschner, S. R., Levoy, M., and Hanrahan, P. A practical model for subsurface light transport. In Proceedings ofthe 28th annual conference on Computer graphics and interactive techniques (New York, NY, USA, 2001), SIGGRAPH ’01, ACM, pp. 511–518.
[2] Jensen, H. W., and Buhler, J. A rapid hierarchical rendering technique for translucent materials. In ACM SIGGRAPH2005 Courses (New York, NY, USA, 2005), SIGGRAPH ’05, ACM.
[3] Narasimhan, S. G., Gupta, M., Donner, C., Ramamoorthi, R., Nayar, S. K., and Jensen, H. W. Acquiring scattering properties of participating media by dilution. ACM Trans. Graph. 25, 3 (July 2006), 1003–1012.
[4] King A, Kulla C, Conty A, Fajardo M. BSSRDF importance sampling. InACM SIGGRAPH 2013 Talks 2013 Jul 21 (p. 48). ACM.