Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Approximating BRDF using micro-facet maps #5

Open
kvark opened this issue Feb 12, 2015 · 0 comments
Open

Approximating BRDF using micro-facet maps #5

kvark opened this issue Feb 12, 2015 · 0 comments

Comments

@kvark
Copy link
Member

kvark commented Feb 12, 2015

As an alternative to the established methods as well as Sven's idea in #4, let me propose another approximation.

Basically, BRDF analytically exposes the way light reflects from the surfaces. If we assume that any surface point can be represented by flat micro-facets, then we can store the micro-facet normals and compute the reflectance from them. This is similar to regular normal maps, but instead of a single normal we have a separate region full of normals, and we need to sample it multiple times and average the result in order to get results that converge to real BRDF.

Here is what is needed from the art:

  • A micro-facet map that may have different areas representing different spots on the object. It is not UV-mapped from the original model. If we want to take the wave length into account, we may need 3 of these maps, one for each color channel. A pixel in this map is just a normal.
  • A redirection map that is UV-mapped. Each pixel (X,Y) are the coordinates inside the micro-facet map, while 'Z' can be the lookup radius.

Here is how we evaluate light reflection:

  1. Sample the redirection map to obtain micro-facet coordinates for this pixel as well as the lookup radius.
  2. Produce N random samples (gaussian, with highest probability density at the center) in the given micro-facet area.
  3. For each sample, read the normal and apply a simplified reflection model (say, Phong) to estimate the radiance in the direction of the camera. If we take wave length into account, do this for each color channel independently.
  4. Average the result.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant