Bforartists / Manual

The Bforartists Manual
17 stars 6 forks source link

Principled BSDF Shader now has This Film Iridescence #608

Closed Draise14 closed 3 weeks ago

Draise14 commented 1 month ago

image New feature, new documentation.

Details SHA-1: 17f2cdd104608c86c910a937bb277c9f0e342345 * Cycles: Add thin film iridescence to Principled BSDF This is an implementation of thin film iridescence in the Principled BSDF based on "A Practical Extension to Microfacet Theory for the Modeling of Varying Iridescence". There are still several open topics that are left for future work: - Currently, the thin film only affects dielectric Fresnel, not metallic. Properly specifying thin films on metals requires a proper conductive Fresnel term with complex IOR inputs, any attempt of trying to hack it into the F82 model we currently use for the Principled BSDF is fundamentally flawed. In the future, we'll add a node for proper conductive Fresnel, including thin films. - The F0/F90 control is not very elegantly implemented right now. It fundamentally works, but enabling thin film while using a Specular Tint causes a jump in appearance since the models integrate it differently. Then again, thin film interference is a physical effect, so of course a non-physical tweak doesn't play nicely with it. - The white point handling is currently quite crude. In short: The code computes XYZ values of the reflectance spectrum, but we'd need the XYZ values of the product of the reflectance spectrum and the neutral illuminant of the working color space. Currently, this is addressed by just dividing by the XYZ values of the illuminant, but it would be better to do a proper chromatic adaptation transform or to use the proper reference curves for the working space instead of the XYZ curves from the paper. Pull Request: https://projects.blender.org/blender/blender/pulls/118477