OpenPBR icon indicating copy to clipboard operation
OpenPBR copied to clipboard

Add formula for the average albedo of the F82-tint model

Open peterkutz opened this issue 1 year ago • 3 comments

It is possible to analytically calculate the average albedo of the F82-tint model used for metal reflectivity in OpenPBR. Specifically, the average Fresnel can be calculated by integrating the reflectivity over the cosine-weighted hemisphere.

The average Fresnel is very useful to more accurately tint the multiple-scattering component of the rough metal surface. So I propose that we include this formula in the spec.

peterkutz avatar May 10 '24 20:05 peterkutz

This could be reasonably left as an exercise for the reader perhaps..

Though if you have a derivation of the result Peter, would be handy.

portsmouth avatar May 28 '24 16:05 portsmouth

This was first suggested and derived by @Reedbeta :

Using the syntax from the ASM technical document, given F_F82Tint(θ) = r + (1 − r)(1 − cosθ)⁵ − bcosθ(1 − cosθ)⁶ the cosine-weighted hemispherical average of that works out to be r + (1 - r)/21 - b/126

This can be derived like this in Wolfram Alpha: integrate (r + (1 − r)(1 − cosθ)⁵ − bcosθ(1 − cosθ)⁶) * cos(θ) * sin(θ) / π from theta = 0 to π/2 and phi = 0 to 2π

peterkutz avatar Jun 05 '24 02:06 peterkutz

@peterkutz If you have time, would be great if you can create a PR adding this to the spec.

portsmouth avatar Oct 29 '24 09:10 portsmouth