<p>Most normal distribution functions (NDFs) are parametrized by some variable (tipically $m$ or $\alpha$) that determines the "roughness" or "spikiness" of the NDF (this is often meant to be the rms slope of the surface).</p>

<p>Here is an example of how a roughness parameter effects an NDF: <a href="https://www.desmos.com/calculator/kcevxp3wm0" rel="nofollow noreferrer">https://www.desmos.com/calculator/kcevxp3wm0</a></p>

<p>we can think of the NDF as a function of the direction as well as of the roughness value (as in $D(\theta,\phi,m)$. Here, $\phi$ and $\theta$ were used to represent spherical coordinates for the microsurface normal direction).</p>

<p>A roughness map can also be thought of as a function: one that returns a value for $m$ for every point $p$ on a surface. Hence, $m(p)$.</p>

<p>Since $m$ is an argument of the NDF we can write the previous expression like this: $D(\theta,\phi,m(p))$</p>

<p>And, because $m(p)$ may be different for every $p$ but stays fixed when we only vary $\phi$ and $\theta$, we effectively get a whole different NDF on every point on the surface.</p>

CC BY-SA 3.0
2018-02-13T09:35:15.517Z
So literally the roughness map is the distribution parameters per point. Is that correct?
user8469759
CC BY-SA 3.0
2018-02-13T16:20:47.560Z
That is correct.
Sebastián Mestre
CC BY-SA 3.0
2018-02-13T07:36:47.343Z
2018-02-13T07:36:47.343Z
Sebastián Mestre
<blockquote>
  <p>for each point $p$ in theory we have a 3D function that tells us the orientation in a given direction</p>
</blockquote>

<p>You have missunderstood this. $D$ is a Normal <em>Distribution</em> Function (or short NDF), so it doesn't really give you a single normal, but a distribution. In a (specular) BRDF you are always using the normal that is the half vector between the incoming and outgoing light, since via your theory, every microfacet is a perfect mirror and thus every microfacet reflects light exactly along the (micro) surface and that one only.</p>

<p>You also must not confuse <em>roughness</em> with <em>microfacet normal</em>. The roughness is a more or less arbitrary value (and a scalar, so a single one at that). The roughness is being used differently, depending on the overall BRDF (e.g. roughness in GGX(/Trowbridge-Reitz) is different from the Roughness in Oren-Nayar) and therefore can have different ranges. Still, if you look at one specific NDF, you will see, how the roughness is used.</p>

<p>$D(\omega_m) = \frac{\alpha^2}{\pi((\omega_n \cdot \omega_m)^2 (\alpha^2-1)+1)^2}$</p>

<p>with $\alpha = roughness^2$ (a common remapping), $\omega_m$ is the microfacet normal, $\omega_n$ is the geometry normal.</p>

<p>You can see here, that the roughness is being treated like a single value. The higher the roughness is, the more random your microfacets (or normals thereof) are distributed. The more that happens, the less your surface will reflect light concentrated into the same direction (i.e. the less highlights you will have). Thus, your material is more diffuse.</p>

<p>Since now your roughness is a single value, the map makes sense to have only values in $\left[0, 1\right]$ and therefore is a gray scale image.</p>

