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

Wrong microfacet BTDF formula used in reflection.cpp? #108

Closed
TzuChieh opened this issue Jan 10, 2017 · 1 comment
Closed

Wrong microfacet BTDF formula used in reflection.cpp? #108

TzuChieh opened this issue Jan 10, 2017 · 1 comment

Comments

@TzuChieh
Copy link

I noticed that in the paper written by Walter et al. (Microfacet Models for Reflection through Rough Surfaces), the microfacet BTDF formula (equation 21) has an eta_o^2 term in the numerator; while in PBRT-v3 book P.548 equation 8.20 it has an eta_i^2term instead (source code seems to follow this). Actually some rendering artifacts in my hobby renderer are fixed by using PBRT's formula, but the inconsistency between PBRT and the original paper makes me curious. Or am I missing some impoortant concepts here?

@mmp
Copy link
Owner

mmp commented Jun 11, 2017

It's been a while, so the following may be wrong somewhere, but the pbrt one has eta^2 in the numerator, where eta=eta_i/eta_o, while Walter et al have eta_o^2. However, we also have different terms in the denominator of the left term (pbrt) and the denominator of the right term (Walter et al). I believe that a bit of algebra can show those two changes to end up giving equivalent formulae.

As an additional check, I did with some empirical tests with this file mf.pbrt.txt, which has a glass disk in front of a disk with a checkerboard pattern. I rendered with both regular glass (SpecularTransmission)and very-smooth rough glass (using MicrofacetTransmission), both path tracing and BDPT. The image came out essentially the same in all cases, with tiny bit of blur with the smooth rough glass, but the overall average pixel values of all of the images were nearly the same. So consistency with glass also seems like a good sign that the details are right.

@mmp mmp closed this as completed Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants