specular anisotropic实现
blender、UE、Unity
anisotropic即不同方向上不均匀的特性。在计算机图形学的材质方面,specular、transmission、subsuface、coat均可能为anisotropic。
常用的计算specular BRDF的Cook-Torrance微面模型的D项为GGX。
isotropic GGX: \[ D_{GGX}(H) = \frac{\alpha^2}{\pi((N\cdot H)^2 (\alpha^2 - 1) + 1)^2} \] anisotropic GGX: \[ D_{GGXaniso}(H) = \frac{1}{\pi \alpha_x \alpha_y} \frac{1}{ \left( \frac{(X \cdot H)^2}{\alpha_x^2} + \frac{(Y \cdot H)^2}{\alpha_y^2} + (N\cdot H)^2 \right)^2 } \] 其中\(x\)、\(y\)分别代表切线和副切线方向,\(\alpha_x\)、\(\alpha_y\)即对应方向上的roughness。
设anisotropic值为\(a\)、roughness值为\(r\),不同的\(\alpha_x\)、\(\alpha_y\)参数化方法[1]如下:
- Burley 2012 (Disney model)
\[ aspect=\sqrt{1-0.9a} \]
\[ \alpha_x=\frac{r^2}{aspect} \]
\[ \alpha_y=r^2\cdot aspect \]
- Georgiev 2019 (Standard Surface)
\[ \alpha_x = \min(\frac{r^2}{\sqrt{1-a}}, 1.0) \]
\[ \alpha_y = r^2 \sqrt{1-a} \]
- Kulla 2017 (Sony Pictures Imageworks)
\[ \alpha_x = r^2 (1 + a) \]
\[ \alpha_y = r^2 (1 - a) \]
- Neubelt 2013 (The Order: 1886)
\[ \alpha_x = r^2 \]
\[ \alpha_y = \mathrm{lerp}(0, r^2, 1 - a) \]
- Kutz 2021 (Adobe Standard Material)
\[ \alpha_x = r^2 + a^4 \]
\[ \alpha_y = r^2 \]
- OpenPBR proposed mapping 2023
\[ \alpha_x = r^2 \sqrt{\frac{2}{1 + (1 - a)^2}} \]
\[ \alpha_y = (1 - a)\alpha_x \]
Blender的cycles使用Burley 2012:
1 |
|
UE默认使用Kulla 2017:
1 |
|
Unity的HDRP使用Kulla 2017:
1 |
|