<p>The units of the NDF are tricky. For whatever it's worth, Heitz's convention of defining it relative to a 1 m² reference geometric surface is unusual, and although I can see why he would want to define it that way for conceptual simplicity, it does not really match how NDFs are used in practice. I definitely had a head-tilt moment when I first read that passage in his paper.</p>
<p>The problem with NDFs is that they involve two different area measures: a macrosurface (or &quot;geometric&quot;) area and a microsurface area. As far as I understand, the true and complete definition of the units of the NDF is:</p>
<p><span class="math-container">$$
\frac{\text{micro area}}{\text{solid angle} \cdot \text{macro area}}
$$</span></p>
<p>In other words, if we <em>double</em>-integrate the NDF over a region of solid angle <span class="math-container">$\Omega$</span> and a region of macrosurface <span class="math-container">$A$</span>, we obtain the area of the microsurface that has normals within that region of solid angle:</p>
<p><span class="math-container">$$
\int_\Omega \int_A D(\omega)\,dA\,d\omega  = \text{total area of microfacets above $A$ with normals in $\Omega$}
$$</span></p>
<p>Note that this is dimensionally consistent, even maintaining the distinction between the two area measures. The <span class="math-container">$dA$</span> is an element of macro area, and <span class="math-container">$d\omega$</span> an element of solid angle, so those cancel out the denominator of <span class="math-container">$D(\omega)$</span>. The numerator is then micro area, which matches the right hand side.</p>
<p>Now if we forget the distinction between these two area measures and cancel the area units against each other, we obtain just <span class="math-container">$1/\text{sr}$</span>, which is consistent with the vast majority of literature. But there is a subtlety here. <em>Usually</em>, when we see a distribution that has the units of <span class="math-container">$1/\text{sr}$</span>, this means it's a distribution over the sphere and that if you integrate it over the sphere you should get 1. But note that if you integrate the NDF over the sphere, you don't in general get 1. Instead, as the above definition shows, you get the overall ratio of micro area to macro area. For a rough surface, this is greater than 1 (and the rougher it is, the larger the value), as the microsurface is crinkly and rough and therefore has more area than the corresponding macrosurface.</p>
<p>The correct normalization condition for an NDF is
<span class="math-container">$$
\int_{S^2} D(\omega) (n \cdot \omega) \, d\omega = 1
$$</span>
(as can be readily verified if you take any of the usual NDF formulas, set a nonzero roughness, and try numerically integrating it—they don't come out to 1 unless you use the above integrand).</p>
<p>The reason for the <span class="math-container">$(n \cdot \omega)$</span> factor in the integrand is to convert microsurface area into the corresponding (projected) macrosurface area. In other words, this factor has the units:
<span class="math-container">$$
n \cdot \omega = \frac{\text{macro area}}{\text{micro area}}
$$</span>
With this, the area units of the NDF really do cancel properly and you're left with a true spherical distribution that integrates to 1.</p>
<hr />
<p>Now why does Heitz say something different? He wants to eliminate the &quot;macro area&quot; factor by setting it to a standardized value of 1 m², then defining the NDF as simply <span class="math-container">$\text{micro area}/\text{solid angle}$</span>. Thus its units become <span class="math-container">$\text{m}^2 / \text{sr}$</span>, and the normalization condition becomes
<span class="math-container">$$
\int_{S^2} D(\omega) (n \cdot \omega) \, d\omega = 1\ \text{m}^2
$$</span>
(cf. equation (9) in the paper). It's no longer a dimensionless scalar 1, but an area of 1 square meter.</p>
<p>I don't love this definition. On the one hand, it does make it really explicit that an NDF involves area &quot;somehow&quot;, and isn't simply a spherical distribution. It avoids the somewhat bizarre situation of having two area measures whose <em>units</em> cancel, but whose <em>values</em> don't cancel. On the other hand, in real life we obviously don't apply NDFs only to flat surfaces of 1 m². We want to apply NDFs to surface patches of any size we like—such as the patch enclosed in a pixel when rendering. The obvious way to do that is by normalizing out the 1 m², so that the NDF is expressed as a fractional area relative to any desired patch size. And then you get back to the definition I stated at the beginning of this answer.</p>
<p>Indeed, even Heitz isn't really consistent with this choice, as you noted. Starting from equation (14) in the paper, he drops the implicit 1 m² factors that ought to be there. When he proceeds to define the distribution of visible normals, <span class="math-container">$D_{\omega_o}(\omega_m)$</span>, he no longer says that the units are <span class="math-container">$\text{m}^2/\text{sr}$</span>, but just the usual <span class="math-container">$1/\text{sr}$</span> (cf. Table 2 in the paper).</p>
<p>To be fair, Heitz's distribution of visible normals is defined in such a way that it is a legitimate spherical distribution by itself, with the usual normalization condition:
<span class="math-container">$$
\int_{S^2} D_{\omega_o}(\omega_m) \, d\omega_m = 1
$$</span>
(cf. equation (18) in the paper), so it is no longer necessary to think about some hidden area units in order to understand the meaning of this function.</p>
<p>Arguably BRDFs and NDFs <em>should</em> have been defined this way as well all along, incorporating the <span class="math-container">$(n \cdot \omega)$</span> factor into the function, so that they would be legitimate spherical distributions and we could avoid all this hassle. Sadly, due to historical path-dependence we didn't end up there.</p>
<p>So, to sum up, the oddities of the NDF have their origin in the (IMO under-appreciated and under-explained) fact that it has two different area measures hiding in it. If you just look at the units, they appear to cancel out, but nevertheless you need to keep the areas in mind in order to understand NDFs properly.</p>

CC BY-SA 4.0
2021-11-09T06:18:10.130Z
2021-11-09T06:18:10.130Z
Nathan Reed
<p>Please do not confuse this question with <a href="https://computergraphics.stackexchange.com/questions/2267/why-does-the-integral-of-ndf-over-a-solid-angle-equals-the-area-where-micronorma">this one</a>. In <a href="https://jcgt.org/published/0003/02/03/paper.pdf" rel="nofollow noreferrer">Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs</a>, Eric Heitz defines the distribution of normals as.</p>
<p><a href="https://i.sstatic.net/zgYQM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/zgYQM.png" alt="Definition of D" /></a></p>
<p><strong>There, the footnote.</strong> Even the footnote description is confusing &quot;per square meter of the geometric surface&quot; and then it is in the numerator. <strong>Everyone else, before and after this well-cited paper still persists that the distribution is <span class="math-container">$1/\mathbf{sr}$</span></strong>, which creates different issues with their math resolved through sketchy corrective expressions and language. With some people avoiding the subject with intentionally unclear language (PBR book).</p>
<p><strong>I can buy the argument and the definition, but the author handwaves the notion of said area everywhere.</strong> Even defines the surface as being 1 meter squared to justify relegating it to a cosine normalization factor. In no capacity does <span class="math-container">$dA$</span> come up which implicitly makes all the equations result in radiant intensity, not radiance. <strong>(I know the author says it's projected area, but a cosine alone is not projected area, making the area implicit is a cop out at the lack of area to cancel out because it's supposedly encoded by <span class="math-container">$D$</span>)</strong>.</p>
<p>On the third side of the fence, Matt Pharr can't decide which side he's on, adding in murky <span class="math-container">$dA$</span> in the derivation of the Torrance-Sparrow microfacet model, to cancel it out. He also suggests one needs to use the projected solid angle while proving normalization, while nobody else does.</p>
<p>Who is right? I am beyond confused and frustrated at this point.</p>

CC BY-SA 4.0
2021-11-03T17:46:34.963Z
Does this article help? https://www.reedbeta.com/blog/hows-the-ndf-really-defined/
Nathan Reed
CC BY-SA 4.0
2021-11-04T23:03:26.043Z
While I understand your frustration to some extent, you cannot simply assume bad faith from these well-respected authors just because you do not understand something. As is, your post is demeaning and does not encourage us to solve your problem at all. Please consider rewording your question to remain objective.
Hubble
CC BY-SA 4.0
2021-11-08T09:00:46.890Z
I hope the link that Nathan Reed gave you could solve your problem. As @Hubble already said, your words are a bit harsh and you should rephrase your question to be more neutral towards the author of the book.
wychmaster
<mathematics><brdf><pbr><microfacet><pbrt>
Conflicting definitions for the distribution of normals $D$ in microfacet BSDFs
GroundGlassUnknown
# Conflicting definitions for the distribution of normals $D$ in microfacet BSDFs

(Asked by: username_0 on 2021-11-03)

Please do not confuse this question with [this one](https://computergraphics.stackexchange.com/questions/2267/why-does-the-integral-of-ndf-over-a-solid-angle-equals-the-area-where-micronorma). In [Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs](https://jcgt.org/published/0003/02/03/paper.pdf), Eric Heitz defines the distribution of normals as.

[![Definition of D](https://i.sstatic.net/zgYQM.png)](https://i.sstatic.net/zgYQM.png)

**There, the footnote.** Even the footnote description is confusing "per square meter of the geometric surface" and then it is in the numerator. **Everyone else, before and after this well-cited paper still persists that the distribution is $1/\mathbf{sr}$**, which creates different issues with their math resolved through sketchy corrective expressions and language. With some people avoiding the subject with intentionally unclear language (PBR book).

**I can buy the argument and the definition, but the author handwaves the notion of said area everywhere.** Even defines the surface as being 1 meter squared to justify relegating it to a cosine normalization factor. In no capacity does $dA$ come up which implicitly makes all the equations result in radiant intensity, not radiance. **(I know the author says it's projected area, but a cosine alone is not projected area, making the area implicit is a cop out at the lack of area to cancel out because it's supposedly encoded by $D$)**.

On the third side of the fence, Matt Pharr can't decide which side he's on, adding in murky $dA$ in the derivation of the Torrance-Sparrow microfacet model, to cancel it out. He also suggests one needs to use the projected solid angle while proving normalization, while nobody else does.

Who is right? I am beyond confused and frustrated at this point.

**Tags:** mathematics, brdf, pbr, microfacet, pbrt

> **Comments:**
> **username_1**: Does this article help? https://www.reedbeta.com/blog/hows-the-ndf-really-defined/  
> **username_2**: While I understand your frustration to some extent, you cannot simply assume bad faith from these well-respected authors just because you do not understand something. As is, your post is demeaning and does not encourage us to solve your problem at all. Please consider rewording your question to remain objective.  
> **username_3**: I hope the link that username_1 username_1 gave you could solve your problem. As @username_2 already said, your words are a bit harsh and you should rephrase your question to be more neutral towards the author of the book.  

---

## 1 answers

### Answer by username_1 on 2021-11-09. Score: 3

The units of the NDF are tricky. For whatever it's worth, Heitz's convention of defining it relative to a 1 m² reference geometric surface is unusual, and although I can see why he would want to define it that way for conceptual simplicity, it does not really match how NDFs are used in practice. I definitely had a head-tilt moment when I first read that passage in his paper.

The problem with NDFs is that they involve two different area measures: a macrosurface (or "geometric") area and a microsurface area. As far as I understand, the true and complete definition of the units of the NDF is:

$$
\frac{\text{micro area}}{\text{solid angle} \cdot \text{macro area}}
$$

In other words, if we *double*-integrate the NDF over a region of solid angle $\Omega$ and a region of macrosurface $A$, we obtain the area of the microsurface that has normals within that region of solid angle:

$$
\int\_\Omega \int\_A D(\omega)\,dA\,d\omega = \text{total area of microfacets above $A$ with normals in $\Omega$}
$$

Note that this is dimensionally consistent, even maintaining the distinction between the two area measures. The $dA$ is an element of macro area, and $d\omega$ an element of solid angle, so those cancel out the denominator of $D(\omega)$. The numerator is then micro area, which matches the right hand side.

Now if we forget the distinction between these two area measures and cancel the area units against each other, we obtain just $1/\text{sr}$, which is consistent with the vast majority of literature. But there is a subtlety here. *Usually*, when we see a distribution that has the units of $1/\text{sr}$, this means it's a distribution over the sphere and that if you integrate it over the sphere you should get 1. But note that if you integrate the NDF over the sphere, you don't in general get 1. Instead, as the above definition shows, you get the overall ratio of micro area to macro area. For a rough surface, this is greater than 1 (and the rougher it is, the larger the value), as the microsurface is crinkly and rough and therefore has more area than the corresponding macrosurface.

The correct normalization condition for an NDF is
$$
\int\_{S^2} D(\omega) (n \cdot \omega) \, d\omega = 1
$$
(as can be readily verified if you take any of the usual NDF formulas, set a nonzero roughness, and try numerically integrating it—they don't come out to 1 unless you use the above integrand).

The reason for the $(n \cdot \omega)$ factor in the integrand is to convert microsurface area into the corresponding (projected) macrosurface area. In other words, this factor has the units:
$$
n \cdot \omega = \frac{\text{macro area}}{\text{micro area}}
$$
With this, the area units of the NDF really do cancel properly and you're left with a true spherical distribution that integrates to 1.

---

Now why does Heitz say something different? He wants to eliminate the "macro area" factor by setting it to a standardized value of 1 m², then defining the NDF as simply $\text{micro area}/\text{solid angle}$. Thus its units become $\text{m}^2 / \text{sr}$, and the normalization condition becomes
$$
\int\_{S^2} D(\omega) (n \cdot \omega) \, d\omega = 1\ \text{m}^2
$$
(cf. equation (9) in the paper). It's no longer a dimensionless scalar 1, but an area of 1 square meter.

I don't love this definition. On the one hand, it does make it really explicit that an NDF involves area "somehow", and isn't simply a spherical distribution. It avoids the somewhat bizarre situation of having two area measures whose *units* cancel, but whose *values* don't cancel. On the other hand, in real life we obviously don't apply NDFs only to flat surfaces of 1 m². We want to apply NDFs to surface patches of any size we like—such as the patch enclosed in a pixel when rendering. The obvious way to do that is by normalizing out the 1 m², so that the NDF is expressed as a fractional area relative to any desired patch size. And then you get back to the definition I stated at the beginning of this answer.

Indeed, even Heitz isn't really consistent with this choice, as you noted. Starting from equation (14) in the paper, he drops the implicit 1 m² factors that ought to be there. When he proceeds to define the distribution of visible normals, $D\_{\omega\_o}(\omega\_m)$, he no longer says that the units are $\text{m}^2/\text{sr}$, but just the usual $1/\text{sr}$ (cf. Table 2 in the paper).

To be fair, Heitz's distribution of visible normals is defined in such a way that it is a legitimate spherical distribution by itself, with the usual normalization condition:
$$
\int\_{S^2} D\_{\omega\_o}(\omega\_m) \, d\omega\_m = 1
$$
(cf. equation (18) in the paper), so it is no longer necessary to think about some hidden area units in order to understand the meaning of this function.

Arguably BRDFs and NDFs *should* have been defined this way as well all along, incorporating the $(n \cdot \omega)$ factor into the function, so that they would be legitimate spherical distributions and we could avoid all this hassle. Sadly, due to historical path-dependence we didn't end up there.

So, to sum up, the oddities of the NDF have their origin in the (IMO under-appreciated and under-explained) fact that it has two different area measures hiding in it. If you just look at the units, they appear to cancel out, but nevertheless you need to keep the areas in mind in order to understand NDFs properly.


---

