Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
peterkutz opened this issue May 10, 2024 · 2 comments
Open

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

peterkutz opened this issue May 10, 2024 · 2 comments

Comments

@peterkutz
Copy link
Contributor

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.

@portsmouth
Copy link
Contributor

portsmouth commented May 28, 2024

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.

@peterkutz
Copy link
Contributor Author

peterkutz commented Jun 5, 2024

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π

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants