***** Update:**After Anders left his comment suggesting that I might be using an inverted IOR, and that total internal reflectance could account for the unexpectedly high results, I looked into this again more carefully. It seems that my relative IOR is in the same form as the papers, but it turns out that I was indeed misinterpreting the meaning of

*F*, and that

_{dr}*F*

_{dr }is actually the average reflectance of light incident to the

*inside*of the surface of the subsurface scattering medium, not the outside as I had assumed. Previously, I had jumped to some conclusions without doing quite enough investigation and testing. This time I looked more carefully at the graphs of the relevant functions. Then I looked at the paper that the

*F*

_{dr }approximation originally comes from, Egan et al. 1973, which calls the value in question (the value denoted

*F*

_{dr}in the new sources) the "internal diffuse surface reflectance", which to me is a

*much*more descriptive name than anything I saw in the new sources, all thanks to the word "internal". Egan et al. 1973 also gives a different formula for the "external diffuse surface reflectance" which is what I had thought

*F*

_{dr }was supposed to be! Had I looked at the Egan et al. 1973 paper before, the descriptive and accurate names might have instantly given away the issue I was having; sometimes a few well-chosen words can make a concept much more clear. Finally, after making sense of things, I ran more tests, comparing formula results to simulated values. This new interpretation of

*F*

_{dr }matches my simulation results much more closely over a much wider range of values. I haven't yet figured out how this new interpretation makes sense in context, but at least the

*F*

_{dr }and

*F*

_{dt }formulas make sense now. I'll post more details about this stuff once I look into it some more.

*******

I've been working a lot on my multiple scattering approximation, and just yesterday, as I mentioned in the previous post, I solved a significant Fresnel-related issue, one which stems from what appears to be an error or oversight in multiple sources (unless I'm totally missing something).

First some context. The resources I've been referring to in implementing point-based diffusion-based multiple scattering, including the Jensen papers I've used and the PBR book, multiply each irradiance sample (or equivalently, the summed radiant exitance at the look-up point) by the diffuse Fresnel transmission to take Fresnel reflection into account. That much makes sense.

To do that, they provide approximations for the diffuse Fresnel reflectance (

*F*), i.e. the Fresnel reflectance integrated over the hemisphere, and then they take 1 −

_{dr}*F*to find the diffuse Fresnel transmittance

_{dr }*F*. However, I've noticed that doing this makes objects appear unnaturally dark. A while back I checked

_{dt}*F*for a number of different IORs and noticed that it seemed far too large (around 47% and 66% for water and glass respectively), but I didn't think much of it at the time. Then the other day I was watching a Richard Feynman video, and he mentioned that the total reflectance of water and glass are around 5% and 10% respectively, which got me thinking again. So today I computed an actual integral of Fresnel reflectance for various IORs (using Monte Carlo integration, and selecting samples from the cosine distribution), and got values similar to what Richard Feynman had mentioned.

_{dr}Then it finally hit me, that

*F*is a

_{dr}*hemispherical integral*, so it's not the average Fresnel reflectance as I had assumed, but rather the average Fresnel reflectance

*times 2π*, which I quickly confirmed.

*So you can't just subtract*

*F*from 1 to get

_{dr}*F*, as the papers and book do—you need to divide it by

_{dt}*2π*first!

And if instead, we were to subtract

*F*from 2π to find

_{dr }*F*, then

_{dt}*F*would be the average transmittance times 2π, so we couldn't just multiply that times the irradiance to find the transmitted fraction of the irradiance, as they do in the papers and book, because the irradiance is already an integral over the hemisphere. In most cases, we would actually increase the irradiance by doing that, which doesn't make any sense—we'd be creating energy out of nothing.

_{dt}The term "reflectance" typically refers to the fraction of light reflected, expressed as a proportion between 0 and 1 (in photon terms it's literally a probability). From Wikipedia, reflectance (or reflectivity—the difference is subtle and is irrelevant in this case) is "commonly averaged over the reflected hemisphere to give the hemispherical spectral reflectivity". And the 2001 Jensen paper literally calls

*F*the

_{dr}*"average diffuse Fresnel reflectance"*which is incorrect and misleading.

I have noticed some other typos and ambiguities in the papers I've been referencing a lot, but I'm really not sure how or why this particular error was glossed over or neglected in multiple sources. It's a pretty significant error or oversight as far as I can tell. The papers provide explicit formulas for

*F*and the conversion to

_{dr}*F*, but clearly never divide by 2π. And they say

_{dt}*F*is the Fresnel reflectance integrated over the hemisphere, and show the integral for integrating over all 2π steradians of the hemisphere, but then they call

_{dr }*F*the "reflectance", and treat it like it goes from 0 to 1. Pretty strange.

_{dr }I hope this isn't coming across the wrong way—I definitely still think that these are excellent papers and an excellent book, even if these things turn out to be errors.

The papers also use

*F*in the boundary condition

_{dr }*A*in the diffusion approximation. Now I'm doubting now whether that instance should be left in terms of 2π. I just realized that

*A*could easily end up being negative if

*F*

_{dr }is left in terms of 2π.

In case this has held your interest this far and you're actually implementing this stuff yourself, it might also be worth mentioning here that you should clamp

*F*between 0 and 1 (unless you actually perform the integral, which you would actually only have to do once per material), because the approximation formulas blow up with high IORs.

_{dr }
This is very interesting! I will dig into this. Though I'll keep following your postings here, if you can also send an email about anything like this in PBR that you think is wrong/broken. that'd be great!

ReplyDeleteThanks,

-matt

Perhaps you are just using the wrong eta? In those equations eta is defined as eta = eta_from/eta_to. So the reason you get 60% for 1.5 is that this is internal reflectance in a dense medium, which is high due to total internal reflection.

ReplyDelete