I've found something cool, I think. An interesting way to control the specular
and diffuse energy just via the index of refraction (IOR) for single layered
materials simulating a, well, layered one.
After considering the microfacet model (PBR) for awhile I came to a plausible
conclusion that the diffuse reflection term needs a Fresnel term as well. It
changes the whole material thing and makes it possible to control the specular
and diffuse reflectivity just via the index of refraction.
So for example, if the surface becomes more metallic, then the diffuse
component drops accordingly, likewise at gazing, all depending on the IOR. In
my implementation I do control metallness via IOR, too. And the same IOR also
controls the specular reflection like in standard PBR (yet using a simpler
IOR there) via the Fresnel relationship. So now in my implementation the same
IOR also controls the energy available for diffuse reflection. Usually you
would have to set it by hand, i.e. via guesswork by fiddling with the diffuse
coefficient each time.
I did a couple of tests. The results look promising. I can reproduce the
standard results as if nothing had happend, yet with my method I can produce
sound materials where the diffuse and specular reflection is couple via IOR
influencing each other. That means, I can tinker around with the IOR and the
reflection matches each time, as it seems. Sure, that's not for the artist
among us, but it's cool for building some cool materials. I think this becomes
important for metallic enriched surfaces where you need to know how the
energy separates on the surface to get the rendering right. That is to say,
how much diffuse energy is available if the surface is metallic but with a
very low absorption coefficient such that the diffuse layer still shines
through, or, how much needs the diffuse component be lowered when looking at a
polished object towards gazing?
Here is a hires image showing the effect;
The standard coefficients for the specular and diffuse component are set to 1
in here. These components are now fully IOR controlled via the Fresnel
relationship. The yellow color indicates how much the surface reflects light.
(I need to implement reflection mapping making the result look much more
stunning, but I will save that for later because for my stylized renderer
I'm especially interested in such sort of colorings.) Anyhow. To ease the
demonstration I used a simplified IOR (no metal) of refractive power 3.5 for
this example. That means, the light refracts at 3.5 into and reflects off from
the polished surface of the sphere with the Fresnel relationship determining the
split in energy. The part that goes into the surface is the part the diffuse
component (basically, the color) gets modulated/attenuated with to keep the
whole energy balanced producing that diffuse look. The highlight is also worth
considering. Despite the surface has a polished finish, the highlight is quite
dim. And it needs to be that way. Away from gazing, and for the given IOR,
most of the light goes into the surface leaving only a small amount of light
to reflect off. But with the highlight towards gazing it will get brighter. It
also gets brighter everywhere if the surface gains some metallness. It goes
away if the IOR is 1.0 (fully diffuse), but comes back if the metallness > 0
even with the IOR at 1.0. Etc.
Don't know if this all sounds plausible to someone in here, and I don't know
how much I do violate other things by adding a Fresnel term to the diffuse
part (I need to compute the energy surface and see how it behaves), but it
works and looks quite well and will give me some cool ways to build and to
control the reflectivity of some stylized materials I want to create for my
game. So I'm going to play around with it some more, finding possible flaws,
etc., but also trying some stuff like making transitions from metal to a
diffuse etc., or check how the highlights behave when adjusting the IOR in
multiple ways.