# What is slope distribution

I was reading this slope space integral paper. Can anyone help to explain slope space and slope distribution mentioned in this paper, and why we can use normal and half vector to represent 2D positions in slope space? Thanks!

If we have a vector in the upper hemisphere in tangent space, $$(x, y, z)$$ with $$z > 0$$, then the slopes of the vector are $$(\tilde x, \tilde y) = (-x/z, -y/z)$$. These values are the slopes (derivatives), along $$x$$ and $$y$$, of a surface that is normal to the given vector. See also equation (4) in the paper, which is the conversion back and forth between slopes and vectors.

The 2D space of slope values is called "slope space". It is an unbounded space, so any $$(\tilde x, \tilde y)$$ point represents a valid vector in tangent space (such as a microfacet normal). Geometrically, you can picture it like the intersection of the vector with the $$z = 1$$ plane. It produces an invertible, one-to-one mapping (bijection) between the upper hemisphere and the plane.

Slope space is often used in microfacet BRDF theory because of its desirable properties. Since it is unbounded, it can be more convenient to define functions and do mathematics in slope space than in spherical coordinates, or directly on the normals. Geometric transformations on the microfacet surface, such as scaling and shearing, have straightforward expressions in slope space. The most common NDFs, Beckmann and GGX, also have a simpler expressions in slope space: Beckmann is a Gaussian distribution in slope space, while GGX is a Student's t-distribution in slope space.

Edit: I wrote a more in-depth blog post on this topic in case more explanation is needed.

• Why is the slopes of the vector are (𝑥̃ ,𝑦̃ )=(−𝑥/𝑧,−𝑦/𝑧)? Any material that I can read about or any pictures to demonstrate this? – SSS Jul 7 at 0:23
• @SSS Consider a plane equation $Ax + By + Cz = 0$ where $(A, B, C)$ is the normal vector to the plane. Write $z$ as a function of $x, y$: $z = (-Ax - By) / C$. Then calculate $\partial z / \partial x$ and you can see it's $-A/C$, similarly $\partial z / \partial y$ gives $-B/C$. – Nathan Reed Jul 7 at 0:32
• @SSS See slide 17 in this presentation for example: wiki.tizen.org/images/0/0c/Chapter_11%28Normal_mapping%29.pdf – Nathan Reed Jul 7 at 0:56
• The slopes are cartesian coordinates on that plane. – Nathan Reed Jul 7 at 2:05
• @SSS I added a diagram and a link to a blog I wrote with more in depth explanation. – Nathan Reed Jul 17 at 16:59