OpenPBR icon indicating copy to clipboard operation
OpenPBR copied to clipboard

Suggest Hoffman approximations for Fresnel factor of metal under coat/film

Open portsmouth opened this issue 1 year ago • 1 comments

When metal is coated by a dielectric (or a thin film), its Fresnel factor will be modified due to the adjacent dielectric IOR differing from air.

Modeling this in OpenPBR is currently not clearly stated since our metal lobe uses the "F82-tint" model, which is based on the Schlick approximation, where don't know the underlying IOR and absorption of the metal (needed to compute the Fresnel factor correctly).

So we currently just suggest to use the Gulbrandsen approach to calculate this (we mention this only in the thin-film section, but I'd also suggest we move this to the Metal section, as it applies in the case of a coated metal also):

In the case of the metallic base the physics is somewhat ambiguous since, as described in the Metal section, the Fresnel factor for metal is defined according to the Schlick-based “F82-tint” parametrization which does not specify the underlying physical complex IOR. We suggest here that some reasonable approximation is employed to map the Fresnel factor to the best matching effective complex IOR, for example that described by [Gulbrandsen2014].

However, Naty Hoffman (@natyh) (who developed the F82-tint model) has suggested some approximations to compute the modified Fresnel of metal under dielectric, within the F82-tint model. As he noted, this could be just as (or more) accurate than working with the true Fresnel equations, in the context of an RGB renderer.

His formulas are given in his talk at the SIGGRAPH 2020 course "Physically Based Shading in Theory and Practice":

https://blog.selfshadow.com/publications/s2020-shading-course/hoffman/s2020_pbs_hoffman_slides.pdf

His first suggestion is to just use the IORs alone (inferred from the F0) to do the calculation, which he shows works reasonably well:

image

His more accurate suggestion is the following formula (which isn't derived, so we should ask where this comes from):

image

portsmouth avatar Jul 18 '24 15:07 portsmouth

Related to this, I was thinking that a more principled way to describe the metal would be to specify the required (observed) F0 and F82 reflectances, but leave the specific underlying metal model that achieves this implementation dependent and ideally physically accurate.

So that would amount to:

  • specify the F0 color via base_color
  • specify the F82 color, which we could still do using the tint parametrization, i.e. F82 is given by specular_color times the Schlick curve for the specified F0.

That then defines the physical RGB F0 and F82. Then we would say that there is assumed to be some underlying physical metal that generates those reflectances (in the given color space), i.e. some spectral IOR $n$ and absorption $k$. That would then completely define how the interaction with the adjacent media should happen.

There would in general be many possible $n(\lambda)$ and $k(\lambda)$ that achieve this, and any one will do. That leaves it open for future improvements to provide a good approximation (in some sense) for the underlying spectral metal that produces the desired reflection colors.

We can then just suggest the Lazanyi-Schlick model as a convenient fit that hits the required colors. (And the Hoffman formulas quotes here for external media handling).

portsmouth avatar Jul 06 '25 16:07 portsmouth