Here are some notes for the GGX paper "Microfacet Models for Refraction through Rough Surfaces". In this article, I will give derivations for some important equation in this paper.

 

Derivation for equation (8)

This equation tell us how to construct a macrosurface BRDF given microsurface 's D, G, F.

 

Notes for GGX paper

 

In this equation,

Notes for GGX paper is incident vector.

Notes for GGX paper is outgoing vector.

Notes for GGX paper is macrosurface normal.

Notes for GGX paper is microsurface normal.

Notes for GGX paper is the macrosurface BRDF.

Notes for GGX paper is the microsurface BRDF.

Notes for GGX paper is microfacet distribution function.

Notes for GGX paper is shadowing-masking function.

Notes for GGX paper is solid angle in the hemisphere Notes for GGX paper.

 

How can we get this equation? Please see the figure below.

In this figure, the surface is illuminated by a light source and an observer is looking at the surface. The observer has a microscope so that he will see the microfacets s1, s2, ... . These microfacets have different colors because of their orientations are different. When the observer look at the surface at the same location, but without the microscope, he will no longer see the microfacets but a uniform color. This time, he knows that it is colors from microfacets that mix together and form the uniform color. Let's denote the colors from microfacets as Notes for GGX paper and the uniform color as Notes for GGX paper. Then we have:

 

Notes for GGX paper

In this equation, Notes for GGX paper is the projected area of si . According to the definition of microfacet distribution function, we have:

Notes for GGX paper

In this equation,

Notes for GGX paper is the area of macrosurface.

Notes for GGX paper is i-th microfacet's normal.

Notes for GGX paper is a small solid angle aligned with Notes for GGX paper.

Notes for GGX paper is microfacet distribution function.

 

Combine these equations, we have:

Notes for GGX paper

We can eliminate Notes for GGX paper and using the equation (3) in the paper:

 
Notes for GGX paper

Convert sum to integral, then we get:

Notes for GGX paper

Now we can see the term Notes for GGX paper. Let's investigate the termNotes for GGX paper further:

Notes for GGX paper

In this equation,

Notes for GGX paper is a small solid angle of incident light over the hemisphere Notes for GGX paper.

Finally, we have:

Notes for GGX paper

According to the rendering equation

Notes for GGX paper

We can regard the inner integral Notes for GGX paper as the equivalent BRDF for macrosurface, so that we get:

Notes for GGX paper

 

Confirm equation (9)

According to the definition of radiance:

Notes for GGX paper

In this equation,

Notes for GGX paper is the radiance in outgoing direction Notes for GGX paper

Notes for GGX paper is luminous flux

Notes for GGX paper is area of macrofacet

So the outgoing irradiance is:

Notes for GGX paper

Put equation (9) in, we have:

Notes for GGX paper

According to equation (10),

Notes for GGX paper

So According to equation (9), the overall outgoing irradiance equals the incoming irradiance scaled by a factor Notes for GGX paper, which is less than 1.  

 

Derivation for equation (20)

According to equation (8),

Notes for GGX paper

 

Put equation (15) in it, we have:

Notes for GGX paper

When Notes for GGX paper , Notes for GGX paper, then according to equation (10), we have:

Notes for GGX paper

Derivation for equation (42)

Let us take a careful look at the definition of Notes for GGX paper.

Suppose there is one point Notes for GGX paper on surface whose normal is Notes for GGX paper, we construct a planeNotes for GGX paper perpendicular to the normal and choose two perpendicular axes Notes for GGX paper and Notes for GGX paper. For a small patch Notes for GGX paper on the plane, we denote the direction pointing from Notes for GGX paper to it Notes for GGX paper, and the small solid angle it occupies Notes for GGX paper.

According to equation (4), which is

Notes for GGX paper

We can consider Notes for GGX paper as the probability density Notes for GGX paper of finding a microfacet whose normal Notes for GGX paper is inside Notes for GGX paper , so that we have

Notes for GGX paper

That's exactly what Notes for GGX paper is.

Derivation for equation (45)

