## Fresnel Reflection PluginbackFresnel reflection looks good, and it's important for visual realism, especially with materials like glass. Stephen Westin has written a really good essay on Fresnel Reflectance, and he explains it better than I probably would, so I'm just putting up this page to give away software.
I've spent some time munging spheremaps for various 3-D reasons -- they're basically nice and easy environment maps. The advantage over cubemaps is that you can precompute isotropic reflectance from a particular direction (you can do much better materials than cubemaps), but spheremaps aren't view-independent like cubemaps. For this filter, the idea is that you put the image representing a specular spheremap on a layer, run the filter, and blend it over the diffuse map. Or you can do weirder things -- this just gives the raw coefficients in a form that they're usable in an alpha channel, so artists can make magic in Photoshop. It's best to start with an opaque layer, and let the plugin add the transparency. As you can probably tell, I just rediscovered Filter Factory, and this plugin implements Chris Schlick's approximation to Fresnel reflection. This first appeared in his thesis in 1992, but if you don't read French, you can read about it in A Customizable Reflectance Model for Everyday Rendering from 1993 Eurographics.
## DownloadHere's the .8bf for your PC running Photoshop: fresnela.8bf [48k].I don't have a mac version, but you might be able to download filter factory for the Mac and make your own using the fresnela.afs [1 KB] source. If you do, let me know. There's a good chance that this plugin needs some items that aren't on your computer. You can get pluginextras.zip and put it in your Photoshop directory, or your windows system directory to make everything work. (I need to do an installer, but there's never time.) For those who are curious, here's what I typed into Filter Factory to make the plugin work (what a mess, if only there were an exponent!) r = r g = g b = b a = (m*2 > min(X,Y)) ? a : (mix(255, ctl(0), (( (511-cos(m*512/min(X,Y))) * (511-cos(m*512/min(X,Y))) * (511-cos(m*512/min(X,Y))) >> 6) * (511-cos(m*512/min(X,Y))) >> 9) * (511-cos(m*512/min(X,Y))), 1<<30)) |