Relationship between roughness and BRDF 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?
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.