<p>The heading row of Figure 5(b) says that the units of <span class="math-container">$\sigma_s'$</span> and <span class="math-container">$\sigma_a$</span> are inverse millimetres, that is, inverse distance. Hence, <span class="math-container">$1/\sigma_t'$</span> has units of distance.</p>

<p>If you send a beam of photons through a medium with scattering coefficient <span class="math-container">$\sigma$</span> and measure it at distance <span class="math-container">$l$</span>, then the probability that a photon has made it that far without being scattered is <span class="math-container">$e^{-\sigma l}$</span>. Since <span class="math-container">$l$</span> has units of distance, <span class="math-container">$\sigma$</span> must have units of inverse distance.</p>

CC BY-SA 4.0
2019-05-09T07:02:52.477Z
2019-05-09T07:02:52.477Z
Pseudonym
<p>I am currently trying to implement <a href="https://graphics.stanford.edu/papers/bssrdf/bssrdf.pdf" rel="nofollow noreferrer">Jensen's paper on subsurface scattering</a>, but I am getting confused when I am trying to implement it in my pathtracer. I have questions about the data types of certain variables.</p>

<ol>
<li>On page 3, <span class="math-container">$z_r$</span> is defined as <span class="math-container">$1 / \sigma_t'$</span>, where <span class="math-container">$\sigma_t' = \sigma_s' + \sigma_a$</span>. Based on Figure 5, <span class="math-container">$\sigma_s'$</span> and <span class="math-container">$\sigma_a$</span> are RGB values, which are <code>Spectrum</code> types in my pathtracer. However, <span class="math-container">$z_r$</span> is expected to be a distance above the surface, which I presume must be a float, not a <code>Spectrum</code>. How do I handle this discrepancy? Does each RGB wavelength have its own <span class="math-container">$z_r$</span>?</li>
<li>There is a similar issue in the single scattering term in section 4. <span class="math-container">$s_o'$</span> is a distance along the refracted outgoing ray, which is presumably a float. However, the formula for this term uses <span class="math-container">$\sigma_t$</span>, which is a <code>Spectrum</code>.</li>
<li>What about <span class="math-container">$\sigma_{tr}$</span>? This value is <span class="math-container">$\sqrt{3\sigma_a\sigma_t'}$</span>. Is this also a <code>Spectrum</code> or a float?</li>
</ol>

<c++><brdf><subsurface-scattering>
Confusion about data types in Jensen's subsurface scattering paper
dwang733
# Confusion about data types in Jensen's subsurface scattering paper

(Asked by: username_0 on 2019-05-09)

I am currently trying to implement [Jensen's paper on subsurface scattering](https://graphics.stanford.edu/papers/bssrdf/bssrdf.pdf), but I am getting confused when I am trying to implement it in my pathtracer. I have questions about the data types of certain variables.

1. On page 3, $z\_r$ is defined as $1 / \sigma\_t'$, where $\sigma\_t' = \sigma\_s' + \sigma\_a$. Based on Figure 5, $\sigma\_s'$ and $\sigma\_a$ are RGB values, which are `Spectrum` types in my pathtracer. However, $z\_r$ is expected to be a distance above the surface, which I presume must be a float, not a `Spectrum`. How do I handle this discrepancy? Does each RGB wavelength have its own $z\_r$?
2. There is a similar issue in the single scattering term in section 4. $s\_o'$ is a distance along the refracted outgoing ray, which is presumably a float. However, the formula for this term uses $\sigma\_t$, which is a `Spectrum`.
3. What about $\sigma\_{tr}$? This value is $\sqrt{3\sigma\_a\sigma\_t'}$. Is this also a `Spectrum` or a float?

**Tags:** c++, brdf, subsurface-scattering


---

## 1 answers

### Answer by username_1 on 2019-05-09. Score: 2

The heading row of Figure 5(b) says that the units of $\sigma\_s'$ and $\sigma\_a$ are inverse millimetres, that is, inverse distance. Hence, $1/\sigma\_t'$ has units of distance.

If you send a beam of photons through a medium with scattering coefficient $\sigma$ and measure it at distance $l$, then the probability that a photon has made it that far without being scattered is $e^{-\sigma l}$. Since $l$ has units of distance, $\sigma$ must have units of inverse distance.


---

