<div dir="ltr">Hello Everyone,<div><br></div><div style>I posted some related into in here <a href="http://www.blender.org/forum/viewtopic.php?t=27455">http://www.blender.org/forum/viewtopic.php?t=27455</a> but just in case I though I would write to this list as well.</div>
<div style><br></div><div style>Long story short - there is a fundamental issue in Cycles related to Fresnel calculation. For microfacet roughness models (Backmann, GGX, etc...) the Fresnel term has to be computed based on microfacet normal (Half angle vector in our case) instead of average normal whether it&#39;s geometry or pixel normal.</div>
<div style><br></div><div style>I included some very basic examples in the post of where it breaks. I only included Glossy BSDF example with GGX distribution since it has much longer specular tail and thus the problem is quite apparent. But this happens everything. Sure, for single shots you can find cases where it works, but when you render animations that have to match real-world footage then it&#39;s really hard to control.</div>
<div style><br></div><div style>I looked at YafaRay and Mitsuba but everything is fine there though they don&#39;t support GPU rendering.</div><div style><br></div><div style>---</div><div style><br></div><div style>I have local changes only for Glossy BSDF with GGX distribution but would like to generalize it to everything. The question is how to do it best within Cycles kernels and SVM (without side effects) ?</div>
<div style><br></div><div style>I have/had a few ideas of how to do it best but some of them had side effects. The one that I am thinking of right now is that everything has basic IOR input, but you could plug a special advanced Fresnel node into it that would be evaluated withing closures themselves. That advanced node could have multiple options: 1. simple dielectric IOR, 2. spectral n,k data that could be pre-integrated into LUTs using standard CIE illuminant and standard CIE observer. It would look something similar to ColorRamp node. And add some presets there that could be easily generated from n,k databases.</div>
<div style><br></div><div style>Another idea was to have closures leave something on stack like microfacet normal. So by default it would be average geometry/pixel normal, but it closure is microfacet based it would override that with H vector. Then Fresnel node that is connected to its output will use that. But this would not work with all the mixing and other stuff unless you plug that Fresnel node directly after the BSDF.</div>
<div style><br></div><div style>Anyway, I&#39;d like to know what you think about it.</div><div style><br></div><div style>Thanks,</div><div style>- Dmitry</div></div>