UPDATE: I answered my own question about what illumination model to use, but now I need to know how to calculate the Fresnel terms for reflected and transmitted rays.
I have a partially-implemented C++ ray tracer. Right now Phong lighting with shadow rays works fine. I chose not to have entities with a single color plus scalar ambient/diffuse/scalar coefficients; the three coefficients each have RGB components, so I can implement materials like these. Lights, on the other hand, have a single RGB color plus scalar diffuse and specular intensities. There's also a single RGB ambient light.
At this point I could also implement completely dielectric entities that reflect or transmit all light, with the proportion of reflected to refracted light determined by the Fresnel equations. However, how do I realistically combine the reflected and refracted colors with the Phong color? I want to have slightly reflective colored plastic, polished gold, perfect mirrored or glass spheres, stained glass, glass panes that are transparent head-on but green on the edges, et cetera. I was planning to add RGB reflectance and transmittance coefficients to each entity, and let the entity designer make sure that ambient+diffuse+specular+reflectance+transmittance lies in a sensible range, but this seems arbitrary. Is there a physically based way?
I found a suitable illumination model myself in the documentation for .mtl files:
This is dense and actually has some typos (like
Kx
andFt
), so I corrected it:This model makes sense to me, especially after reading Lighting 101 -- Phong specular reflection is a performance-minded hack for reflecting light sources, so it's natural to use the same coefficient for specular highlights and reflected rays.
There's still one thing I don't understand. If I don't want to bother with Fresnel terms, I can set
Fl
,Fr
, andFt
to 1. If I want that extra accuracy, though, how would I calculate them in terms of my already-defined variables?