Break the ray into many short segments, each with projected length Notes for GGX paper. According to the paper, the probability that the ray is first blocked in segment Notes for GGX paper is Notes for GGX paper, so the probability that ray is always unblocked is:

Notes for GGX paper

Then we have:

Notes for GGX paper

From calculus we know:

Notes for GGX paper

So

Notes for GGX paper

So that

Notes for GGX paper

Derivation for equation (46)

Let's consider the situation that a ray intersects with an short and straight surface segment Notes for GGX paper. In order to do that, the surface height should below the ray at Notes for GGX paper and above the ray at Notes for GGX paper. For a given slope Notes for GGX paper, there exist a set of surface segments that fulfill this condition, which are in the shaded areas in the figures below.

It's easy to note that the possible surface height at Notes for GGX paper varies from Notes for GGX paper to Notes for GGX paper. So given a surface with slope Notes for GGX paper, the probability that it intersects with a ray Notes for GGX paper is

Notes for GGX paper

In this equation,

Notes for GGX paperis the probability density that surface height reaches Notes for GGX paper at point Notes for GGX paper.

 

Also we know that the probability that a surface segment has slope Notes for GGX paper is

Notes for GGX paper

Combine them, then we get the probability for finding a surface segment with slope Notes for GGX paper as well as intersecting with the ray:

Notes for GGX paper

Consider all possible surface slope Notes for GGX paper, the probability that they intersect with the ray is:

Notes for GGX paper

Among all surface segments with slope Notes for GGX paper, the probability that a surface segment below the ray is:

Notes for GGX paper

Consider all possible surface slope Notes for GGX paper, the probability that they below the ray is:

Notes for GGX paper

Assume Notes for GGX paper is independent from Notes for GGX paper, we have:

Notes for GGX paper

So the probability that a ray first intersects with surface in Notes for GGX paper is:

Notes for GGX paper

Let Notes for GGX paper, so

Notes for GGX paper

Derivation for equation (49)

From equation (48), we have:

Notes for GGX paper

Note that

Notes for GGX paper

So

Notes for GGX paper

Then

Notes for GGX paper

Notes for GGX paper

Notes for GGX paper

Put it in equation (45):

Notes for GGX paper

Derivation for equation (50)

Notes for GGX paper

 

Explanation of Beckmann Distribution Model

The distribution function of Beckmann Model is:

Notes for GGX paper

Let’s see the meaning of Beckmann Distribution Model. I use the way when I derive equation (42). That is, make a plane perpendicular to the surface normal, and make sure the distance between the plane and surface point O is 1. For a microfacet normal Notes for GGX paper , it must be pointing at a point P on the plane. So we can transform the probability density of Notes for GGX paper to another density function on the plane. I will show that it is a Gaussian function.

According to equation (4), which is

Notes for GGX paper

We can consider Notes for GGX paper as the probability density of finding a microfacet whose normal Notes for GGX paper is inside Notes for GGX paper. Also, we know:

Notes for GGX paper

In this equation, Notes for GGX paper is the distance between projected point P and surface point O.

So the probability of finding a microfacet whose normal Notes for GGX paper is inside Notes for GGX paper is:

Notes for GGX paper

Look! It’s a gaussian distribution function with variation Notes for GGX paper. That’s what Beckmann Distribution really is.

 

G1 for Beckmann Distribution

According to equation (51),

Notes for GGX paper

where

Notes for GGX paper

For Beckmann Distribution,

Notes for GGX paper

Also we know Notes for GGX paper, so

Notes for GGX paper

From normal distribution we know:

Notes for GGX paper

So

Notes for GGX paper

The first integration is:

Notes for GGX paper

The second one is:

Notes for GGX paper

Put Notes for GGX paperand Notes for GGX paper in it, we have:

Notes for GGX paper

Finally,

Notes for GGX paper

Explanation of Phong Distribution Model

The distribution function of Phong model is:

Notes for GGX paper

The same as Beckmann model, we try to project Notes for GGX paper to a plane above the surface point P, that is

Notes for GGX paper

We can confirm that the overall probability is

Notes for GGX paper





附件列表

     

    相关文章: