漫反射曲面的基於物理的著色


2

因此,我目前正在使用微面模型在pathtracer中實現基於物理的著色,並且我非常想了解與散射表面的光交互作用。

首先,我想清楚地了解表面實際如何獲得顏色。我們都知道,任何表面的顏色都是由於它們吸收光譜可見區域中某些波長的光的特性所致。更具體地說,根據答案here,當光撞擊原子或分子時,如果電子具有與光相同的振動頻率,則它會被吸收。這就是表面顏色的原因。現在,讓我們看看光與散射表面相互作用時會發生什麼。

當光照射到散射(介電或非金屬)表面時,會發生2件事。它被鏡面反射或被折射,散射和重新發射,我們稱之為"漫反射"。反射/折射的光量取決於與波長有關的菲涅耳方程。這暗示了由於波長相關的IOR,因此也可能出現RGB三元組,因此可能是顏色的原因。所以這是主要的困惑。

  1. 當光入射到漫反射表面並被鏡面反射時,相互作用表面上的原子或分子可能會吸收一些光。這可能是顏色的原因。另一方面,由於與波長有關的折射率和菲涅耳方程,光的成分在每個R,G,B光譜中也發生變化。那麼顏色的真正原因是什麼?是前者還是後者,還是兩者的結合?我已經閱讀了內蒂·霍夫曼(Naty Hoffman)的一些筆記,其中他還建議在計算像庫克·托蘭斯這樣的鏡面BRDF時,使用菲涅耳反射率值作為鏡面顏色。更增加了我的困惑。

在澄清了以上內容之後,整個事物如何與折射,散射和重新發射的光聯繫在一起?

  1. 其次,由於散射表面同時顯示鏡面反射和散射反射,為什麼我通常會看到人們僅對散射表面使用朗伯模型?正確的方法是將BRDF用於漫反射,而將BRDF用於鏡面反射,例如Cook Torrance。我說得對嗎?

  2. 我們不應該使用 $(1-F_ {in})(1-F_ {out})... $

來加權擴散分量。跨度或更多菲涅耳項,取決於折射光線是否經歷全內反射。這些因素是默認內置的還是什麼?

0

When people talk about diffuse surfaces in CG they usually mean ideal diffuse surfaces. That is, the BRDF is simply: $f(\omega_o,x,\omega_i) = const$. We're talking about Lambertian reflectance. The colour you perceive is due to both the initial light colour and the albedo of the material. If you shine white light, then you'll really perceive what's left of it after absorption. So when you set $albedo = (r,g,b)$ then your surface reflects $r \%$ of the red light, $g\%$ of the green light, and $b\%$ of the blue light. Note that the tricolor formulation is not how it actually works in the real world, to be precise you should really be dealing with wavelengths, however $RGB$ is a good approximation perceptually due to how the human visual system works.

The cosine term is not actually part of the diffuse BRDF either, it comes from Lambert's law (the cosine term in the rendering equation).

Lastly you should realise that even Cook-Torrance is an approximation to a class of semi-plausible BRDFs.


1

So after reading up some more research papers and the concepts of most people working in this field here and there, I've reached an answer I'm satisfied with. If someone disagrees or thinks there is a better or more correct way to think the problem do share your ideas.

1) First to answer my point 1. I've noticed that most di-electric surfaces' Index of refraction remains fairly constant over the visible spectrum. This means the Fresnel Reflectances remain constant and are quite low over the visible spectrum for normal incidence. For angles near 90 degrees, even rough di-electric surfaces start reflecting the incoming light specularly. You can see this data here

However in the case of metals the IOR or more specifically the Fresnel Reflectances take on the exact same value as the color (in case of gold and copper). From this I conclude that,

For metals where Fresnel Reflectances (FR) vary greatly over the visible spectrum, FR is linked and is just a consequence of the surface of metals absorbing photons of certain frequencies. This means for Gold, the electrons at the surface absorb the blue-end of the spectrum, the remaining golden colored light either gets reflected or refracted. Thus the Fresnel Reflectance is golden in color which we can also call the "Specular Color". Note that the absorption depends on whether there are electrons available. It's possible for some blue photons to refract or reflect if there aren't much electrons for absorbing to begin with.

In-case of di-electrics the FR don't change much over the visible spectrum. However we can see color. The possible explanation is that the color in case of di-electrics comes from within the surface. That is, there are no such electrons present at the "interface" that absorb certain frequencies. Else we would have seen different FR for different wavelengths. The electrons absorbing wavelengths of certain frequencies come from within the surface, like pigments lying inside a liquid. Hence for di-electrics FR is not really linked to the concept of electrons absorbing certain frequencies imo.

This makes sense to me as colored metals (gold, copper) tint the reflections with their color. However certain di-electrics don't such as a polished marble floor. The reason for that again is that in case of metals the cause of color i.e. absorption by electrons occurs directly on the surface. The reflected light thus has a different composition for R,G,B giving us the tint. However for di-electrics the cause of color lies beneath the surface. Hence the reflection is non-tinted.

Thus simply stating for metals FR is the same as the albedo/color of the surface. For non-metals or di-electrics FR is different from the albedo/color and just defines the amount of specular reflection.

2) The proper way would surely be to use a BRDF with both diffuse and specular components since diffuse surfaces reflect greatly at near-grazing angles.

3) Still don't know about this. It might be baked in or not. What I do know is that the diffuse component should surely get lesser and specular component larger as angle increases to 90.

Another interesting point to note is that the basic Fresnel Equations apply for transparent and Flat surfaces. For metals we have complex IOR making the equations a little more complex. Sebastian Lagarde did a comparison here. Fresnel equations don't apply to rough surfaces but for microfacet models where we assume each facet to be perfectly specular we can maybe. Either way they are a good way to approximate the behaviour for increasing reflection near 90 degrees.