**Enterprise PBR Shading Model** Dassault Systèmes ![][license.png] Version 2019x The Enterprise PBR Shading Model (DSPBR) is a high-quality, easy-to-use material optimized for performance in real-time and interactive scenarios, suitable for rasterization and ray tracing. Inspired by the Disney Principled BRDF [#Bur12, #Bur15] and the Unreal Shading Model [#Kar13], it combines a metallic and a dielectric BSDF, including transparency for thin-walled and volumetric objects. In addition, it provides effects like emission, clear coat and sheen to cover a wide range of appearances. In this document we provide in-depth instructions on how to implement the model in a physically-based renderer. Versions: 2019x [2021x](spec-2021x.md.html) [2022x](spec-2022x.md.html) [2025x](spec-2025x.md.html) Components ========== At its core, the Enterprise PBR Shading Model is a linear blend of a metallic BSDF and a dielectric BSDF, see Figure [components-diagram]. The dielectric BSDF can be either opaque or transparent. The former is used for materials like simple plastics, wood, or stone. The latter makes the surface transparent, allowing light rays to refract into the object, resulting in attenuation and subsurface scattering. This is needed, for example, for glass, water, ice, more complex plastics, or wax. Section [Core] explains the BSDFs in more detail. ************************************************************************ * .----------------------------------------------. .----------. * * | Clearcoat | | | * * '----------------------------------------------' | | * * | | * * .-------------+--------------------------------. | | * * | Metallic | Dielectric | | | * * | | | | | * * | | Opaque | Transparent | | Emission | * * | | | | | | * * | | - Plastic | - Glass | | | * * | | - Wood | - Plastic | | | * * | | - Stone | - Water | | | * * | | | - Ice | | | * * | | | - Wax | | | * * '-------------+--------------+-----------------+ '----------' * * | Volume | * * '-----------------' * ************************************************************************ [Figure [components-diagram]: Structure of the Enterprise PBR Shading Model.] The weights $m$ (metallic) and $t$ (transparency) control the blending between the BSDFs, as shown in Figure [blending-diagram] and described in Section [Putting it all together]. The values range from 0 to 1 and may vary based on the position on the surface. ******************************* * .---. * * | + | * * +---+ * * 1-m / \ m * * .---+ \ * * | + | Metal * * +---+ * * 1-t / \ t * * / \ * * Opaque Transparent * * Dielectric Dielectric * ******************************* [Figure [blending-diagram]: Blending of metallic and dielectric BSDFs based on parameters $m$ and $t$.] On top of the core, a Fresnel-weighted specular BSDF adds coating effects, see Section [Clearcoat]. Moreover, the material can be configured to emit light via the emission component (Section [Emission]). The material can operate in two modes: it can either simulate an infinitesimally thin, two-sided object or a volume boundary. Volume boundaries have to be attached to a closed mesh, i.e., the mesh encloses a volume and does not have any holes. The parameters of the volume extension (Section [Volume]) describe what happens inside the volume. Core ---- The three BSDFs at the core of the Enterprise PBR Shading Model are built from a small number of building blocks, exploiting as many similarities as possible to reduce the mathematical complexity and, thus, computational effort. In the following, we first describe the individual BSDFs, then we show how to combine them efficiently, and finally we provide detailed equations for the distribution functions. ### Metallic BSDF The metallic BSDF (Figure [bsdf-metallic]) is given by a microfacet BSDF $M_r$ and a configurable Fresnel term $F$, corrected for energy loss via the terms $M_{r,ms}$ and $F_{ms}$ (see Section [In-depth look at the BSDFs]). Users can change the anisotropic roughness $r_u$, $r_v$ and the color at normal incidence $\rho$. The color at grazing angles is fixed to 1. \begin{equation} \begin{aligned} &\text{Metallic}(\mathbf{v}, \mathbf{l}; r_u, r_v, \rho) = \\ &\quad\quad\quad\quad M_r(\mathbf{v}, \mathbf{l}; r_u, r_v) \, F(\cos\theta_r; \rho, 1) + M_{r,ms}(\mathbf{v}, \mathbf{l}; r_u, r_v) \, F_{ms}(\rho, 1) \end{aligned} \end{equation} We parameterize the Fresnel $F(\cos\theta_r; f_0, f_{90})$ (Schlick approximation) by the angle $\theta_r$, the color at normal incidence $f_0$, and the color at grazing incidence $f_{90}$. By computing the angle $\theta_r$ from the half-vector $\mathbf{h}_r$, we take the orientation of the microfacets into account. \begin{eqnarray} \cos\theta_r &=& (\mathbf{h}_r \cdot \mathbf{v}) \\ \mathbf{h}_r &=& \frac{\mathbf{v} + \mathbf{l}}{\lVert\mathbf{v} + \mathbf{l}\rVert} \end{eqnarray} See Section [In-Depth Look at the BSDFs] for more details about the Fresnel term. ![Figure [bsdf-metallic]: The metallic BSDF, a single specular lobe.](img/bsdf_metallic.png) ### Dielectric BSDF for Transparent Surfaces The Fresnel-weighted combination of a microfacet BRDF $M_r$ and a microfacet BTDF $M_t$ forms the BSDF for transparent dielectric surfaces. As before, $r_u$ and $r_v$ change the anisotropic roughness of the BSDF. In addition, we now provide a parameter to change the index of refraction $\eta$, which determines how the light ray is refracted when entering the volume beneath the surface, and how the amount of incoming light is distributed to reflection and transmission. $s$ and $\rho_s$ allow fine-tuning the amount of reflection and its color. $\rho$ changes the color of the transmissive component. We again compensate for energy-loss of the reflection component via $M_{r,ms}$ and $F_{ms}$. Energy compensation for transmission may be added in a future revision. The complete equation is given as follows: \begin{eqnarray} \begin{aligned} &\text{TransparentDielectric}(\mathbf{v}, \mathbf{l}; r_u, r_v, \rho, s, \eta, \rho_s) = \\ &\quad\quad\quad\quad s \, M_r(\mathbf{v}, \mathbf{l}; r_u, r_v) \, F_d(\cos\theta_r; F_0 \rho_s, 1) \\ &\quad\quad\quad + \rho\,{M_t}^\prime(\mathbf{v}, \mathbf{l}; r_u, r_v, \eta_i, \eta_o) \, (1 - s \, F_d(\cos\theta_t; F_0 \rho_s, 1)) \\ &\quad\quad\quad + s\,M_{r,ms}(\mathbf{v}, \mathbf{l}; r_u, r_v) \, F_{ms}(F_0 \rho_s, 1) \\ \end{aligned} \end{eqnarray} \begin{eqnarray} {M_t}^\prime(\mathbf{v}, \mathbf{l}; r_u, r_v, \eta_i, \eta_o) &=& \begin{cases} M_r(\mathbf{v}, {\mathbf{l}}^\prime; r_u, r_v) & \text{ if thin-walled}\\ M_t(\mathbf{v}, \mathbf{l}; r_u, r_v, \eta_i, \eta_o) & \text{ otherwise} \end{cases} \end{eqnarray} with ${\mathbf{l}}^\prime = \mathbf{l} + 2 \mathbf{n} (-\mathbf{l} \cdot \mathbf{n})$ to flip the light direction from lower to upper hemisphere in thin-walled case to be able to reuse the microfacet reflection function for transmission (Figure [bsdf-transparent-dielectric-thin]). ![Figure [bsdf-transparent-dielectric-thin]: The dielectric BSDF for transparent surfaces is composed of a reflective lobe and a transmissive lobe.](img/bsdf_transparent_dielectric_thin.png) The Fresnel angles $\cos\theta_r$ and $\cos\theta_t$ are based on the half-vector. \begin{eqnarray} \cos\theta_r &=& (\mathbf{v} \cdot \mathbf{h}_r) & \qquad & \cos\theta_t &=& \begin{cases} (\mathbf{v} \cdot \mathbf{h}_t) & \text{ if thin-walled}\\ (\mathbf{v} \cdot \mathbf{h}_{t,v}) & \text{ otherwise} \end{cases} \end{eqnarray} \begin{eqnarray} \mathbf{h}_r = \frac{\mathbf{v} + \mathbf{l}}{\lVert\mathbf{v} + \mathbf{l}\rVert} & \quad & \mathbf{h}_t = \frac{\mathbf{v} + {\mathbf{l}}^\prime}{\lVert\mathbf{v} + {\mathbf{l}}^\prime\rVert} & \quad & \mathbf{h}_{t,v} = \frac{-\mathbf{v} \eta_i - \mathbf{l} \eta_o}{\lVert -\mathbf{v} \eta_i - \mathbf{l} \eta_o \rVert} \end{eqnarray} Refraction only takes place if the material is configured to be volumetric, see Section [Volume]. In this case, and if the surface is transparent, light rays are refracted through the surface into the volume beneath the object (Figure [bsdf-transparent-dielectric-volumetric]). The BSDF has to consider refraction and total internal reflection, affecting the outgoing direction and the dielectric Fresnel term $F_d$. This closely follows [#Wal07]. The Fresnel term at normal incidence depends on the index of refraction: $F_0 = \left(\frac{\eta_i - \eta_o}{\eta_i + \eta_o}\right)^2$. $\eta_i$ and $\eta_o$ determine the index of refraction of the current medium and the medium on the other side of the surface, respectively, and have to be setup properly by the renderer, taking into account the material's $\eta$ ![Figure [bsdf-transparent-dielectric-volumetric]: The dielectric BSDF for transparent surfaces is composed of a reflective lobe and a transmissive lobe.](img/bsdf_transparent_dielectric_volumetric.png) ### Dielectric BSDF for Opaque Surfaces In opaque dielectric surfaces (Figure [bsdf-opaque-dielectric]), we replace the BTDF by a diffuse-like BRDF that models the interaction of the light not reflected from the specular BRDF. This results in a combination of a diffuse-like base BRDF $B$ and a Fresnel-weighted microfacet BRDF $M_r$. Parameter $\rho$ controls the color of $B$, all other parameters behave consistent to the transparent BSDF: The amount of specular contribution from the microfacet BRDF is determined by the parameters for specular tint $\rho_s$ and the index of refraction $\eta$, which both influence the Fresnel term. In addition, there is a directional-independent scaling factor $s$. $r_u$ and $r_v$ change the anisotropic roughness of the microfacet BRDF. $b$ controls the sheen term, as described below. As in the metallic BSDF, the energy loss of the microfacet term is compensated via $M_{r,ms}\,F_{ms}$. The BSDF looks as follows: \begin{equation} \begin{aligned} &\text{OpaqueDielectric}(\mathbf{v}, \mathbf{l}; r_u, r_v, \rho, s, \eta, \rho_s, b) = \\ &\quad\quad\quad\quad \rho \, B(\mathbf{v}, \mathbf{l}; s, F_0, \rho_s, b) \\ &\quad\quad\quad + s\,M_r(\mathbf{v}, \mathbf{l}; r_u, r_v) \, F(\cos\theta_r; F_0 \rho_s, 1) \\ &\quad\quad\quad + s\,M_{r,ms}(\mathbf{v}, \mathbf{l}; r_u, r_v) \, F_{ms}(F_0 \rho_s, 1) \end{aligned} \end{equation} ![Figure [bsdf-opaque-dielectric]: The dielectric BSDF for opaque surfaces is composed of a diffuse lobe and a specular lobe.](img/bsdf_opaque_dielectric_opaque_only.png) Typically, the base BSDF $B$ is diffuse-like, reflecting the energy that is left after evaluating the microfacet layer equally in all directions. We follow the approach of [#Kel01] and [#KC17] to measure the remaining energy and derive an energy-conserving and energy-preserving diffuse BRDF out of it. Controlled by the parameter $s$ (i.e., the amount of specular contribution), we gradually blend to this new diffuse BRDF $B_c$. The derivation of $B_c$ is explained in more detail in Section [In-depth look at the BSDFs] and Section [Energy Compensation]. \begin{equation} B_{\text{diffuse}}(\mathbf{v}, \mathbf{l}; r_u, r_v, s, F_0, \rho_s) = \frac{1}{\pi}(1-s) + s B_c(\mathbf{v}, \mathbf{l}; r_u, r_v, F_0, \rho_s) \end{equation} For fabrics like velvet, diffuse behavior is not sufficient. We account for that by introducing an additional sheen BRDF that is blended into the diffuse-like BRDF according to weight $b$. This simulates the effect of rim lighting resulting from both forward and backward scattering at grazing angles. The blending is controlled by the parameter $b$. \begin{equation} \label{sheen-weighting} B_{\text{sheen}}(\mathbf{v}, \mathbf{l}; b) = \frac{1}{\pi}\hat{b} + (1 - \hat{b}) M_b(\mathbf{v}, \mathbf{l}; b) \end{equation} with $\hat{b} = (1-b)^5$. $M_b$ is given in Section [In-depth look at the BSDFs]. We apply the diffuse energy compensation term also to the sheen BRDF, so that we finally arrive at the base BSDF $B$ by multiplying diffuse and sheen: \begin{equation} \begin{aligned} B &= \text{lerp}(B_\text{sheen}, \pi B_c B_\text{sheen}, s) \\ &= \text{lerp}(B_\text{diffuse}, \pi M_b B_\text{diffuse}, 1-\hat{b}) \\ &= \pi \, B_{\text{diffuse}} \, B_{\text{sheen}} \end{aligned} \end{equation} ### Putting It All Together The complete material is a linear combination of the BSDF, weighted by $m$ (metallic) and $t$ (transparency). By sharing a lot of parameters of the individual BSDFs, we significantly reduce the amount of parameters of the complete material. \begin{eqnarray} &\text{Core}(\rho, s, \eta, \rho_s, b) &=&\\ &&m & \text{Metallic}(\rho) \nonumber\\ &+&(1-m)(1-t) & \text{OpaqueDielectric}(\rho, s, \eta, \rho_s, b) \nonumber\\ &+&(1-m)t & \text{TransparentDielectric}(\rho, s, \eta, \rho_s) \nonumber \end{eqnarray} $\text{TransparentDielectric}$ is either the thin-walled or the volumetric version, depending on the corresponding material parameter. Evaluating the complete material as sum of all BSDFs is expensive, as each BSDF contains a microfacet model and, therefore, we would have to compute the microfacet distribution multiple times. In order to avoid this overhead, we merge the microfacet models and put the weights $m$ and $t$ into the Fresnel term. This optimization is possible because we use Schlick's Fresnel approximation, see Section [In-Depth Look at the BSDFs]. In case the material is thin-walled, $F = F_d$, i.e., the metallic and the dielectric BSDF use the same Fresnel term. The BSDF looks as follows, omitting parameters that are equal in all functions for brevity. The complete derivation can be found in Section [Combining Metallic and Dielectric BSDFs]. \begin{equation} \begin{aligned} &\text{ThinCore}(\rho, s, \rho_s, b) = \\ &\quad\quad\quad\quad M_r \, F(\rho_{s,r,0}, \rho_{s,r,90}) \, \\ &\quad\quad\quad +M_{r,ms} \, F_{ms}(\rho_{s,r,0}, \rho_{s,r,90}) \\ &\quad\quad\quad +\rho_t {M_t}^\prime(1 - s F(F_0 \rho_s, 1)) \\ &\quad\quad\quad +\rho_d \, \pi \left[\frac{1}{\pi}(1-s) + s B_c(F_0 \rho_s)\right] \left[\frac{1}{\pi}\hat{b} + (1 - \hat{b}) M_b\right] \end{aligned} \end{equation} with \begin{eqnarray} \rho_{s,r,0} &=& (1-m) F_0 s \rho_s + m \rho \\ \rho_{s,r,90} &=& (1-m) s + m \\ \rho_t &=& \rho (1-m) t \\ \rho_d &=& \rho (1-m) (1-t) \end{eqnarray} If the material is volumetric, the dielectric Fresnel term handles refraction and total internal reflection. Therefore, we cannot simplify as much as before: \begin{equation} \begin{aligned} &\text{VolumetricCore}(\rho, s, \eta, \rho_s, b) = \\ &\quad\quad\quad\quad M_r \, [m \, F(\rho, 1) + (1-m) s F_d(F_0 \rho_s, 1)]\, \\ &\quad\quad\quad +M_{r,ms} \, F_{ms}(\rho_{s,r,0}, \rho_{s,r,90}) \\ &\quad\quad\quad +\rho_t M_t(1 - s F_d(F_0 \rho_s, 1)) \\ &\quad\quad\quad +\rho_d \, \pi \left[\frac{1}{\pi}(1-s) + s B_c(F_0 \rho_s)\right] \left[\frac{1}{\pi}\hat{b} + (1 - \hat{b}) M_b\right] \end{aligned} \end{equation} ### In-Depth Look at the BSDFs #### Microfacet BSDF Reflection and transmission are based on microfacet BSDFs [#Wal07]. As in [#Bur12] we square the roughness $(r_u, r_v)$ to make it perceptually more linear. The index of refraction of the media on the incident and transmitted side of the surface is denoted by $\eta_i$ and $\eta_o$, respectively. \begin{eqnarray} M_r(\mathbf{v},\mathbf{l}; r_u, r_v) &=& \frac{D(\mathbf{h},r_u^2,r_v^2) G(\mathbf{v},\mathbf{l},r_u^2,r_v^2)}{4 (\mathbf{v} \cdot \mathbf{n}) (\mathbf{l} \cdot \mathbf{n})} \\ M_t(\mathbf{v},\mathbf{l}; r_u, r_v, \eta_i, \eta_o) &=& \frac{|\mathbf{l} \cdot \mathbf{h}_t| |\mathbf{v} \cdot \mathbf{h}_t|}{|\mathbf{l} \cdot \mathbf{n}| |\mathbf{v} \cdot \mathbf{n}|} \frac{\eta_o^2 D(\mathbf{h}_t,r_u^2,r_v^2) G(\mathbf{v},\mathbf{l},r_u^2,r_v^2)}{(\eta_i(\mathbf{v} \cdot \mathbf{h}_t) + \eta_o(\mathbf{l} \cdot \mathbf{h}_t))^2} \\ \end{eqnarray} To allow for anisotropic materials we derive roughnesses in tangent ($r_u$) and bitangent ($r_v$) direction from the isotropic roughness $r$ and anisotropy strength $o$. In addition we support anisotropy rotation by rotating the local tangent space counter-clockwise around the normal with the anisotropy rotation parameter $\beta$. \begin{equation} \begin{pmatrix}r_u\\r_v\end{pmatrix} = r \begin{pmatrix}1\\1-o\end{pmatrix} \end{equation} \begin{equation} \begin{pmatrix}\mathbf{t}_\text{rot} \\ \mathbf{b}_\text{rot} \\ \mathbf{n}_\text{rot}\end{pmatrix}^\top = \begin{pmatrix}\cos(2\pi\beta)\mathbf{t}+\sin(2\pi\beta)\mathbf{b} \\ -\sin(2\pi\beta)\mathbf{t}+\cos(2\pi\beta)\mathbf{b} \\ \mathbf{n}\end{pmatrix}^\top \end{equation} For the microfacet distribution, the material uses the Generalized Trowbridge-Reitz GTR model (generalized anisotropic GGX) [#Bur12] with $\gamma=2$ \begin{eqnarray} D(\mathbf{h},\alpha_x,\alpha_y) = \frac{1}{\pi \alpha_x \alpha_y} \frac{1}{\left(\frac{(\mathbf{h} \cdot \mathbf{x})^2}{\alpha_x^2}+\frac{(\mathbf{h} \cdot \mathbf{y})^2}{\alpha_y^2}+(\mathbf{h} \cdot \mathbf{n})^2\right)^2} \end{eqnarray} which corresponds to classic GGX in isotropic case $\alpha=\alpha_u=\alpha_v$: \begin{eqnarray} D(\mathbf{h},\alpha) = \frac{1}{\pi} \frac{\alpha^2}{((\mathbf{h} \cdot \mathbf{n})^2(\alpha^2-1)+1)^2} \end{eqnarray} The appropriate Smith shadowing-masking term (height-correlated) [#Hei14] for GGX: \begin{eqnarray} G(\mathbf{v},\mathbf{l},\alpha_x,\alpha_y) &=& \frac{2}{\sqrt{1-a_l+\frac{a_l}{(\mathbf{l} \cdot \mathbf{n})^2}} + \sqrt{1-a_v+\frac{a_v}{(\mathbf{v} \cdot \mathbf{n})^2}}} \\ a_{\{v,l\}} &=& \cos^2\Phi_{\{v,l\}}\alpha_x^2 + \sin^2\Phi_{\{v,l\}}\alpha_y^2 \end{eqnarray} #### Fresnel We use Schlick's Fresnel approximation for performance reasons (Section [Putting It All Together]). For thin-walled materials and the metallic BSDF we ignore refraction and total internal reflection, leading to a very simple form of the Fresnel term $F$. Taking both into account results in $F_d$, which is used for volumetric materials. \begin{eqnarray} F(\theta; f_0, f_{90}) &=& f_0 + (f_{90} - f_0) (1 - |\cos\theta|)^5 \\ F_d(\theta; f_0, f_{90}) &=& \begin{cases} f_0 + (f_{90} - f_0) (1 - |\cos\theta|)^5 & \text{if } \eta_o \geq \eta_i \\ f_0 + (f_{90} - f_0) (1 - |\cos\theta_o|)^5 & \text{if } \eta_o < \eta_i \land \sin^2\theta_o < 1 \\ 1 & \text{if } \eta_o < \eta_i \land \sin^2\theta_o \geq 1 \end{cases} \end{eqnarray} where $\theta_o$ is the angle of transmission, computed from the angle of incidence via $\sin^2\theta_o = \left(\frac{\eta_i}{\eta_o}\right)^2 (1 - \cos^2\theta_i)$ [#Lag13]. Note that in case of total internal reflection, the Fresnel does not depend on $f_{90}$ anymore, so it is impossible to disable the reflection in this situation. This allows users to change the specular component of a refractive object without introducing artifacts, i.e., dark appearance in areas where total internal reflection occurs. #### Energy Preservation The standard microfacet model does not account for scattering occuring between microfacets on the microsurface. As the surface becomes rougher, the multiple scattering becomes stronger, effectively resulting in high energy loss if this is not accounted for (see Figure [energycomp-microfacet-metallic]). [#KC17] describes a method based on [#Kel01] to approximate multiple scattering for microfacet models that can be adapted for real-time rendering [#Fde19]. ![Figure [energycomp-microfacet-metallic]: Left: Metallic surface with roughness 0. Middle: Non-energy preserving metallic surface with roughness 1. Right: Energy-preserving metallic surface with roughness 1 by accounting for multiple scattering. Note that the surface in the middle looks significantly darker than the others.](img/energycomp_metallic.png) In the Enterprise PBR Shading Model, the missing energy is added to the specular component by the energy compensation term $M_{r,ms}(\mathbf{v},\mathbf{l}; \alpha_{uv})\,F_{ms}(f_0, f_{90})$. \begin{equation} \begin{aligned} &M_{r,ms}(\mathbf{v},\mathbf{l}; \alpha_{uv})\,F_{ms}(f_0, f_{90}) = \\ &\quad\quad\quad\underbrace{\frac{(1-E_m(\mathbf{v}\cdot\mathbf{n}))(1-E_m(\mathbf{l}\cdot\mathbf{n}))}{\pi(1-E_{m,avg})}}_{\text{Multiple scattering GGX}} \underbrace{\frac{{F_{m,avg}}^2 E_{m,avg}}{{1 - F_{m,avg}(1 - E_{m,avg})}}}_{\text{Multiple scattering Fresnel}} \end{aligned} \end{equation} We measured the directional albedo $E_m(\theta)$ and average albedo $E_{m,avg}$ by integrating the cosine-weighted single-scattering GGX microfacet model as described in [#KC17]. The results are stored in lookup tables and fetched at runtime. The derivation of the lookup tables and the resulting data is shown in Section [Multiple-Scattering GGX BRDFs]. Instead of lookup tables, it is also possible to use a numerical fit for the data. As an alternative to the fit in [#KC17], we found the following that has higher error, but less computational effort: \begin{eqnarray} \label{energycomp-ggx-fit} E_m(\theta; \alpha_{uv}) &=& 1 - 1.4594\alpha_{uv}\cos\theta \\ &&* \left(-0.20277 + \alpha_{uv} (2.772 + \alpha_{uv} (-2.6175 + 0.73343 \alpha_{uv}))\right) \nonumber\\ &&* \left(3.09507 + \cos\theta (-9.11369 + \cos\theta (15.8884 + \cos\theta (-13.70343 + 4.51786 \cos\theta)))\right) \nonumber\\ \alpha_{uv} &=& \alpha_u \alpha_v = r_u^2 r_v^2\\ \nonumber\\ E_{m,avg}(\alpha_{uv}) &=& 1.0 + \alpha_{uv} (-0.113 + \alpha_{uv} (-1.8695 + \alpha_{uv} (2.2268 - 0.83397 \alpha_{uv}))) \\ F_{m,avg}(f_0, f_{90}) &=& \frac{1}{21} f_{90} + \frac{20}{21} f_0 \end{eqnarray} Note that we convert from anisotropic to isotropic roughness $\alpha_{uv}$ to simplify the function. #### Diffuse BRDF Following the approach of [#Kel01] and [#KC17], the missing energy after reflection from the microfacet BRDF defines the diffuse-like BRDF $B_c$. Using the two BRDFs in combination results in a energy-conserving and energy-preserving material (Figure [energycomp-plastic]). ![Figure [energycomp-plastic]: Combination of diffuse and specular component with energy compensation for roughness 0 (left) and 1 (right). Note that the combination is energy-conserving (no energy is produced, even at multiple bounces inside the object) and energy-preserving (especially at grazing angles).](img/energycomp_plastic.png) The diffuse BRDF looks as follows: \begin{eqnarray} B_c(\mathbf{v}, \mathbf{l}; \alpha_{uv}, F_0, \rho_s) &=& \begin{cases} \frac{(1-E(\mathbf{v}\cdot\mathbf{n}))(1-E(\mathbf{l}\cdot\mathbf{n}))}{\pi(1-E_{avg})} & \ \\ 0 & \text{if total internal reflection wrt.} \mathbf{v} \text{ or }\mathbf{l} \end{cases} \end{eqnarray} The directional albedo $E(\theta)$ and average albedo $E_{avg}$ are expensive to compute, as it involves integrating the Fresnel-weighted GGX microfacet model over all light directions on the hemisphere. As described in Section [Energy Preservation], the result of the integration can be fetched from a lookup table (Section [Diffuse BRDF]) or calculated using the following approximation: \begin{eqnarray} \label{energycomp-base-fit} E(\cos\theta) &=& \operatorname{lerp}(E_0 + (1.0 - E_0)(1 - \cos\theta)^5, 0.04762 + 0.95238 E_0, 1 - (1 - \alpha_{uv})^5) \\ E_{avg} &=& E_0 + (-0.33263 \alpha_{uv} - 0.072359) (1 - E_0) E_0 \end{eqnarray} with $E_0 = F_0 \rho_{s,\text{max}}$, where $\rho_{s,\text{max}}$ denotes the maximum value of the wavelength-dependent color $\rho_s$ in linear sRGB,E color space. The maximum is used because the color is subtracted, leading to unexpected behavior if this is done per channel. Section [Parameters] describes these parameters in more detail. #### Sheen BRDF For sheen effects we use the Ashikhmin BRDF with the "inverted Gaussian distribution" [#AP07, #NP13]. \begin{eqnarray} M_b(\mathbf{v},\mathbf{l}; b) &=& \frac{D_{inv}(b,\mathbf{h})}{4 \left[(\mathbf{n}\cdot\mathbf{l}) + (\mathbf{n}\cdot\mathbf{v}) - (\mathbf{n}\cdot\mathbf{l})(\mathbf{n}\cdot\mathbf{v})\right]} \\ D_{inv}(b,\mathbf{h}) &=& \frac{1}{\pi (1 + 4b^2)} \left(1 + \frac{4 \exp\left(\frac{-\cot^2\theta_h}{b^2}\right)}{\sin^4\theta_h}\right) \end{eqnarray} $b$ controls the shape of the inverse Gaussian distribution and, therefore, could be considered as its roughness. As shown in Equation [sheen-weighting], it is not only used to control the roughness of the Ashikhmin BRDF, but also to interpolate between the two BRDFs. The reason for reusing the parameter is the fact that the Ashikhmin BRDF looks almost like a Lambertian BRDF for small values of $b$. However, as this similarity quickly disappears, $b$ is not directly used as mixing weight, but instead $\hat{b}$ is derived from $b$. Besides that, sheen also makes use of the overall albedo of the material. In effect that means increasing $b$ distributes the color to grazing angles, making the material appear darker if the incident angle is close to the surface normal. ### Parameters Table [core-parameters] describes the user parameters of the Enterprise PBR Shading Model. The parameters $s$, $m$ and $t$ make the model very flexible. Table [mst] shows a list of all available combinations and explains their meaning. Name | Type | Default | Range | Description -------------|---------------|---------|--------|------------- $\mu$ | uniform bool | true | | Material describes volume boundary (false) or thin, two-sided object (true). $\rho$ | color | 1 | 0..1 | Albedo of the material. $\rho_{s}$ | color | 1 | 0..1 | Specular tint to adjust the color of the specular lobe near $\theta=0^\circ$. $m$ | float | 0 | 0..1 | Metallic-ness (0 = dielectric, 1 = metallic). $s$ | float | 1 | 0..1 | Directional-independent amount of specular contribution to fine-tune the effect of the index of refraction. $t$ | float | 0 | 0..1 | Transparency (0 = opaque, 1 = transparent). $\eta$ | uniform float | 1.5 | 1..inf | Index of refraction of the volume (t=1) or the dielectric coating (m=0). $r$ | float | 0 | 0..1 | Roughness of microfacet distribution. $o$ | float | 0 | 0..1 | Anisotropy strength. $\beta$ | float | 0 | 0..1 | Anisotropy rotation angle (counter-clockwise rotation of the tangent space around local normal, where $0.25\equiv90^\circ$, $0.5\equiv180^\circ$, $1.0\equiv360^\circ$. $\mathbf{n}$ | float3 | (0,0,1) $\lVert\mathbf{n}\rVert=1$ | | Normal for normal mapping. $b$ | float | 0 | 0..1 | Sheen (0 = none, 1 = full). [Table [core-parameters]: List of core parameters.] ![Figure [core-parameters-fig]: Examples for various values of core parameters.](img/params_core.png) $m$ | $s$ | $t$ | Active Components | Use this for | Description ----|-----|-----|-------------------|--------------|------------- 0 | 0 | 0 | Diffuse | | Pure diffuse material. 0 | 0 | 1 | Refraction | | Pure refractive material. 0 | 1 | 0 | Diffuse, Reflection | Plastic, wood, stone | Specular coating on top of diffuse base layer. Adjust $\eta_o$ to change the index of refraction of the coating. For artistic effects, adjust $s$ and $\rho_s$ to fine-tune the coating layer. 0 | 1 | 1 | Reflection, Refraction | Glass, water, ice | Transparent material. Use $\eta_o$ to adjust the index of refraction. For artistic effects, adjust $s$ and $\rho_s$ to fine-tune the reflection. 1 | N/A | N/A | Reflection | Metal | Specular material with Fresnel effect that fades to white at grazing angles. Metallic takes precedence, $s$ and $t$ have no effect. [Table [mst]: Metallic, Specular and Transparency.] The basic workflow to configure a physically-plausible material involves three steps: 1. Choose the color $\rho$ of the material. 2. Choose the material type via $m$ and $t$. 3. Choose an IOR for the coating/refraction. For more fine-grained artistic control, the material can now be tweaked even further: 4. Fine-tune amount of specular contribution via $s$. 5. Fine-tune specular color near $\theta=0^\circ$ via $\rho_s$. Clearcoat --------- The clearcoat extension adds a dielectric coating as a layer on top of the core described in Section [Core]. $\text{Core}(\mathbf{v},\mathbf{l})$ and coating are weighted with a Fresnel term. The parameter $c$ determines the strength of the effect. \begin{equation} \begin{aligned} &\text{Coated}(\mathbf{v}, \mathbf{l}; r_u, r_v, \rho, s, \eta, \rho_s, b, c, \alpha_c, \mathbf{n}_c) = \\ &\quad\quad\quad\quad \text{Core}(\mathbf{v}, \mathbf{l}; r_u, r_v, \rho, s, \eta, \rho_s, b) \,(1 - c \ \max(F_c(\mathbf{n}_c \cdot \mathbf{v}), F_c(\mathbf{n}_c \cdot \mathbf{l}))) \, \\ &\quad\quad\quad +M_c(\mathbf{v},\mathbf{l}; \alpha_c, \mathbf{n}_c) \, c \ F_c(\mathbf{h} \cdot \mathbf{v}) \, \\ \end{aligned} \end{equation} The coating is based on a microfacet BRDF with an isotropic GGX distribution and squared roughness, similar to the reflection component in the core material (Section [Microfacet BSDF]). \begin{eqnarray} M_c(\mathbf{v},\mathbf{l}) &=& \frac{D(\mathbf{h},\alpha_c^2) G(\mathbf{v},\mathbf{l})}{4 (\mathbf{v} \cdot \mathbf{n}_c) (\mathbf{l} \cdot \mathbf{n}_c)} \end{eqnarray} The index of refraction in Schlick's Fresnel term is fixed to 1.5 to resemble a glass-like dielectric coating. \begin{eqnarray} F_c(\theta) &=& 0.04 + 0.96 \ (1 - \cos\theta)^5 \end{eqnarray} As shown in Table [clearcoat-parameters], the clearcoat is parametrized via two scalar values and a normal. Name | Type | Default | Range | Description ---------------|---------------|---------|--------|------------- $c$ | float | 0 | 0..1 | Clearcoat reflectivity (0 = no clearcoat, 1 = full clearcoat). $\alpha_c$ | float | 0 | 0..1 | Roughness of clearcoat's microfacet distribution. $\mathbf{n}_c$ | float3 | (0,0,1) | $\lVert\mathbf{n}_c\rVert=1$ | Clearcoat normal for normal mapping. [Table [clearcoat-parameters]: List of clearcoat parameters.] ![Figure [clearcoat-parameters-fig]: Result for various values of clearcoat parameters.](img/params_clearcoat.png) Cut-out ------- The cut-out acts like an alpha channel for the surface. It makes parts of the surface transparent, independent of Fresnel terms, view and light direction or parameters. Name | Type | Default | Range | Description ---------------|---------------|---------|--------|------------- $\nu$ | float | 1 | 0..1 | Cut-out opacity value (0 = transparent, 1 = opaque). [Table [cutout-parameters]: List of cut-out parameters.] ![Figure [cutout-parameters-fig]: Result for various values of cut-out parameters.](img/params_cutout.png) The cut-out parameter is primarily used in conjunction with textures to fake details in geometry, see Figure [cutout-geometry]. ![Figure [cutout-geometry]: Cut-out texture applied to a sphere.](img/params_cutout_geometry.png) Emission -------- In addition to the reflective and transmissive components, the material contains an emissive component that turns surfaces into diffuse area lights. Light is emitted into the upper hemisphere with regard to the normal. \begin{eqnarray} L_e(v) = \begin{cases} \rho_e & \text{if } (\mathbf{v} \cdot \mathbf{n}) > 0 \\ 0 & \text{otherwise} \end{cases} \end{eqnarray} $\rho_e$ is luminance given in $\frac{\text{lm}}{\text{m}^2 \text{ sr}}$. It is computed from the parameters given in Table [emission-parameters]. Name | Type | Default | Range | Description ---------------|---------------|---------|--------|------------- $l_c$ | color | 1 | 0..inf | Emission color. $l_v$ | uniform float | 0 | 0..inf | Emission value in $\text{lx}$ ($=\frac{\text{lm}}{\text{m}^2}$) (luminous emittance, the relative power leaving the object per surface area) or $\text{lm}$ (luminous power, the absolute power leaving the object). $l_\text{norm}$| uniform bool | false | | Normalize emission color. [Table [emission-parameters]: List of emission parameters.] ![Figure [emission-parameters-fig]: Result for various values of emission parameters.](img/params_emission.png) Lights are defined in photometric units. This means, the energy is spectrally weighted with the response curve of the human eye. The emission is provided as color $l_c$ and energy value $l_v$. We expect the color to be in linear sRGB color space with a D65 whitepoint. If the energy normalization flag $l_\text{norm}$ is enabled, the color will be normalized by its luminance. This behavior is needed for physical workflows and it guarantees that the light exactly emits the specified value in its respective physical unit. The following equations show how to compute $\rho_e$ from these parameters. $\text{area}$ denotes the area of the entire surface of an object in square meters. \begin{eqnarray} l = & \begin{cases} l_v l_c & \text{if } l_\text{norm}\text{ is false} \\ l_v \frac{l_c}{l_c \cdot \begin{pmatrix}0.2126729 \\ 0.7151522 \\ 0.0721750\end{pmatrix}} & \text{otherwise} \end{cases} \\ \rho_e = & \begin{cases} \frac{1}{\pi \text{ area}} l & \text{if } l_v \text{ is given in lm} \\ \frac{1}{\pi} l & \text{if } l_v \text{ is given in } \frac{\text{lm}}{\text{m}^2} \end{cases} \end{eqnarray} Volume ------ If the material is configured to behave as a volume boundary, i.e., if the thin-walled flag is set to false, light rays may enter the volume below the surface, scatter and eventually leave at another place. This process is called subsurface scattering and it is controlled by the absorption coefficient $\sigma_a$ and the scattering coefficient $\sigma_s$. Both coefficients are wavelength-dependent values in range $0..\inf$. As this is hard to parametrize for users, we first map from more user-friendly attenuation color $a$ and attenuation distance $d$ to the mean free path length $\text{mfp}$ (or its inverse, the attenuation or extinction coefficient $\sigma_t$), and from subsurface color $\rho_{ms}$ to the single-scattering albedo $\rho_{ss}$ [#KC17]. \begin{eqnarray} \sigma_t &=& \frac{1}{\text{mfp}} = \frac{-\log(a)}{d} \\ \rho_{ss} &=& 1 - \left(4.09712 + 4.20863\rho_{ms} - \sqrt{9.59217 + 41.6808\rho_{ms} + 17.7126\rho_{ms}^2}\right)^2 \end{eqnarray} From this we derive the absorption and scattering coefficient. \begin{eqnarray} \sigma_a &=& \frac{1 - \rho_{ss}}{\text{mfp}} = \sigma_t (1 - \rho_{ss}) \\ \sigma_s &=& \frac{\rho_{ss}}{\text{mfp}} = \sigma_t\rho_{ss} = \sigma_t - \sigma_a \end{eqnarray} Intuitively, the mean free path length describes the reciprocal of the density of the medium. The denser the medium, the shorter the distance until a particle is hit and, therefore, the more light is absorbed or scattered out. In our case, after the light traveled $d$ units into the medium, all that remains is the color $a$. When a particle is hit, the light color gets multiplied by the single-scattering color $\rho_{ss}$. On the surface, the color $\rho_{ms}$ can be observed from the multiple scattering events occuring in the medium. Name | Type | Default | Range | Description ---------------|---------------|---------|--------|------------- $a$ | uniform color | 1 | 0..1 | Attenuation color. $d$ | uniform float | inf | 0..inf | Attenuation distance. A value of 0 will make to surface opaque. $\rho_{ms}$ | uniform color | 0 | 0..1 | Subsurface color. Subsurface scattering is disabled if $\rho_{ms}=0$. [Table [volume-parameters]: List of volume parameters.] ![Figure [volume-parameters-fig]: Result for various values of volume parameters.](img/params_volume.png) Parameter Order =============== We recommend to display the parameters to users in the UI in the following order: * Base - Albedo - Metallic - Roughness - Anisotropy - Anisotropy Rotation - Normal Map - Transparency - Cut-Out Opacity - Sheen - Specular - Specular Tint * Coating - Clearcoat - Clearcoat Roughness - Clearcoat Normal Map * Emission - Emission Color - Emission Value - Emission Mode - Energy Normalization * Volume - Thin Walled - Index of Refraction - Attenuation Color - Attenuation Distance - Subsurface Color Material Subtypes ================= The Enterprise PBR Shading Model offers a limited but still substantial amount of parameters. For easier usability, especially for novice users, we recommend to use the following subtypes, which expose only subsets of parameters: * Car Paint * Emissive * Glass * Metal * Plastic * Textile/Leather * Wood For compatibility with the widely spread Unreal model [#Kar13], additionally a general purpose material called "Basic" is recommended. Table [subtypes-parameters-metals], Table [subtypes-parameters-opaque-dielectrics] and Table [subtypes-parameters-transparent-dielectrics] describe recommended fixed and default values for these eight different material types. While fixed values should not be exposed to the user, we recommend to initialize all other values with the default values stated below. Color values are specified in linear sRGB space.