CC BY-SA 3.0
2018-02-13T09:34:26.557Z
I don't think I've misunderstood the meaning of $D$. According to the original paper written by torrance, the microfacets distribution $D$ quantify the amount of microfacets that would reflect the the light coming from a direction into another. Isn't that what it is?
user8469759
CC BY-SA 3.0
2018-02-13T09:43:02.467Z
Not as in total numbers, but essentially, yes. Your wording/question structure made me assume you got it wrong.
Tare
CC BY-SA 3.0
2018-02-13T09:48:21.610Z
Not as in total, but in percentage yes (it's a distribution function, in sense of probability but built upon the number of microfacets facing the halfway vector between incident light and reflection direction.
user8469759
CC BY-SA 3.0
2018-02-13T07:34:05.740Z
2018-02-13T07:34:05.740Z
Tare
<p>In a BRDF $f_r$, assume Cook-Torrance model, we have a microfacets distribution $D$. This distribution essentially models the rougheness of the material as far as I've understood. Given a direction $v$ it models the amount of microfacets having that orientation.</p>

<p>Now say we have a material, for each point $p$ in theory we have a 3D function that tell us the orientation in a given direction.</p>

<p>This explantion (not detailed) makes sense to me, however when I read about the roughness map what I see is that it's a kind of texture where each pixel has values between 0 and 1 (from black to white) I do struggle to understand the relationship between this map and the microfacets distribution.</p>

<p>Could anyone clarify?</p>

<shader><brdf><distribution><microfacet>
Relationship between roughness and BRDF
user8469759
# Relationship between roughness and BRDF

(Asked by: username_0 on 2018-02-12)

In a BRDF $f\_r$, assume Cook-Torrance model, we have a microfacets distribution $D$. This distribution essentially models the rougheness of the material as far as I've understood. Given a direction $v$ it models the amount of microfacets having that orientation.

Now say we have a material, for each point $p$ in theory we have a 3D function that tell us the orientation in a given direction.

This explantion (not detailed) makes sense to me, however when I read about the roughness map what I see is that it's a kind of texture where each pixel has values between 0 and 1 (from black to white) I do struggle to understand the relationship between this map and the microfacets distribution.

Could anyone clarify?

**Tags:** shader, brdf, distribution, microfacet


---

## 2 answers

### Answer by username_1 on 2018-02-13. Score: 3 | Accepted answer

Most normal distribution functions (NDFs) are parametrized by some variable (tipically $m$ or $\alpha$) that determines the "roughness" or "spikiness" of the NDF (this is often meant to be the rms slope of the surface).

Here is an example of how a roughness parameter effects an NDF: <https://www.desmos.com/calculator/kcevxp3wm0>

we can think of the NDF as a function of the direction as well as of the roughness value (as in $D(\theta,\phi,m)$. Here, $\phi$ and $\theta$ were used to represent spherical coordinates for the microsurface normal direction).

A roughness map can also be thought of as a function: one that returns a value for $m$ for every point $p$ on a surface. Hence, $m(p)$.

Since $m$ is an argument of the NDF we can write the previous expression like this: $D(\theta,\phi,m(p))$

And, because $m(p)$ may be different for every $p$ but stays fixed when we only vary $\phi$ and $\theta$, we effectively get a whole different NDF on every point on the surface.

> **Comments:**
> **username_0**: So literally the roughness map is the distribution parameters per point. Is that correct?  
> **username_1**: That is correct.  

---

### Answer by username_2 on 2018-02-13. Score: 2

> for each point $p$ in theory we have a 3D function that tells us the orientation in a given direction

You have missunderstood this. $D$ is a Normal *Distribution* Function (or short NDF), so it doesn't really give you a single normal, but a distribution. In a (specular) BRDF you are always using the normal that is the half vector between the incoming and outgoing light, since via your theory, every microfacet is a perfect mirror and thus every microfacet reflects light exactly along the (micro) surface and that one only.

You also must not confuse *roughness* with *microfacet normal*. The roughness is a more or less arbitrary value (and a scalar, so a single one at that). The roughness is being used differently, depending on the overall BRDF (e.g. roughness in GGX(/Trowbridge-Reitz) is different from the Roughness in Oren-Nayar) and therefore can have different ranges. Still, if you look at one specific NDF, you will see, how the roughness is used.

$D(\omega\_m) = \frac{\alpha^2}{\pi((\omega\_n \cdot \omega\_m)^2 (\alpha^2-1)+1)^2}$

with $\alpha = roughness^2$ (a common remapping), $\omega\_m$ is the microfacet normal, $\omega\_n$ is the geometry normal.

You can see here, that the roughness is being treated like a single value. The higher the roughness is, the more random your microfacets (or normals thereof) are distributed. The more that happens, the less your surface will reflect light concentrated into the same direction (i.e. the less highlights you will have). Thus, your material is more diffuse.

Since now your roughness is a single value, the map makes sense to have only values in $\left[0, 1\right]$ and therefore is a gray scale image.

> **Comments:**
> **username_0**: I don't think I've misunderstood the meaning of $D$. According to the original paper written by torrance, the microfacets distribution $D$ quantify the amount of microfacets that would reflect the the light coming from a direction into another. Isn't that what it is?  
> **username_2**: Not as in total numbers, but essentially, yes. Your wording/question structure made me assume you got it wrong.  
> **username_0**: Not as in total, but in percentage yes (it's a distribution function, in sense of probability but built upon the number of microfacets facing the halfway vector between incident light and reflection direction.  

---

