*by Tien-Yi, NTNU CGLAB*
# Cross PBR Model
本文詳細說明了 CrossPBR 的定義,並整理分析多個主流的 PBR 材質模型,包括 Blender、NVIDIA MDL、OpenPBR、Autodesk Standard Surface 以及 Unreal 等。CrossPBR 在設計上與 Blender、MDL、OpenPBR、Autodesk Standard Surface 等具有高度的通用性。
內容涵蓋上述模型的定義說明、原理架構、部分發展脈絡、參數與其定義,以及微表面模型的觀念,並簡要介紹其背後的數學原理。
## Table of symbols
| Symbol | Description | 描述 |
|:----------------------:|:------------------------------------------------------------------------------------------------------------------------- |:-------------------------------------------------------------------- |
| $\omega_i$ | Direction from which light is incident | 光線的入射向量 |
| $\omega_o$ | Direction from which light is scattered (outgoing) | 光線的反射(散射)向量 |
| $\omega_n$ | Macrosurface normal | 宏觀表面法向量 |
| $\omega_m$ | Microsurface normal | 微觀表面法向量 |
| $\omega_h$ | Half vector (between $\omega_i$ and $\omega_o$ ) | 半角向量 ($\omega_i$ 及 $\omega_o$間的中間向量) |
| $\omega_t$ | Tangent vector | 切線向量 |
| $\omega_b$ | Bitangent vector | 餘切線向量 |
| $\theta_a$ | Angle between $\omega_a$ and $\omega_n$ or $\omega_m$ | $\omega_a$ 與法向量間的角度 |
| $\phi_a$ | The azimuth angle of $\omega_a$ based on tangent | 基於切線的 $\omega_a$ 的方位角 |
| $\phi$ | The difference angle between $\phi_i$ and $\phi_o$ | $\phi_i$ 及 $\phi_o$ 的角度差 |
| $\phi_a^\prime$ | The difference angle between $\omega_a$ and tangent $\omega_t$ | $\omega_a$ 與切線 $\omega_t$ 的角度差 |
| $F$ | Fresnel factor (reflectance) | 菲涅耳參數 (反射率) |
| $D$ | Microfacet distribution function | 微表面反射分布函數 |
| $G$ | Shadowing-masking function | 表面陰影-遮蔽函數 |
| $G_1$ | Monodirectional shadowing-masking function | 單向性微表面陰影-遮蔽函數 |
| $G_2$ | Bidirectional shadowing-masking function | 雙向性微表面陰影-遮蔽函數 |
| $E(\omega_o)$ | Total reflectance of a lobe or component based on the $\omega_o$ direction | 基於$\omega_o$方向的一個 Lobe 或 Component 的總反射率 |
| $T(\omega_o)$ | Total transmittance of a lobe or component based on the $\omega_o$ direction | 基於$\omega_o$方向的一個 Lobe 或 Component 的總透射率 |
| $R$ | Reflectance (Fresnel equations) | 反射率 (菲涅耳方程式) |
| $T$ | Transmittance (Fresnel equations) | 透射率 (菲涅耳方程式) |
| $\chi^{+}(a)$ | $\chi^{+}(a) = 1$ when $a > 0$, $\chi^{+}(a) = 0$ when $a \le 0$ | 當 $a > 0$ 時 $\chi^{+}(a) = 1$ ; 當 $a \le 0$ 時 $\chi^{+}(a) = 0$ |
| $\alpha$ | specular `roughness` parameter | 參數粗糙度`roughness` |
| $\alpha_x$, $\alpha_y$ | specular roughnesses of x, y direction (on surface's local coordinates system) | x, y 方向的粗糙度(基於表面的local座標系) |
| $\xi_1, \xi_2$ | Independent random numbers, range \[0,1\) | 獨立的隨機數,範圍\[0,1\) |
| $\rho$ | diffuse color (`base_color` parameter) | 固有色 (參數 `base_color`) |
| $\sigma$ | Roughness of Oren-Nayer model (`diffuse_roughness` parameter) | Oren-Nayer model的粗糙度 (參數`diffuse_roughness`) |
| $\xi_s$ | Parameter `specular_weight` | 參數 `specular_weight` |
| $\Lambda(\omega_o)$ | A factor for Smith shadow-masking function | Smith 陰影-遮蔽函數當中的一個函數 |
| $\lambda$ | Acts as the denominator in the scattering and absorption coefficient of interior medium (`transmission_depth` parameter) | 計算內部介質的散射與吸收係數時的分母 (參數 `transmission_depth`) |
| $\lambda_{wave}$ | The wavelength of light in vacuum | 光線在真空的波長 |
| $d$ | The thickness of thin-film | thin-film 的厚度 |
## Sample A Point On A Microfacet Surface
當我們觀察一個「點」時,它是否可以同時是透明液體,又是金屬?
在計算一個表面點反射到觀察點的光線時,我們實際上是在積分所有與該點發生交互作用(並反射到觀察點)的光線,同時考慮其物理量的變化。直覺上,一個「點」應該只有一種確定的物理性質,例如,如果該點為透明液體,那麼它不應同時是金屬。
然而,不論是透過肉眼觀察、相機拍攝,或是電腦渲染,實際捕捉的並非一個真正的「點」,而是與視錐細胞、感光元件、螢幕上的pixel,所對應的表面上一個小區域內的能量積分。此外,可見光的波長範圍約落在 380-760nm,要探討光線與比這更小的表面結構如何交互作用是沒有意義的。也就是說,過於細緻的表面描述對於計算可見光的反射性質來說無實際價值。
現代電腦圖學的表面光學特性,主要是基於 Microfacet Theory 進行研究。這套理論源自物理學,最初用於研究電磁波與材質表面的交互作用,後來被電腦圖學界引用,成為 Physically Based Rendering (PBR) 的重要基礎。Microfacet Theory 透過數學解析的方式,研究微觀幾何(Microgeometry)對反射率的影響,並統計出電磁波在微表面(Microfacet)上的反射機率分布。

圖(一) 說明取樣點與微表面之間的關係
回到一開始的問題,我們觀察到的「點」是否可以同時是透明液體,又是金屬?答案是肯定的。因為在 Microfacet 理論中,我們關注的不是單一點的確定性質,而是該點所代表的微觀表面的物理性質。因此,一個「點」所對應的表面材質,可能是一部分液體表面,一部分金屬表面的統計結果。
這個概念衍伸出現代 PBR Material Model 的核心特色之一 Layered Model。 Component 描述單一種材質(例如金屬)的反射特性,再藉由Layered Model方法將結果堆疊組合,成為一個能夠描述絕大多數材質的 Material 定義。
## Layered Model
光線與各種基礎材質表面交互的散射現象,例如金屬、塑膠、紙,經分析可以用簡單的模型來做表示,也就是可以用單一BRDF來做表示。有些半透明的材質如牛奶,則需要考慮到光線進入介質後的運動及散射情形,可以透過單一BSDF來表示。而複雜、不均勻的材質表面,例如生鏽的金屬,則可能需要藉由結合金屬與非金屬、光滑與粗糙的組合,不容易使用單一BRDF或BSDF來做表示。
CrossPBR 與現在常見的材質模型一樣,採用分層模型(Layered model)來定義材質表面。由許多組件(Components)來組成整個材質表面。藉由不同組件的堆疊、融合來形成整個表面的描述。
CrossPBR描述如下圖

圖(二) CrossPBR組成圖
### Lobes Combination
在分層模型的概念下,每個部分可以由垂直或水平關係構成。
當光子從環境進入材質表面時,最先接觸的是最上層的部分。在垂直關係中,光子在與最上層相互作用時,可能會被反射,或者穿透進入下一層(視為被吸收)。這個過程會持續進行,直到光子到達最底層。例如,在圖(一)所示的 Sheen 與 Coat 關係中,光子可能在 Sheen 層被反射,或是進一步進入 Coat 層。
在這種情況下,底下的Lobe的權重為上層的 reflectance funciton $E(\omega_o)$, `weight`參數的乘積。reflectance $E(\omega_o)$ 則定義為:$$
E\left(\omega_o\right) \equiv \int_{\mathcal{H}_{+}} f\left(\omega_i, \omega_o\right) \mathrm{d} \omega_i^{\perp}
$$也就是在$\omega_o$方向,同側的半球接收的所有$\omega_i$方向能量的反射量的積分。
除了Emission外,任何 Lobe 的 Reflectance 與 Transmission 總和必須小於等於1:$E(\omega_o)+T(\omega_o)\le1$。
除了層與層之間的垂直關係外,還存在水平關係。以圖(一)為例,當光子通過 Coat 層後,它可能進入 Metal 層或 Specular Reflection 層,但不會同時進入兩者,而是根據特定的機率決定其去向。
這種層級結構類似於肺葉的分支結構,在許多文獻中,每個分支或組件被稱為「葉」(Lobe)。
透過這樣的設計,只要每個 BSDF 的反射能量不超過入射能量,便可確保整個材質的總反射能量不會超過入射光能量(在不考慮自發光 Emission 的情況下),從而滿足物理上的能量守恆定律。
備註:Emission Lobe 不與外來光子交互作用,而是會主動發射光子,發光分布(Emission Distribution Function, EDF)通常為均勻分布。
下圖為 CrossPBR Lobes Combination 結構圖,樹狀結構中的圓圈加號表示將下方連線的Lobe數值相加,而連線旁標示的數值則代表該成分的權重:

圖(三) CrossPBR Lobes Combination 結構圖,線旁的參數為權重
每個Component都有其對應的BSDF、BRDF、BTDF或是EDF,對應表如下:
#### Lobes List
| Lobe | Description | Function | Model |
|:--------------------- |:------------------------------------ |:------------------:|:----------------------------- |
| Diffuse | diffuse BRDF | $f_{diffuse}$ | Oren-Nayar Diffuse BRDF |
| Subsurface | subsurface BSSRDF | $f_{subsurface}$ | - |
| Specular transmission | specular BTDF /BSSBRF | $f_{specular}^{T}$ | Trowbridge-Reitz (GGX) BTDF |
| Specular reflection | dielectic specular BRDF | $f_{specular}^{R}$ | |
| Metal | metal BRDF | $f_{metal}$ | F82-Tint(Adobe F82) |
| Thin-film | iridescence effects (inside Metal) | | Belcour and Barla's Model |
| Emission | emission EDF | $f_{emission}$ | Lambertian emission |
| Coat | coat BRDF (secondary specular lobe) | $f_{specular}^{R}$ | Trowbridge-Reitz (GGX) BRDF |
| Sheen | sheen BRDF | $f_{sheen}$ | Zeltner's model [Zeltner2022] |
| Translucent | pass-through | | - |
## Microfacet Reflection BRDF
在說明各 Lobe 對應的 BSDF 之前,必須先了解基於微表面(Microfacet)理論的反射模型,也就是光線與微表面模型(Microfacet Model)相互作用時的反射現象。
這是一種數學解析方法,旨在研究微觀幾何(Microgeometry)對反射率的影響,並考慮電磁波在微表面(Microfacet)上的反射機率分布。Microfacet Reflection BRDF的研究始於電磁波在表面散射的物理學研究[Beckmann and Spizzichino 1963]。此後,該理論逐步應用於電腦圖學領域,用於統計光線在微表面上的散射分布,並推導基於物理的 BRDF。

圖(四) 宏觀表面(Macrosurface)與微觀表面(Microsurface)之比較。藍線為宏觀表面,黑線為微觀表面,$n$為宏觀表面法向量,$m$為微觀表面法向量。
如上圖,在設計微表面模型時需要考慮到兩個表面間法向量的差異,以及位置差異。
目前,大多數渲染器(Renderer)及 Microfacet BRDF 模型的定義皆參考 [Walter2007] 的研究,而該模型則是基於 [Beckmann and Spizzichino 1963] 以及 [Cook and Torrance 1982] 的經典理論進一步發展而來。
在[Walter2007] 當中,Microfacet Reflection BRDF被設計為:
$$
f(\mathbf{\omega_\mathrm{i}}, \mathbf{\omega_\mathrm{o}}, \omega_\mathbf{n})= \frac{F(\mathbf{\omega_\mathrm{i}}, \omega_\mathbf{h})D(\omega_\mathbf{h}) G(\mathbf{\omega_\mathrm{i}}, \mathbf{\omega_\mathrm{o}}, \omega_\mathbf{h})}{4(\mathbf{\omega_\mathrm{i}} \cdot \omega_\mathbf{n})(\omega_\mathbf{n} \cdot \mathbf{\omega_\mathrm{o}})}
$$
當中$\omega_i$代表入射(incident)向量,$\omega_o$代表出射(outgoing)向量,$h$代表半角向量($\omega_i$, $\omega_o$的中間向量),$n$代表宏觀表面上的法向量。這些向量都是經過歸一化(Normalized)後的值。
此外,三個Fuction分別對應
* $F$ : Fresnel factor (光線發生反射的機率,即不被介質吸收或進入介質的機率)
* $D$ : Distribution function (光線散射的機率分布函數,也就是光線散射到向量$o$的機率)
* $G$ : Masking-shadowing function (光線從入射到散射過程中,沒有被微表面的凹凸幾何遮蔽的機率)

圖(五)在微表面模型中,相同入射角度與散射角度的多條光線,在微表面的不同位置,可能會發生入射或出射方向被遮擋情形。被遮擋的機率由 Masking-shadowing function 來描述。
[Walter2007] 模型的核心概念-三個function的積,被現在大多數 Renderer 或PBR定義用於 Dielectric Specular Reflection, Metal Reflection的模型上。
在CrossPBR以及這些定義中,描述Dielectric, Metal Reflection兩種BRDF Model 在Fresnel Factor的上使用不同的Model,但在使用相同的 GGX 相關模型作為Distribution fuction,並搭配對應的 GGX smith model作為 Masking-shadowing function。
### Distribution fuction
#### Trowbridge-Reitz (GGX) Normal Distribution Model
此模型為 Trowbridge, S., and K. P. Reitz 兩位作者在 1975所提出的模型。
Trowbridge-Reitz Anisotropic 版本的 NDF (normal distribution function)式子如下:
$$
D_{GGX(TR)}\left(\omega_h\right)=\frac{1}{\pi \alpha_x \alpha_y \cos ^4 \theta_{\mathrm{h}}\left(1+\tan ^2 \theta_{\mathrm{h}}\left(\cos ^2 \phi_{\mathrm{h}}^\prime / \alpha_x^2+\sin ^2 \phi_{\mathrm{h}}^\prime / \alpha_y^2\right)\right)^2}
$$
其中$\theta_h$為半角向量$\omega_h$與宏觀表面法向量$\omega_n$之夾角,$\phi_h^\prime$為半角向量$\omega_h$與切線$\omega_t$之間的夾角。$\alpha_x,\alpha_y$分別代表兩個方向(切線$t_x$與副切線$t_y$)之粗糙度。
所以這個公式也可以轉成以點乘(dot product)的方式來呈現,式子整理後如下:
$$
D_{GGX(TR)}\left(\omega_h\right)=\frac{1}{\pi \alpha_x \alpha_y\left(\frac{(\omega_t \cdot \omega_h)^2}{\alpha_x^2}+\frac{(\omega_b \cdot \omega_h)^2}{\alpha_y^2}+(\omega_n \cdot \omega_h)^2\right)^2}
$$
當中 $\omega_t$ 為切線(tangent)向量,$\omega_b$ 為副切線(bitangent)向量。
在CrossPBR以及其他多數定義中,多數會使用`anisotropy`, `rotation`兩個參數來設定Anisotropic NDF 高光的方向以及高光形狀。所以要套入Trowbridge-Reitz 的公式需要將`anisotropy`, `roughness`兩個參數轉換成公式需要的$\alpha_x$, $\alpha_y$,而`rotation`參數則是直接旋轉切線`t`副切線`b`之向量。
以下為將`anisotropy`, `roughness`轉換為$\alpha_x$, $\alpha_y$的方式(來源為Omniverse Kit 內部程式碼):
$$
\begin{aligned}
\alpha' &= \sqrt{1 - \min(\max(a, 0), 0.98)} \\
\alpha_x &= \min\left(\frac{\alpha}{\alpha'}, 1\right) \\
\alpha_y &= \alpha \cdot \alpha'
\end{aligned}
$$
當中英文字母$a$代表`anisotropy`參數,希臘字母$\alpha$為`roughness`。
#### 各向同性(isotropy)版本
Trowbridge-Reitz 的通常各向同性版本公式如下,如`anisotropy`參數為0時可以用此算是減少計算量:
$$
D_{GGX(TR)}\left(\omega_h\right) = \frac{\alpha^2}{\pi \left( (\omega_n \cdot \omega_h)^2(\alpha^2 - 1) + 1 \right)^2}
$$
不過依照迪士尼2012的模型 [Burley2012],這裡的$\alpha$為`roughness`參數的平方$r^2$,而非`roughness`。
#### GGX (Walter2007) Normal Distribution Fuction
GGX Distribution Function 由 Walter等人在2007年提出[Walter2007],是一種演變自 Trowbridge-Reitz Distribution Model 的反射/穿透分布模型。
GGX不只可以用在反射上(BRDF),也可以用來描述光線穿透材質表面時的分布情形(BTDF)。
此篇論文有用實際觀測資料證實 GGX 在 BTDF 上有良好的近似準確度。
GGX Distribution fuction 以數學式表示如下,是一種考慮到為表面法向量$m$的改良版Trowbridge-Reitz模型:
$$
D_{GGX}(\mathbf{\omega_m}) =\frac{\alpha^2 \chi^{+}(\omega_\mathbf{m} \cdot \omega_\mathbf{n})}{\pi \cos ^4 \theta_m\left(\alpha^2+\tan ^2 \theta_m\right)^2}
$$
當中$m$代表微表面法向量,$n$代表宏觀表面法向量,$\alpha$ 為 `roughness` 參數,$\chi^{+}(a)$代表 `1 : 0 ? a >= 0` (求$\mathbf{m} \cdot \mathbf{n}$是否大於0,及夾角不超過90度)。
另外$\theta_m$可用以下式子求得:
$$
\theta_m =\arctan \left(\frac{\alpha \sqrt{\xi_1}}{\sqrt{1-\xi_1}}\right)
$$
半角向量的方位角可用以下式子求得,可以用來計算$(\omega_\mathbf{m} \cdot \omega_\mathbf{n})$:
$$
\phi_m =2 \pi \xi_2
$$
$\xi_1, \xi_2$則代表範圍`[0,1)`的兩個獨立的隨機數。$\phi_m$指的是對於切線的方位角(azimuth)。
#### GGX vs Trowbridge-Reitz
目前,幾乎所有的渲染引擎與材質定義 (如 Blender Cycles、Unreal Engine 5、OpenPBR、Disney Principled BRDF, MDL SDK 等) 都選擇 "GGX" 作為 Normal Distribution Function (NDF)。
然而,這裡所指的 GGX NDF,實際上是 1975 年 Trowbridge-Reitz 模型,而非 Walter 等人 2007 年 提出的 帶有兩個隨機數的 GGX NDF。值得注意的是,"GGX" 這一名稱是 Walter 2007 首次使用的(作為他們新模型的名稱),而 Trowbridge & Reitz 在 1975 年的研究中並未為其模型命名。
雖然 Walter 2007 的論文參考文獻 (References) 並未包含 Trowbridge & Reitz 1975,但從其公式可明顯看出 Walter 2007 的模型基於 Trowbridge-Reitz NDF,並進一步針對微表面法向量$m$ 進行改良。以下為 GGX NDF 以及 Trowbridge-Reitz NDF 的標準形式:
$$
D_{GGX}(\mathbf{\omega_m}) =\frac{\alpha_g^2 \chi^{+}(\omega_\mathbf{m} \cdot \omega_\mathbf{n})}{\pi \cos ^4 \theta_m\left(\alpha_g^2+\tan ^2 \theta_m\right)^2}
$$
$$
D_{GGX(TR)}\left(\omega_h\right) = \frac{\alpha^2}{\pi (\omega_n \cdot \omega_h)^4 \left( (\alpha^2 - 1)(\omega_n \cdot \omega_h)^2 + 1 \right)^2}
$$
Trowbridge-Reitz 模型為何最終被稱為 GGX 仍無明確答案。但可以確定的是,如今在電腦圖學社群、相關文檔與程式碼中,提到 GGX NDF 幾乎都是指 Trowbridge-Reitz 模型。(可能是因為GGX在寫Code時簡潔好辨識)
在 Blender (撰寫時版本 4.3), Unreal Engine (撰寫時版本 5.5)和MDL SDK的原始碼中,NDF 的實作內容實際上就是 Trowbridge-Reitz 模型,但變數名稱與註解仍標記為 GGX,且引用的是 Walter 2007 而非 Trowbridge & Reitz 1975。(MDL SDK原始碼註解中沒有寫任何引用論文)
為了正確致敬 Trowbridge & Reitz 1975 在電腦圖學中的重要貢獻,並避免命名上的混淆,未來或許應該更正式地稱其為:
- Trowbridge-Reitz Model
- Trowbridge-Reitz (GGX) Model
同時,也應確保在相關論文與實作中適當引用 (Citation) Trowbridge & Reitz 1975,以正視其對現代渲染技術的影響。
### Masking-shadowing function
依據 [Heitz2014] 《Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs》所整理與驗證的內容,Smith model 與 V-cavity Model 兩種 Shadow-masking Function 為基於物理且優良的方式。以下會簡單介紹這兩種Shadow-masking 的概念與方法。
在介紹之前,首先要提到$G_1$以及$G_2$ function代表的意義。
$G_1$ Function代表其中一個方向的光線在此微表面法向量$\omega_m$被遮擋的機率,包含$G_1(\omega_o, \omega_m)$, $G_1(\omega_i, \omega_m)$兩個方向的遮擋機率。而$G_2(\omega_o, \omega_i, \omega_m)$則是描述光線入射及散射被遮擋的機率。
目前蒐集到開源的軟體分別使用的Shadow-masking 如下:
- Blender (4.3 branch)
Smith model 搭配 Height-Correlated Masking and Shadowing
- MDL SDK (2024.1)
Smith 或 V-cavity model (供使用者選擇) 搭配 Separable Masking and Shadowing
依據[Heitz2014] 的建議,考量物理嚴謹度與實作性,CrossPBR 採用 Smith model 搭配 Height-Correlated Masking and Shadowing 來實現 Shadow-masking 。
#### Smith Model
Smith Model 假設 Microsurface上各個點上是不相關且不連續的(下圖右)。

圖(六) 節自[Heitz2014]
光線的散射方向 $o$ 在微表面法向量 $m$ 之下不被阻擋的機率可表示為 $G_1(o, m)$。由於表面是不連續的,因此可拆解為以下形式:
$$
G_1(\omega_o, \omega_m) = G_1^{\text{local}}(\omega_o, \omega_m) G_1^{\text{dist}}(\omega_o)
$$
其中,**local** 參數為二元函數($\chi^{+}(a)$ 代表 `a >= 0 ? 1 : 0`):
$$
G_1^{\text{local}}(\omega_o, \omega_m) = \chi^{+}(\omega_o \cdot \omega_m)
$$
經過推導後,得出:
$$
G_1^{\text{dist}}(\omega_o) = \frac{\cos \theta_o}{\int_{\Omega} \langle \omega_o, \omega_m \rangle D(\omega_m) \, d \omega_m}
$$
因此,完整的 $G_1(o, m)$ 可寫為:
$$
G_1(\omega_o, \omega_m) = \chi^{+}(\omega_o \cdot \omega_m) \frac{\cos \theta_o}{\int_{\Omega} \langle \omega_o, \omega_m \rangle D(\omega_m) \, d \omega_m}
$$
在 [Heitz 2014] 中,作者將 distance 形式的方程式重新寫為:
$$
G_1^{\text{dist}}(\omega_o) = \frac{1}{1+\Lambda(\omega_o)}
$$
最終,完整的方程式可簡化為:
$$
G_1(\omega_o, \omega_m) = \frac{\chi^{+}(\omega_o \cdot \omega_m)}{1+\Lambda(\omega_o)}
$$
#### GGX Smith Masking-Shadowing Model
根據 [Heitz 2014] 的方程式72:
$$
\Lambda\left(\omega_o\right)=\frac{-1+\sqrt{1+\frac{1}{a^2}}}{2}
$$
在isotropy 版本中
$$
a=\frac{1}{\alpha\tan\theta_o}
$$
可以進一步推導出以下式子方便計算
$$
\frac{1}{a^2} = \alpha^2\tan^2\theta_o = \frac{1 - \cos^2\theta_o}{\cos^2\theta_o}
$$
以上是 isotropy 版本的GGX Smith Masking-Shadowing funtion。
在 anisotropy版本,$a$要改為$a_{aniso}$:
$$
a_{aniso}=\sqrt{\cos ^2 \phi_o \alpha_x^2+\sin ^2 \phi_o \alpha_y^2}
$$
當中$\phi_o$代表$o$方向在切線平面(local切線座標系)的方位角,經過轉換後可以以下列方式計算(參考自Blender):
$$
\frac{1}{a^2} = \frac{\alpha_x^2 V_x^2 + \alpha_y^2 V_y^2}{V_z^2}
$$
當中$V$代表$o$向量在切線座標系的座標 $(V_x, V_y, V_z)$。
以上式子用$o$呈現,再帶入$i$向量計算就可以得到${G1}_o$, ${G1}_i$進行結合。
#### The Smith Joint Masking-Shadowing Function
得到$G_1(\omega_o, \omega_m)$, $G_1(\omega_i, \omega_m)$分別的質以後,就可以來求$G_2(\omega_o, \omega_i, \omega_m)$。
在 [Heitz 2014] 中,作者整理出以下4種方法來進行討論。
##### 1. Separable Masking and Shadowing
[Heitz 2014] 介紹中的最簡單、最容易計算的方法,就是將兩個$G_1$相乘:
$$
G_2\left(\omega_o, \omega_i, \omega_m\right)=G_1\left(\omega_o, \omega_m\right) G_1\left(\omega_i, \omega_m\right)= \frac{\chi^{+}\left(\omega_o \cdot \omega_m\right)}{1+\Lambda\left(\omega_o\right)} \frac{\chi^{+}\left(\omega_i \cdot \omega_m\right)}{1+\Lambda\left(\omega_i\right)}
$$ 這個方式不會考慮 Masking、Shadowing 兩者間的關係,所以總是會有對陰影高估的現象(存在bias)。
##### 2. Height-Correlated Masking and Shadowing
[Ross et al. 2005] 考慮到入射方向、出射方向的關聯性。直觀上來說,其中一邊被遮擋的機率便高時,另一邊也會升高。方程式如下:
$$
G_2\left(\omega_o, \omega_i, \omega_m\right)= \frac{\chi^{+}\left(\omega_o \cdot \omega_m\right) \chi^{+}\left(\omega_i \cdot \omega_m\right)}{1+\Lambda\left(\omega_o\right)+\Lambda\left(\omega_i\right)}
$$不過此方式在入射出射角相近時,會高估陰影值(存在bias)。
[Heitz 2014] 推薦使用此方式來進行實作,精準度比Separable Masking and Shadowing高,但計算複雜度一樣。
##### 3. Direction-Correlated Masking and Shadowing
根據[ASHIKMIN 2000]的研究,遮蔽(masking)與陰影(shadowing)在出射方向與入射方向接近時具有高度相關性。
當$o$與$i$擁有相同的方位角時,達到完全相關性,此時遮蔽-陰影函數可由遮蔽與陰影的最小值取代。Ashikhmin 等人提出了一種方法,通過混合可分離形式和完全相關形式,來表達方向相關性:
$$
\begin{aligned}
& G_2\left(\omega_o, \omega_i, \omega_m\right) \\
& =\lambda(\phi) G_1\left(\omega_o, \omega_m\right) G_1\left(\omega_i, \omega_m\right)+(1-\lambda(\phi)) \min \left(G_1\left(\omega_o, \omega_m\right), G_1\left(\omega_i, \omega_m\right)\right) .
\end{aligned}
$$
##### 4. Height-Direction-Correlated Masking and Shadowing
根據[VAN GINNEKEN 1998] [HEITZ 2013]等研究,Masking與Shadowing的方向相關性可以通過將方向相關參數 $λ$ 引入高度相關的形式來構成Model:
$$
G_2\left(\omega_o, \omega_i, \omega_m\right)=\frac{\chi^{+}\left(\omega_o \cdot \omega_m\right) \chi^{+}\left(\omega_i \cdot \omega_m\right)}{1+\max \left(\Lambda\left(\omega_o\right), \Lambda\left(\omega_i\right)+\lambda\left(\omega_o, \omega_i\right) \min \left(\Lambda\left(\omega_o\right), \Lambda\left(\omega_i\right)\right)\right.}
$$
當出射方向 $\omega_o$ 與入射方向 $\omega_i$ 平行時(即 $\lambda = 0$),遮蔽與陰影完全相關;隨著方向角度差增加,$\lambda$ 增加至 1,遮蔽與陰影的方向相關性消失,公式回到高度相關形式。
Ginneken 等人(1998)提出經驗公式 $\lambda = \frac{4.41\phi}{4.41\phi + 1}$ ,依賴於 $\phi$ (即 $\omega_o$ 和 $\omega_i$ 之間的方位角差)且與表面粗糙度無關。Heitz 等人(2013)(此篇作者前一年)進一步研究,針對 Beckmann 分佈提出解析近似,將粗糙度納入計算,並可通過拉伸不變性推廣至各向異性 Beckmann 分佈。
[Heitz 2013] 的形式能準確建模遮蔽與陰影的方向相關性,比上述其他Smith Joint Masking-Shadowing Function更精確。然而,對於 $λ$ 的實用形式推導及非高斯分佈的推廣仍然是開放問題。
#### 補充: V-cavity model
有別於Smith mode,V-Cavity 假設為表面是由多種相同的V型重複結構組成,一個微表面可以由多種V型結構依權重組成。如下圖:

圖(七) 節自[Heitz2014] V-cavity 理論的說明,藉由統計單一種的V-cavity模型的陰影-遮擋機率,並照比例加總不同V-cavity模型而成
在這個假設下,一種V型微表面只會有兩個Normal向量:$m(x_m,y_m,z_m)$, $m ^\prime(-x_m,-y_m,z_m)$,在最後可以推導出一行由Cook and Torrance [1982]提出的著名的公式:
$$
G_1\left(\omega_o, \omega_m\right)=\min \left(1,2 \frac{\left(\omega_m \cdot \omega_n\right)\left(\omega_o \cdot \omega_n\right)}{\left\langle \omega_o, \omega_m\right\rangle}\right)
$$
## Diffuse Reflection
傳統上最常見的 Diffuse Model 是 Lambertian model,$D(\omega_i,\omega_o)=\frac{\cos\theta_i}{\pi}$,這是最直觀,也是最容易計算的方式之一。不過現在有越來越多 Renderer 使用的 Diffuse model 已經改為基於微表面理論的 Oren-Nayar model。
### Oren-Nayar model
OREN, M. 和 NAYAR, S. K. 在1994發表了一組新的 Diffuse Reflection Model [Oren 1994]。他們的模型是透過V-Cavity來模擬粗糙表面,並考量到V-Cavity間的英shadow-masking、互相反射關係,推導出後續BRDF。後人稱之為 Oren-Nayar Reflection Model,比起 Lambertian 更符合現實世界的漫反射表面。

圖(八) 取自 wikipedia: Oren–Nayar reflectance model,比較真實照片、Lambertian model 及 Oren-Nayar model

圖(九) 取自 wikipedia: Oren–Nayar reflectance model,說明 `diffuse_roughness`數值調整時帶來的變化

圖(十) 取自 wikipedia: Oren–Nayar reflectance model,Oren-Nayar model與真實白色花瓶的測量數據比較
Oren-Nayar 提出幾種模型,包含Full Model (論文中的 Model for Gaussian Slope-Area Distribution) 以及簡化版本的 Qualitative Model (簡稱QON model)。
Full Model式子為:
$$
\begin{aligned}
& F_{ON}\left(\omega_i, \omega_o\right)=L_1+L_2, \\
& L_1=\frac{\rho}{\pi} \cos \theta_i\left(A+B \cos \left(\phi_i-\phi_o\right) \tan \beta+C\left(1-\left|\cos \left(\phi_i-\phi_o\right)\right|\right) \tan \frac{\alpha+\beta}{2}\right), \\
& L_2=0.17 \frac{\rho^2}{\pi} \cos \theta_i \frac{\sigma^2}{\sigma^2+0.13}\left[1-\cos \left(\phi_i-\phi_o\right)\left(\frac{2 \beta}{\pi}\right)^2\right] \\
& A=1-0.5 \frac{\sigma^2}{\sigma^2+0.33}, \\
& B = \begin{cases}0.45 \frac{\sigma^2}{\sigma^2+0.09} \sin \alpha & \text { if } \cos \left(\phi_i-\phi_o\right) \geq 0, \\
0.45 \frac{\sigma^2}{\sigma^2+0.09}\left(\sin \alpha-\left(\frac{2 \beta}{\pi}\right)^3\right) & \text { otherwise, }\end{cases} \\
& C=0.125 \frac{\sigma^2}{\sigma^2+0.09}\left(\frac{4 \alpha \beta}{\pi^2}\right)^2, \\
& \alpha=\max \left(\theta_i, \theta_r\right), \\
& \beta=\min \left(\theta_i, \theta_r\right)
\end{aligned}
$$
簡化的 QON model 犧牲了些許準確度以換取更好的計算效能。以下是 QON model 式子:
$$
\begin{aligned}
&F_{QON}\left(\omega_i, \omega_o\right)=\frac{\rho}{\pi}\left(A+B \cdot \max \left(0, \cos \left(\phi_i-\phi_o\right)\right) \sin \alpha \tan \beta\right)\\
&\begin{gathered}
\mathrm{A}=1-\frac{\sigma^2}{2\left(\sigma^2+0.33\right)} \\
\mathrm{B}=\frac{0.45 \sigma^2}{\sigma^2+0.09} \\
\alpha=\max \left(\theta_{\mathrm{i}}, \theta_{\mathrm{o}}\right) \\
\beta=\min \left(\theta_{\mathrm{i}}, \theta_{\mathrm{o}}\right)
\end{gathered}
\end{aligned}
$$
當中$\phi_o$代表散射方向與材質表面的方位角,$\phi_i$代表光線入射方向與材質表面的方位角,$\rho$代表 `diffuse_color` 參數,$\sigma$代表粗糙度 `diffuse_roughness` 參數,實際意義為角度,範圍$[0, \pi/2]$。當兩個方位角越接近時,$\cos(\phi_i-\phi_o)$越接近1,代表更強的直接反射,反之則減少。另外,當$\sigma = 0$時,Oren-Nayar 將與 Lambertian Model 一樣為$D(\omega_i,\omega_o)=\frac{\cos\theta_i}{\pi}$。
### Fujii Oren-Nayar model
Yasuhiro Fujii(藤井 康裕)提出了一個改良的 Fujii model [Fujii2012] (簡稱 FON model),該模型優化Qualitative Model,維持良好的計算效能的同時減少了與標準模型的誤差值。FON model 式子如下:
$$
\begin{gathered}
F_{\mathrm{FON}}(\omega_n, \omega_i, \omega_o)=\rho\cdot(\omega_n \cdot \omega_i)\left(A+B \frac{s}{t}\right) \\
s=\omega_i \cdot \omega_o -(\omega_n \cdot \omega_i)(\omega_n \cdot \omega_o) \\
t= \begin{cases}1 & \text { if } s \leq 0 \\
\max (\omega_n \cdot \omega_i, \omega_n \cdot \omega_o) & \text { if } s>0\end{cases} \\
A=\frac{1}{\pi}\left(1-0.5 \frac{\sigma^2}{\sigma^2+0.33}+0.17 \rho \frac{\sigma^2}{\sigma^2+0.13}\right) \\
B=\frac{1}{\pi}\left(0.45 \frac{\sigma^2}{\sigma^2+0.09}\right) \\
\end{gathered}
$$
Fujii 提供一個更好的表示法,將$\sigma$替換成$\sigma^\prime$,代表非漫反射/漫法射之比值,範圍介於$0\leq\sigma^{\prime}\leq1$,並替換掉$A$ , $B$算法,最終式子如下 ($s$, $t$不變):
$$
\begin{gathered}
0\leq\sigma^{\prime}\leq1 \\
A=\frac{1}{\pi+\left(\frac{\pi}{2}-\frac{2}{3}\right) \sigma^{\prime}} \\
B=\frac{\sigma^{\prime}}{\pi+\left(\frac{\pi}{2}-\frac{2}{3}\right) \sigma^{\prime}}
\end{gathered}
$$
當$\rho > 0.97$時,FON model 的總反射能量小於1,違反能量守恆的問題,不過這個問題在Full Oren-Nayar Model 也同樣存在。Fujii並沒有進一步處理違法能量守恆的問題。

圖(十一) 取自[Fujii2012],Full model(藍色), Qualitative Model(綠色), Proposed Model(紅色) 之比較
### Energy-preserving Oren–Nayar model
Jamie Portsmouth, Peter Kutz, Stephen Hill 於2024年提出新的優化版本 Energy-preserving Oren–Nayar model (簡稱 EON) [Portsmouth2024]。該模型基於Fujii 的 FON model,加上多次反射的能量結果之和,以解決能量不守恆的問題。

(圖十二) 擷取自[Portsmouth2024],當diffuse color 全白時,QON在不同角度、Roughness值時的能量損失。理論上,在diffuse color = 1 的情況下,反射能量總和應該是1,僅分布不同。 Roughness = 0 時等同於Lambertian model,無能量損失。

(圖十三) 擷取自[Portsmouth2024] FON能量損失比起QON要來的少,但仍然有此問題。
EON 可以以以下式子形容:
$$
\mathbf{f}_{\mathrm{EON}}\left(\omega_i, \omega_o\right)=\mathbf{f}_{\mathrm{F}}\left(\omega_i, \omega_o\right)+\mathbf{f}_{\mathrm{F}}^{\mathrm{ms}}\left(\omega_i, \omega_o\right)
$$
$\mathbf{f}_{\mathrm{F}}$為 FON (Fujii) model, $\mathbf{f}_{\mathrm{F}}^{\mathrm{ms}}$為 FON model衍伸出的多重反射(multiple-scattering)的部分,如下面式子所示:
$$
\mathbf{f}_{\mathrm{F}}^{\mathrm{ms}}\left(\omega_i, \omega_o\right)=\frac{\mathcal{F}}{\pi}\left(\frac{1-\hat{E}_{\mathrm{F}}\left(\omega_i\right)}{1-\left\langle\hat{E}_{\mathrm{F}}\right\rangle}\right)\left(\frac{1-\hat{E}_{\mathrm{F}}\left(\omega_o\right)}{1-\left\langle\hat{E}_{\mathrm{F}}\right\rangle}\right)
$$
當中$\hat{E}_{\mathrm{F}}\left(\omega_i\right)$, $\hat{E}_{\mathrm{F}}\left(\omega_o\right)$代表的是FON model在均匀光照(uniform illumination)下的特定角度下的總反射能量(反射率)。$\left\langle\hat{E}_{\mathrm{F}}\right\rangle$代表所有角度下的平均反射率。$\hat{E}$上面的hat代表這些數值是基於$\rho = 1$ 時的數值。
$\mathcal{F}$所代表的意義為FON model的能量損失,也就是多次反射的總反射能量。當$\rho = 1$ 時 $\mathcal{F} = 1-\left\langle\hat{E}_{\mathrm{F}}\right\rangle$,以達到總能量為$1$,$\mathcal{F}$如下可以整理成以下式子:
$$
\begin{aligned}
\mathcal{F} & =\underbrace{\require{enclose}\enclose{horizontalstrike}{\boldsymbol{\rho}\left\langle\hat{E}_{\mathrm{F}}\right\rangle}}_{1 \text {-bounce }}+\underbrace{\boldsymbol{\rho}\left(1-\left\langle\hat{E}_{\mathrm{F}}\right\rangle\right) \boldsymbol{\rho}\left\langle\hat{E}_{\mathrm{F}}\right\rangle}_{2 \text {-bounces }}+\underbrace{\boldsymbol{\rho}^2\left(1-\left\langle\hat{E}_{\mathrm{F}}\right\rangle\right)^2 \boldsymbol{\rho}\left\langle\hat{E}_{\mathrm{F}}\right\rangle}_{3 \text {-bounces }}+\cdots \\
& =\boldsymbol{\rho}^2\left\langle\hat{E}_{\mathrm{F}}\right\rangle\left(1-\left\langle\hat{E}_{\mathrm{F}}\right\rangle\right) \sum_{n=0}^{\infty} \boldsymbol{\rho}^n\left(1-\left\langle\hat{E}_{\mathrm{F}}\right\rangle\right)^n \\
& =\frac{\boldsymbol{\rho}^2\left\langle\hat{E}_{\mathrm{F}}\right\rangle\left(1-\left\langle\hat{E}_{\mathrm{F}}\right\rangle\right)}{1-\boldsymbol{\rho}\left(1-\left\langle\hat{E}_{\mathrm{F}}\right\rangle\right)}
\end{aligned}
$$
所以,最後$\mathbf{f}_{\mathrm{F}}^{\mathrm{ms}}$可以整理成:
$$
\mathbf{f}_{\mathrm{F}}^{\mathrm{ms}}\left(\omega_i, \omega_o\right)=\frac{\boldsymbol{\rho}^2}{\pi} \frac{\left\langle\hat{E}_{\mathrm{F}}\right\rangle}{1-\boldsymbol{\rho}\left(1-\left\langle\hat{E}_{\mathrm{F}}\right\rangle\right)} \frac{\left(1-\hat{E}_{\mathrm{F}}\left(\omega_i\right)\right)\left(1-\hat{E}_{\mathrm{F}}\left(\omega_o\right)\right)}{\left(1-\left\langle\hat{E}_{\mathrm{F}}\right\rangle\right)}
$$
平均反射率如下:
$$
\left\langle\hat{E}_{\mathrm{F}}\right\rangle=A_{\mathrm{F}}+\left(\frac{2}{3}-\frac{28}{15 \pi}\right) B_{\mathrm{F}}
$$
單向反射率$\hat{E}_{\mathrm{F}}\left(\omega_o\right)$如以下所示:
$$ \hat{E}_{\mathrm{F}}\left(\omega_o\right)=\frac{\mathbf{E}_{\mathrm{F}}\left(\omega_o\right)}{\boldsymbol{\rho}}=A_{\mathrm{F}}+\frac{B_{\mathrm{F}}}{\pi} G_{\mathrm{F}}\left(\omega_o\right)
$$
當中$G_{\mathrm{F}}\left(\theta_o\right)$分為完整算法:
$$
\begin{gathered}
G_{\mathrm{F}}\left(\theta_o\right)=G_{\mathrm{q}}\left(\theta_o\right)-\frac{2}{3} \sin \theta_o \\
G_{\mathrm{q}}\left(\theta_o\right)=\sin \theta_o\left(\theta_o-\sin \theta_o \cos \theta_o\right)+\frac{2}{3} \tan \theta_o\left(1-\sin ^3 \theta_o\right)
\end{gathered}
$$
以及近似方法:
$$
G_{\mathrm{F}}\left(\theta_o\right) \approx \pi \sum_{k=1}^4 g_k\left(1-\cos \theta_o\right)^k
$$
| $g_1$ | $g_2$ | $g_3$ | $g_4$ |
|:------------:|:-----------:|:------------:|:------------:|
| 0.0571085289 | 0.491881867 | -0.332181442 | 0.0714429953 |
最後得到$\mathbf{f}_{\mathrm{F}}^{\mathrm{ms}}$的反射率為:
$$
\mathbf{E}_{\mathrm{F}}^{\mathrm{ms}}\left(\omega_o\right)=\mathcal{F} \frac{\left(1-\hat{E}_{\mathrm{F}}\left(\omega_o\right)\right)}{1-\left\langle\hat{E}_{\mathrm{F}}\right\rangle}
$$
[Portsmouth2024]也有提供 EON 對應的 Importance Sampling 的方法,詳情請見該Paper。
EON增加了計算複雜度,以下是作者統計的耗時表格:

(圖十四) 擷取自[Portsmouth2024],各項 Diffuse model 的計算耗時。

(圖十五) 擷取自[Portsmouth2024],EON與QON算圖結果比較。
### Parameters
| **Parameter** | Type | Range | Default | Description |
|:----------------- |:--------:|:---------:|:-------:|:------------------------------------------------- |
| base_weight | `float` | $[0,1]$ | 1 | Scalar multiplier of diffuse reflection component |
| base_color | `color3` | $[0,1]^3$ | (1,1,1) | Base reflection albedo color |
| diffuse_roughness | `float` | $[0,1]$ | 0 | Diffuse roughness $\rho$ for Oren-Nayar model |
## Specular Reflection
Dielectric Specular Reflection 的反射基於微表面反射:
$$
f(\mathbf{\omega_\mathrm{i}}, \mathbf{\omega_\mathrm{o}}, \omega_\mathbf{n})= \frac{F(\mathbf{\omega_\mathrm{i}}, \omega_\mathbf{h})D(\omega_\mathbf{h}) G(\mathbf{\omega_\mathrm{i}}, \mathbf{\omega_\mathrm{o}}, \omega_\mathbf{h})}{4(\mathbf{\omega_\mathrm{i}} \cdot \omega_\mathbf{n})(\omega_\mathbf{n} \cdot \mathbf{\omega_\mathrm{o}})}
$$
當中 Distribution Function 採用 Trowbridge-Reitz (GGX) model $D_{GGX(TR)}$,Shadow-masking 採用 GGX Smith Masking-Shadowing Model。
Dielectric Fresnel Factor ,在90度時為 Fresnel Equations 當中的 normal incidence reflectance:
$$
F=\left|\frac{1-\eta}{1+\eta}\right|^2
$$當中$\eta_s$代表介面 IOR 的比值。在Coat層存在時,必須考量到光線在Coat層與 Specular Reflection層介質交界面的IOR關係:
$$
\eta=\operatorname{lerp}\left(n_b / n_a, n_b / n_c, \mathrm{C}\right)
$$ 當中$n_a$是環境IOR,$n_b$是材質IOR,$n_c$是Coat層IOR,$C$為參數 `coat_weight`。
接著必須考量到 $\xi_s$ (參數`specular_weight`),要把上述Dielectric Fresnel Factor 中的$\eta$ 替換成以下$\eta^{\prime}$:
$$
\eta^{\prime}=\frac{1+\epsilon}{1-\epsilon} \quad \text { with } \quad \epsilon=\operatorname{sgn}\left(\eta-1\right) \sqrt{\xi_s F}
$$
Specular reflection, Specular Transmission 都使用$\eta^{\prime}$ 來計算 Fresnel Factor。
不同角度的Fresnel Factor值要用其他公式取的或是近似(e.g. Schick approximation)
### Parameters
| **Parameter** | Type | Range | Default | Description |
|:------------------- |:--------:|:---------:|:-------:|:-------------------------------------------------- |
| specular_weight | `float` | $[0,∞)$ | 1 | Scalar multiplier of specular reflection component |
| specular_color | `color3` | $[0,1]^3$ | (1,1,1) | Tints the dielectric Fresnel factor |
| specular_roughness | `float` | $[0,1]$ | 0.5 | Roughness of NDF of specular reflection |
| specular_anisotropy | `float` | $[0,1]$ | 0 | Anisotropy of NDF of specular reflection |
| specular_rotation | `float` | $[0,1]$ | 0 | Anisotropy rotation of NDF of specular reflection |
| specular_ior | `float` | $[0,∞]$ | 1.5 | Refractive index for Fresnel factor of specular reflection |
## Metal
Metal Reflection BRDF也同樣是基於微表面反射:
$$
f(\mathbf{\omega_\mathrm{i}}, \mathbf{\omega_\mathrm{o}}, \omega_\mathbf{n})= \frac{F(\mathbf{\omega_\mathrm{i}}, \omega_\mathbf{h})D(\omega_\mathbf{h}) G(\mathbf{\omega_\mathrm{i}}, \mathbf{\omega_\mathrm{o}}, \omega_\mathbf{h})}{4(\mathbf{\omega_\mathrm{i}} \cdot \omega_\mathbf{n})(\omega_\mathbf{n} \cdot \mathbf{\omega_\mathrm{o}})}
$$
當中 Distribution Function 採用 Trowbridge-Reitz (GGX) model $D_{GGX(TR)}$,Shadow-masking 採用 GGX Smith Masking-Shadowing Model。
不過與Specular Reflection不一樣的部分是,Metal Reflection採用不一樣的Frenel Factor Model。主流PBR renderer常用的Frenel Factor Model包含:
* **Schlick Approximation (Schlick's model or F90 model)**
Unreal Engine
* **Hoffman's model (F82 model)**
* **F82-Tint model (Adobe F82 model)**
Blender, MDL SDK, Adobe, OpenPBR, Unreal Engine(future work)
上述三者有演變關係,CrossPBR採用三者中由Adobe 提出,最新的F82-Tint model。
### Schlick Approximation
Schlick Model 分成 Single & Double Expressions 兩種表現方式。分別透過簡單的Function來近似Fresnel Relectance。
Single Expression 公式為:
$$
F(\theta_h) \approx {F0}+(1-F0)(1-\cos \theta_h)^5
$$
當中 ${F0}$ 代表光線在0°時的值,也就是$\theta = 0$時的反射率$R_0$。而這個數值為:
$$
R_0=\left(\frac{n_b-n_a}{n_b+n_a}\right)^2
$$
當中$n_b$為材質介質的IOR, $n_a$為環境介質的IOR。這個值依材質本身顏色而定,也就是Material Parameters中的`base_color`。
Double Expression 公式為:
$$
F(\theta_h) \approx {F0}+(1-{F0})(1-\cos \theta_h)^5 + {F90}(1-({F0}+(1-{F0})(1-\cos \theta_h)^5))
$$
其中${F90}$為邊緣(法向量與視角垂直)的顏色,依材質本身特性而定,為Material parameter之一的`specular_color`。
### Hoffman's model (F82)
為來要達到更高精確度,並提供藝術家可以調整邊緣衰減顏色,Hoffman 基於 Schlick approximation並重整Lazanyi’s model的參數以後得到:
$$
F_{F82}(\theta_h) \approx F0+(1-F0)(1-\cos \theta_h)^5-a \cos \theta_h(1-\cos \theta_h)^\alpha
$$
其中$a$為:
$$
a=\frac{F0+(1-F0)\left(1-\cos \theta_{\max }\right)^5-h}{\cos \theta_{\max }\left(1-\cos \theta_{\max }\right)^6}
$$
套入$cos \theta_{\max } = \frac{1}{7}$,也就是約為$cos(82°)$得到:
$$
a=\frac{823543}{46656}(F0-F82)+\frac{49}{6}(1-F0)
$$
其中$F82$為光線在$cos \theta_{\max }$的反射顏色 $F(cos \theta_{\max })$,也就是82°左右的反射顏色,這個顏色直接定義為Material parameter `specular_color` ,供藝術家直接調整邊緣色。
比起schlick model, F82 model有與 ground truth 更小的誤差。

圖(十六) 取自[Hoffman2019]的Slides,F82 model(左圖)、Schlick model(右圖)對於Ground truth 誤差值得比較。明顯可看出F82 model有更小的誤差。
### F82-Tint model (Adobe F82)
[Kutz2021] (Adobe 所屬)提出一個修改版本的Naty Hoffman's model (F82 model),稱為 `F82-Tint`,有時被其他人稱為Adobe F82。
F82-Tint 的公式如下:
$$
F_{\text {F82-T}}(\theta_h)=F0+(1-F0)(1-\cos \theta_h)^5-b \cos_h \theta(1-\cos \theta_h)^6
$$
其中參數 $b$ 為:
$$
b=\frac{\left(F0+(1-F0)\left(1-\cos \theta_{\max }\right)^5\right)(1-t)}{\cos \theta_{\max }\left(1-\cos \theta_{\max }\right)^6}
$$
參數$t$為:
$$
t=\frac{F82}{F0+(1-F0)\left(1-\cos \theta_{\max }\right)^5}
$$
此Model當中,$cos \theta_{\max }$與Naty Hoddman's model一樣為$cos \theta_{\max } = \frac{1}{7}$,也就是直接透過Parameter定義82°時的顏色`specular_color`。
#### F82-Tint 與 F82 差異
下圖為兩種Model比較,左圖為F82,右圖為F82-Tint,邊緣色為白色`(1.0, 1.0, 1.0)`:

圖(十七) 擷取自[Kutz2021]
* 相比於F82,F82-Tint有更為柔和的邊緣色,並且更貼近於原本的Schlick approximation。
* 在F82-Tint Model中,如果邊緣色為白色,會降低Schlick反射,所以對於F82-Tint來說可以用白色作為預設邊緣色。
### Parameters
| **Parameter** | Type | Range | Default | Description |
|:------------------- |:--------:|:---------:|:-------:|:----------------------------------------------------------- |
| metalness | `float` | $[0,1]$ | 0 | The ratio of metal component |
| base_weight | `float` | $[0,1]$ | 1 | Scalar multiplier of `base_color` |
| base_color | `color3` | $[0,1]^3$ | (1,1,1) | Color of Fresnel reflection at normal incidence (F0) |
| specular_color | `color3` | $[0,1]^3$ | (1,1,1) | Color of Fresnel reflection at near-grazing incidence (F82) |
| specular_roughness | `float` | $[0,1]$ | 0.5 | Roughness of NDF of metal reflection |
| specular_anisotropy | `float` | $[0,1]$ | 0 | Anisotropy of NDF of metal reflection |
| specular_rotation | `float` | $[0,1]$ | 0 | Anisotropy rotation of NDF of metal reflection |
## Coat
Coat 是位於 Base Substrate 上方的半透明、均質且等厚度的塗層,並與下層 Base Substrate 的表面平行。在現實世界中,例如打蠟過的地板等材質,可以使用 Coat 層來描述其光學特性。
Coat 半透明塗層的反射分佈模型與 Specular Reflection 一致,並採用 GGX 反射分佈進行設計。其 Fresnel 因子與 Specular Reflection 相同:
$$
F = \left|\frac{1 - \eta_s}{1 + \eta_s}\right|^2
$$
其中的 IOR 係數 $\eta_s$直接由參數 `coat_ior` 與環境介質的 IOR 進行計算。
參數 `coat_color` 定義為光線沿法線方向穿透半透明介質時,該介質的吸收率平方(即光線進入 Coat 層並反射出來後的總吸收率為 `coat_color`)。當光線穿透 Coat 層時,會根據 `coat_color` 參數進行衰減,從而產生藝術家可控的顏色效果。
### Parameters
| **Parameter** | Type | Range | Default | Description |
|:--------------- |:--------:|:---------:|:-------:|:------------------------------------------------------ |
| coat_weight | `float` | $[0,1]$ | 0 | The weight/coverage of coat component |
| coat_color | `color3` | $[0,1]^3$ | (1,1,1) | Square of normal-incidence transmittance |
| coat_roughness | `float` | $[0,1]$ | 0.5 | Roughness of NDF of caot reflection |
| coat_anisotropy | `float` | $[0,1]$ | 0 | Anisotropy of NDF of caot reflection |
| coat_rotation | `float` | $[0,1]$ | 0 | Animsotropy rotation of NDF of caot reflection |
| coat_ior | `float` | $[0,∞)$ | 1.5 | Refractive index for fresnel factor of caot reflection |
## Sheen
OpenPBR 與 Blender 採用 [Zeltner2022] 模型,該模型以[Heitz2015]為基礎為設計。
[Zeltner2022] 模型方程式表示如下:
$$
f_r\left(\omega_{\mathrm{i}}, \omega_{\mathrm{o}}\right)=C_{\text {sheen }} R_{\mathrm{i}} D_{\mathrm{o}}\left(\frac{\mathbf{M}_{\mathrm{i}}^{-1} \omega_{\mathrm{o}}}{\left\|\mathbf{M}_{\mathrm{i}}^{-1} \omega_{\mathrm{o}}\right\|}\right) \frac{\left|\mathbf{M}_{\mathrm{i}}^{-1}\right|}{\left\|\mathbf{M}_{\mathrm{i}}^{-1} \omega_{\mathrm{o}}\right\|^3}
$$
當中$C_{\text {sheen}}$為藝術家自訂(Artist defined)的color參數,$R_i$為方向性半球反射率,取決於入射角 $\theta_i$,表示特定方向的反射光量。$D_o$為正規化的餘弦分佈(cosine distribution)函數,根據出射方向$\theta_o$塑造反射分佈。
$\mathbf{M}_{\mathrm{i}}^{-1}$ 為3×3的線性變換(linear transform)矩陣,與入射角和藝術家設定的sheen roughness參數相關。

圖(十八) 取自[Zeltner2022],該模型效果展示
該篇論文沒有解釋$\mathbf{M}_{\mathrm{i}}^{-1}$, $R_i$, $D_o$之算法。詳細內容請見該Paper的 github: [ltc-sheen](https://github.com/tizian/ltc-sheen)
### Parameters
| **Parameter** | Type | Range | Default | Description |
|:--------------- |:--------:|:---------:|:-------:|:------------------------------------------------------- |
| sheen_weight | `float` | $[0,1]$ | 0 | The weight/coverage of sheen component |
| sheen_color | `color3` | $[0,1]^3$ | (1,1,1) | Reflection color $C_{\text {sheen}}$ of sheen component |
| sheen_roughness | `float` | $[0,1]$ | 0.5 | Roughness of sheen reflection |
## thin-film
thin-film 的定義為 Base substrate 上,一層平行於基礎表面的半透明Dielectric 薄膜,當中介質均勻,且厚度相等,完全透明不吸收光線。通常介於幾奈米到1、2微米之間。
當光線從環境進入到 thin-film層時,會發生反射與透射,透射的光線進入到thin-film與主材質間時,也會發生反射與透射。當thin-film與主材質間的反射光回到環境時,就會與第一次反射的光產生干涉。
由於可見光的波長大約落在 380-780nm間,不同波長的電磁波所產生的相位移(Phase shift)不一,這也導致不同波長的電磁波的干涉結果會不一樣。觀察者最後會看到虹彩色(Iridescence)的效果,泡泡上的虹彩、地面油汙的虹彩就是屬於 thin-film。推薦一部簡單易懂的 [thin-film動態解說影片(youtube)](https://www.youtube.com/watch?v=xjMjWtntm9k)。

圖(十五) 說明單一波長的光線進入含 thin-film 的材質表面時,反射方向產生干涉之成因。
在計算thin-film時,僅考慮干涉產生的虹彩色效果,不考慮透明介質造成的其他物理性質(例如Coat層的顏色、吸收係數)。影響的會是下一層Component(例如metal層)的Frsnel factor。
想要精準計算干涉後的thin-film反射率,可以將可見光的不同波段轉到XYZ色域,再透過 Airy summation 公式來求干涉結果,最後轉回RGB色域。或是透過 Belcour and Barla thin-film model [Belcour2017] 等模型來近似。
### Airy Summation (in XYZ Color Space)
NVIDIA [ MDL SDK Thin-film Implementation Source Code](https://github.com/NVIDIA/MDL-SDK/blob/b92761697ffb5d3b00dfbe3605d786743492bca4/src/mdl/jit/libbsdf/libbsdf_utilities.h#L1215-L1373).
此段落將介紹 MDL SDK實作 Thin-film 反射率的方法,方法取自 Born/Wolf - "Principles of Optics", section 13.4.2, equation 30。[24][25]
當一個波長的光進入到單層、不吸收光的 thin-film 後,總反射係數可以用Airy Summation求和:
$$
r = \frac{r_{01} + r_{12} e^{i 2\beta}}{1 + r_{01} r_{12} e^{i 2\beta}}
$$當中$r_{01}$為從環境到thin-film的反射係數,$r_{12}$為thin-film到基底材質的反射係數。$\beta$為通過thin-film的相位差,$e^{i 2\beta}$為來回反射一次的相位變化。
相位差$\beta$為:$$\beta = \frac{2\pi n_1 d \cos\theta_1}{\lambda_{wave}}$$當中$n_1$為 thin-film 的IOR,$\lambda_{wave}$為光線在真空中的波長,$d$為 thin-film 厚度,$\theta_1$為thin-film 內光線的折射角。反射係數$r_{01}$, $r_{12}$要考慮到dielectric(環境到thin-film)與conductor(thin-film到base)的差別,且S、P偏振的係數不一樣。
而反射率 $R$ 為:
$$R = |r|^2 = \frac{|r_{01} + r_{12} e^{i 2\beta}|^2}{|1 + r_{01} r_{12} e^{i 2\beta}|^2}$$展開後可以寫成:$$R = \frac{R_{01} + R_{12} + 2 \sqrt{R_{01} R_{12}} \cos(2\beta + \phi_{12})}{1 + R_{01} R_{12} + 2 \sqrt{R_{01} R_{12}} \cos(2\beta + \phi_{12})}$$其中 $R_{01} = |r_{01}|^2$, $R_{12} = |r_{12}|^2$,$\phi_{12}$ 為 $r_{12}$ 的相位。
在分別計算S偏振及R偏振之後,得到總反射率:$$R = \frac{R_s + R_p}{2}$$
MDL SDK 對16個波長的可見光進行取樣求平均值,作為整個可見光(400nm-700nm)的積分(每18.75nm的波長差取樣一次,且為XYZ色域`float3`數值)。
由於這是在XYZ色域進行的計算,最後要再轉成RGB色域。
### Belcour and Barla thin-film model
- 想要求這個表面的反射係數,必須對這些折射反射的結果進行統計。Belcour and Barla的方式是轉到傅立葉域進行預積分。

圖(十九)擷取自[Belcour2017]
- 最後實作的方式,是預先把積分結果事先存到 N×2 的RGB貼圖中,N代表傅立葉維度。

圖(二十)擷取自[Belcour2017]

圖(二十一)擷取自[Belcour2017]
- $Dinc = 2\eta_2d$,所以thin-film在這個model之下可以使用兩個Parameters: thin_film_ior ($\eta_2$), thin_film_thickness ($d$)來描述。
- 以下是成果圖之一

圖(二十二) 擷取自[Belcour2017]
- 跟ground truth比較,已經看不出有太大差異,跟1992年的另個模型已經進步很多。

圖(二十三) 擷取自[Belcour2017]
### Parameters
| **Parameter** | Type | Range | Default | Description |
|:------------------- |:-------:|:-------:|:-------:|:----------------------------- |
| thin_film_weight | `float` | $[0,1]$ | 0 | The weight of thin-film |
| thin_film_thickness | `float` | $[0,∞)$ | 0.5 | Thickness of the film in μm |
| thin_film_ior | `float` | $[0,∞)$ | 1.4 | Refractive index of thin-film |
## Subsurface
對於一個無塗層的電介質材質(例如人類皮膚),我們可以將從 outgoing,$o$ 方向觀察到的總能量視為 $E_{specular}+E_{scattered}$ ,也就是在材質表面直接反射的光線,再加上進入材質介質後,經散射後再從表面發出的能量。這些散射的能量,通常來自多個不同位置的入射光線 $i$ 能量。目前有許多model可以近似此效果(例如Christensen-Burley, SeparableSSS 等),或是使用Path tracing技術來達到真實 unbias 取樣(例如 Bledner Random Walk)。

圖(二十四) Subsurface材質為直接反射、次表面散射之和。
以下是Subsurface相關參數說明:
* **Mean Free Path**:
Mean free path(平均自由徑, MFP)為float3 (RGB)數值,是`subsurface_radius` * `subsurface_radius_scale` 兩數值相乘之結果。MFP 是指粒子(如光子、電子或氣體分子)在介質中,連續碰撞之間的平均行進距離。可藉由`subsurface_radius_scale`控制不同通道(RGB)之MFP。
密度較高的物質(例如人類皮膚),通常有著較小的MPF,反之,密度較低的物質(例如霧氣)則有較高的MPF。
* `subsurface_color`: 控制 Multi-scatter 散射的顏色,最後觀察到的顏色為散射的能量積分與此數值的乘積。
* `subsurface_anisotropy`:決定光線行徑的機率分布,數值介於$[-1,1]$,數值越高代表光線越有可能向前行徑,數值為$0$時光線行徑方向為平均分布。
現在有許多方式可以求或近似Subsurface BSDF,包含適合Path tracing或Rasterization的渲染環境。舉例來說:
* Path tracing
* Blender Random Walk
* Rasterization (approximation)
* Christensen-Burley approximation
* Separable subsurface scattering (4S)
### Parameters
| **Parameter** | Type | Range | Default | Description |
|:----------------------- |:--------:|:---------:|:-------------:|:----------------------------------------------------------------------------- |
| subsurface_weight | `float` | $[0,1]$ | 0 | The weight of subsurface component |
| subsurface_color | `color3` | $[0,1]^3$ | (0.5,0.5,0.5) | Reflection color $C_{\text {sheen}}$ of sheen component |
| subsurface_radius | `float` | $[0,∞)$ | 1 | Length of Mean Free Path |
| subsurface_radius_scale | `color3` | $[0,1]^3$ | (1,1,1) | RGB multiplier to `subsurface_radius` |
| subsurface_anisotropy | `float` | $[-1,1]$ | 0 | Controls scattering direction; higher values bias light forward, 0 = uniform. |
## Transmission
### Specular Transmission
當光進入透明材質表面時,根據 Fresnel Equations,部分光線會反射,部分光線會進入介質。在接觸兩個介質的交界處時,根據其表面粗糙度,也會產生一個分布函數。
根據 Fresnel Equations,在理想平面且不考慮介質吸收或其他原因,為了符合能量守恆,進入介質的能量比率透射率 transmittance $T$ 為 $T= 1-R$。
Specular Transmission (Specular BTDF) 使用的模型為 Trowbridge-Reitz (GGX) Normal Distribution Model,也就是Specular Reflection NDF 在 Normal向量的鏡像,與 Specular BRDF 共用參數。
### Interior Medium
光通過介質時遵守比爾-朗伯定律(Beer–Lambert law),也就是光線在行經介質`transmission_depth`距離後,能量會依照一定的比例被介質吸收,恰好變為`transmission_color`倍。
可以將吸收係數(absorption coefficient)視為(省略莫爾濃度參數):$$\mu_a = \frac{T_{color}}{\lambda}$$當中$T_{color}$為`transmission_color`,$\lambda$為`transmission_depth`參數。若$\lambda = 0$,則視為常數透明色(不被深度影響吸收率)。
散射係數(scattering coefficient) $\mu_s$ 則為:$$\mu_s = \frac{S}{\lambda}$$當中$S$為參數`transmission_scatter`。
衰減係數$\mu$則是吸收係數以及散射係數之和:$$\mu=\mu_a+\mu_s$$
`transmission_scatter_anisotropy` 的範圍為$[-1,1]$,用來描述光線散射時方向的分布,是Henyey—Greenstein phase function 中的 anisotropy 係數。當數值為$0$時,表示材質為各向同性;當數值$<0$時,則容易向後方散射;當數值$>0$時,則容易向前方散射。
除了衰減係數以外,阿貝數(Abbe number)用來描述光的色散(dispersion)程度,適用於玻璃、聚酯樹脂、聚碳酸酯等半透明物質。當阿貝數越低時,色散程度越大,阿貝數越高時,色散程度越小。
色散係數$V_d$為$$V_d = \frac{transmission\_dispersion\_abbe\_number }{transmission\_dispersion\_scale}$$參數`transmission_dispersion_scale`範圍$[0,1]$,若數值為0,則代表$V_d$無限大,完全沒有色散。
### Parameters
| **Parameter** | Type | Range | Default | Description |
|:----------------------------------- |:--------:|:---------:|:-------:|:------------------------------------------------------- |
| specular_weight | `float` | $[0,∞)$ | 1 | Effects other specular parameters |
| specular_color | `color3` | $[0,1]^3$ | (1,1,1) | Tints the dielectric Fresnel factor (reflectance) |
| specular_roughness | `float` | $[0,1]$ | 0.5 | Roughness of NDF of specular BTDF |
| specular_anisotropy | `float` | $[0,1]$ | 0 | Anisotropy of NDF of specular BTDF |
| specular_rotation | `float` | $[0,1]$ | 0 | Anisotropy rotation of NDF of specular BTDF |
| specular_ior | `float` | $[0,∞]$ | 1.5 | Refractive index for Fresnel factor of specular BSDF |
| transmission_weight | `float` | $[0,1]$ | 0 | The weight of transmission component |
| transmission_color | `color3` | $[0,1]^3$ | (1,1,1) | The transmission color $T$ |
| transmission_depth | `float` | $[0,∞)$ | 0 | Factor λ in the scattering and absorption coefficient. |
| transmission_scatter | `color3` | $[0,1]^3$ | (0,0,0) | Scattering coefficient of the interior medium |
| transmission_scatter_anisotropy | `float` | $[-1,1]$ | 0 | Anisotropy of the interior medium |
| transmission_dispersion_scale | `float` | $[0,1]$ | 0 | The denominator of Physical Abbe number |
| transmission_dispersion_abbe_number | `float` | $[0,∞)$ | 20 | Physical Abbe number of the interior medium |
## Emission
Emission 層描述 Base Substrate 自體發光的情形,會與Coat, Sheen層有所反映。
Emission 自發光材質有對應的 Emission Distribution Function (EDF),用來描述能量發射的分布情形。
最單純的EDF為方向均勻 (directionally uniform) EDF,也就是任意方向的能量均等。
發光的能量必須大於等於0,計算上必須考慮`coat_color` 帶來的影響,最後的Emission能量為:
`emission_luminance` * `emission_color` * lerp(1, `coat_color`, `coat_weight`)
### Parameters
| **Parameter** | Type | Range | Default | Description |
|:------------------ |:--------:|:---------:|:-------:|:------------------------- |
| emission_luminance | `float` | $[0,∞)$ | 0 | Emission luminance |
| emission_color | `color3` | $[0,1]^3$ | (1,1,1) | Emission color multiplier |
## Geometry
### Geometry Normal
為了要更精確描述一個模型的細節,同時避免模型的三角面過高,可以透過 Normal Textures 來修飾宏觀幾何的法向量(例如木頭紋路上微小的表面起伏)。根據繪圖API或是Renderer的不同,計算修飾過後的Normal $\omega_n^\prime$ 的方式可能不同,常見的方式之一如下:
$$\omega_n^\prime = 2\omega_{t}(tex\_n_R-0.5)+2\omega_{b}(tex\_n_G-0.5)+\omega_{n}tex\_n_B$$當中$tex\_n_R$, $tex\_n_G$, $tex\_n_B$ 分別為取樣自Normal Texture的RGB數值。
Base substrate 的 Components (Specular Reflection, Metal, Diffuse Reflection, Subsurface, Transmission) 共用 `geometry_normal` 參數,代表宏觀法向量的偏移。Coat 層則是有獨立的`geometry_coat_normal`參數來描述法向量的偏移。
Transparency, Emission, Sheen 則無 Geometry Normal參數。
#### Parameters
| **Parameter** | Type | Range | Default | Description |
|:-------------------- |:---------:|:---------:|:-------:|:--------------------------------------- |
| geometry_normal | `vector3` | $[0,1]^3$ | (0,0,1) | Modifies base substrate's normal vector |
| geometry_coat_normal | `vector3` | $[0,1]^3$ | (0,0,1) | Modifies coat's normal vector |
### Tansparency
有別於 transmission 描述光線穿透材質的情形,Transparency主要在於描述該幾何的存在與否或是幾何上的不透明度。
幾何不透明度 $opacity$ 如果為0,代表該位置為缺口。通常會透過 `geometry_enable_cutoff` 來進一步設定幾何是否為缺口:
```cpp
if(geometry_enable_cutoff){
opacity = geometry_opacity > geometry_cutoff_threshold ? 1 : 0 ;
}
else{
opacity = geometry_opacity;
}
```
若$0<opacity<1$,在物理上並不是那麼合理 (代表該位置的微表面有部分缺口)。多數Renderer可能無法渲染此效果。
#### Parameters
| **Parameter** | Type | Range | Default | Description |
|:------------------------- |:---------:|:-------------:|:-------:|:------------------------------------------------------------- |
| geometry_opacity | `float` | $[0,1]$ | 1 | Opacity of the surface |
| geometry_enable_cutoff | `boolean` | {false, true} | false | Enables surface cutoff (binarizes the opacity value) |
| geometry_cutoff_threshold | `float` | $[0,1]$ | 0.5 | Threshold value used when `geometry_enable_cutoff` is enabled |
### Thin-walled case
當`geometry_thin_walled` 為 true時,材質會變為thin-walled模式,也就是無限薄的薄膜,並且變成雙面結構,如下圖:

圖(十九) CrossPBR Thin-walled case 結構圖
在thin-walled模式下,部分Component可能會會改變其特性。
* Metal, Diffuse Reflection 一樣為完全不透明材質,不過變為雙面。
* 由於不再考慮厚度,Transmission 不再有散射及色散,不過`transmission_color`將直接作為恆定的吸收係數(absorption coefficient)。
* 同樣的,由於不再考慮厚度,Subsurface將依照比例拆解為 Diffuse Reflection, Diffuse Transmission: 根據`subsurface_anisotropy`的數值,$-1$代表完全為Diffuse Reflection,$1$代表完全為Diffuse Transmission,$0$代表各占一半。

圖(二十五) 玻璃材質 `geometry_thin_walled` 開啟、關閉之比較,使用 Omniverse kit 渲染。左邊的球為非 thin_walled,右邊的球為 thin_walled,其餘參數直接相同。左邊的球由於中間有介質,所以有很明顯的折射,後方物體成像上下顛倒;右邊的球中間無介質,代表這是無限薄的一層玻璃球。
#### Parameters
| **Parameter** | Type | Range | Default | Description |
|:-------------------- |:---------:|:-------------:|:-------:|:----------------------- |
| geometry_thin_walled | `boolean` | {false, true} | false | Enable thin-walled mode |
# CrossPBR Parameters List
| **Parameter** | Type | Range | Default | Unit |
|:----------------------------------- |:---------:|:-------------:|:-------------:|:----:|
| **Base** | | | | |
| base_weight | `float` | $[0,1]$ | 1 | |
| base_color | `color3` | $[0,1]^3$ | (1,1,1) | |
| **metalness** | | | | |
| metalness | `float` | $[0,1]$ | 0 | |
| **Diffuse Reflection** | | | | |
| diffuse_roughness | `float` | $[0,1]$ | 0 | |
| **Specular** | | | | |
| specular_weight | `float` | $[0,∞)$ | 1 | |
| specular_color | `color3` | $[0,1]^3$ | (1,1,1) | |
| specular_roughness | `float` | $[0,1]$ | 0.5 | |
| specular_anisotropy | `float` | $[0,1]$ | 0 | |
| specular_rotation | `float` | $[0,1]$ | 0 | |
| specular_ior | `float` | $[0,1]$ | 1.5 | |
| **Transmission** | | | | |
| transmission_weight | `float` | $[0,1]$ | 0 | |
| transmission_color | `color3` | $[0,1]^3$ | (1,1,1) | |
| transmission_depth | `float` | $[0,∞)$ | 0 | |
| transmission_scatter | `color3` | $[0,1]^3$ | (0,0,0) | |
| transmission_scatter_anisotropy | `float` | $[-1,1]$ | 0 | |
| transmission_dispersion_scale | `float` | $[0,1]$ | 0 | |
| transmission_dispersion_abbe_number | `float` | $(0,∞)$ | 20 | |
| **Subsurface** | | | | |
| subsurface_weight | `float` | $[0,1]$ | 0 | |
| subsurface_color | `color3` | $[0,1]^3$ | (0.5,0.5,0.5) | |
| subsurface_radius | `float` | $[0,∞)$ | 1 | |
| subsurface_radius_scale | `color3` | $[0,1]^3$ | (1,1,1) | |
| subsurface_anisotropy | `float` | $[-1,1]$ | 0 | |
| **Coat** | | | | |
| coat_weight | `float` | $[0,1]$ | 0 | |
| coat_color | `color3` | $[0,1]^3$ | (1,1,1) | |
| coat_roughness | `float` | $[0,1]$ | 0.5 | |
| coat_anisotropy | `float` | $[0,1]$ | 0 | |
| coat_rotation | `float` | $[0,1]$ | 0 | |
| coat_ior | `float` | $(0,∞)$ | 1.5 | |
| **Sheen** | | | | |
| sheen_weight | `float` | $[0,1]$ | 0 | |
| sheen_color | `color3` | $[0,1]^3$ | (1,1,1) | |
| sheen_roughness | `float` | $[0,1]$ | 0.5 | |
| **Emission** | | | | |
| emission_luminance | `float` | $[0,∞)$ | | |
| emission_color | `color3` | $[0,1]^3$ | | |
| **Thin-film** | | | | |
| thin_film_weight | `float` | $[0,1]$ | 0 | |
| thin_film_thickness | `float` | $[0,∞)$ | 0.5 | μm |
| thin_film_ior | `float` | $[0,∞)$ | 1.4 | |
| **Geometry** | | | | |
| geometry_normal | `vector3` | $[0,1]^3$ | (0,0,1) | |
| geometry_coat_normal | `vector3` | $[0,1]^3$ | (0,0,1) | |
| geometry_opacity | `float` | $[0,1]$ | 1 | |
| geometry_enable_cutoff | `boolean` | {false, true} | false | |
| geometry_cutoff_threshold | `float` | $[0,1]$ | 0.5 | |
| geometry_thin_walled | `boolean` | {false, true} | false | |
# References
1. **[OpenPBR]** Zap Andersson, Paul Edmondson, Julien Guertault, Adrien Herubel, Alan King, Peter Kutz, Andréa Machizaud, Jamie Portsmouth, Frédéric Servant, and Jonathan Stone. 2024. *OpenPBR Surface Specification*. Academy Software Foundation (ASWF). Retrieved from https://academysoftwarefoundation.github.io/OpenPBR/
2. **[Autodesk Standard Surface]** Iliyan Georgiev, Jamie Portsmouth, Zap Andersson, Adrien Herubel, Alan King, Shinji Ogaki, and Frederic Servan. *Autodesk Standard Surface*. Autodesk, Inc. Retrieved from https://autodesk.github.io/standard-surface/
3. Qian Mo. *Physically Based Rendering (PBR) White Paper*. Retrieved from https://github.com/QianMo/PBR-White-Paper/tree/master
4. **[Walter2007]** Bruce Walter, Stephen R. Marschner, Hongsong Li, and Kenneth E. Torrance. 2007. Microfacet models for refraction through rough surfaces. *In EGSR '07*.
5. P. Beckmann and A. Spizzichino. 1963. *The Scattering of Electromagnetic Waves from Rough Surfaces*.
6. **[Cook and Torrance 1982]** Robert L. Cook and Kenneth E. Torrance. 1982. A reflectance model for computer graphics. *ACM Trans. Graph.* 1, 1 (Jan. 1982), 7–24.
7. S. Trowbridge and K. P. Reitz. 1975. Average irregularity representation of a rough ray reflection. *J. Opt. Soc. Am.* 65, 5, 531–536.
8. *Physically Based Rendering: Microfacet Models*, Section 8.4. Retrieved from https://pbr-book.org/3ed-2018/Reflection_Models/Microfacet_Models
9. *Physically Based Rendering Algorithms: A Comprehensive Study in Unity3D - Part 2*. Retrieved from https://mudstack.com/blog/tutorials/physically-based-rendering-study-part-2/
10. Brian Karis. 2013. Real shading in Unreal Engine 4. *Physically Based Shading Theory and Practice*, 4(3), 1.
11. **[HEITZ2014]** Eric Heitz. 2014. Understanding the masking-shadowing function in microfacet-based BRDFs. *J. Computer Graphics Techniques* 3, 2, 32–91.
12. **[Ross et al. 2005]** V. Ross, D. Dion, and G. Potvin. 2005. Detailed analytical approach to the Gaussian surface bidirectional reflectance distribution function specular component applied to the sea surface. *J. Opt. Soc. Am. A* 22, 11, 2442–2453.
13. **[ASHIKMIN 2000]** M. Ashikmin, S. Premože, and P. Shirley. 2000. A microfacet-based BRDF generator. *Proc. SIGGRAPH ’00*, 65–74.
14. **[VAN GINNEKEN 1998]** B. Van Ginneken, M. Stavridi, and J. J. Koenderink. 1998. Diffuse and specular reflectance from rough surfaces. *Appl. Opt.* 37, 1 (Jan), 130–139.
15. **[HEITZ 2013]** E. Heitz, C. Bourlier, and N. Pinel. 2013. Correlation effect between transmitter and receiver azimuthal directions on the illumination function from a random rough surface. *Waves in Random and Complex Media* 23, 3, 318–335.
16. **[Oren 1994]** M. Oren and S. K. Nayar. 1994. Generalization of Lambert’s reflectance model. *Proc. SIGGRAPH ’94*, 239–246.
17. **[Fujii2012]** Yasuhiro Fujii. A tiny improvement of Oren-Nayar reflectance model. Retrieved from https://mimosa-pudica.net/improved-oren-nayar.html
18. **[Schlick1994]** Christophe Schlick. 1994. An inexpensive BRDF model for physically-based rendering.
19. **[Belcour2017]** Laurent Belcour and Pascal Barla. 2017. A practical extension to microfacet theory for the modeling of varying iridescence. *ACM Trans. Graph.* 36, 4.
20. **[Zeltner2022]** Tizian Zeltner, Brent Burley, and Matt Jen-Yuan Chiang. 2022. Practical multiple-scattering sheen using linearly transformed cosines. *ACM SIGGRAPH Talks*.
21. **[Heitz2015]** Eric Heitz, Jonathan Dupuy, Cyril Crassin, and Carsten Dachsbacher. 2015. The SGGX microflake distribution. *ACM Trans. Graph.* 34, 4.
22. **[Hoffman2019]** Naty Hoffman. 2019. Fresnel equations considered harmful. Retrieved from http://renderwonk.com/publications/mam2019/
23. **[Kutz2021]** Peter Kutz, Miloš Hašan, and Paul Edmondson. 2021. Novel aspects of the Adobe Standard Material. *Adobe White Paper*.
24. **[MDL SDK]** NVIDIA Corporation. 2024. *MDL SDK: Material Definition Language Software Development Kit*. GitHub. Retrieved April 14, 2025, from https://github.com/NVIDIA/MDL-SDK
25. Max Born, Emil Wolf, A. B. Bhatia, P. C. Clemmow, D. Gabor, A. R. Stokes, A. M. Taylor, P. A. Wayman, and W. L. Wilcock. 1999. *Principles of Optics: Electromagnetic Theory of Propagation, Interference and Diffraction of Light* (7th ed.). Cambridge University Press.
26. **[Burley2012]** Burley, Brent. 2012. Physically based shading at Disney. In ACM SIGGRAPH 2012 Courses: Practical Physically Based Shading in Film and Game Production. DOI:https://doi.org/10.1145/2343483.2343493
27. Adobe Inc. 2021. Adobe standard material (ASM) specifications. Retrieved from https://helpx.adobe.com/substance-3d-general/adobe-standard-material/asm-specifications.html
28. Christensen, Per H. 2015. An approximate reflectance profile for efficient subsurface scattering. In ACM SIGGRAPH 2015 Talks, 1–1. DOI:https://doi.org/10.1145/2792745.2792764
29. Jimenez, Jorge, Zsolnai, Karoly, Jarabo, Alejandro, Freude, Christian, Auzinger, Thomas, Wu, Xian-Chun, der Pahlen, Javier, Wimmer, Michael, and Gutierrez, Diego. 2015. Separable subsurface scattering. Comput. Graph. Forum 34, 6 (Sep. 2015), 188–197. DOI:https://doi.org/10.1111/cgf.12716
30. **[Portsmouth2024]** Jamie Portsmouth, Peter Kutz, and Stephen Hill. 2024. EON: A practical energy-preserving rough diffuse BRDF.