I've just released an experimental version of POV-Ray implementing two
alternative models for diffuse reflection, besides the classic so-called
Lambertian model:
https://github.com/POV-Ray/povray/releases/tag/v3.7.1-alpha.8545805%2Bav122
I'd like to invite you to toy around with them as you deem fit.
To explain what these alternative models do, let me first bore you to
death with some background information:
In a totally strict sense, diffuse reflection is the effect that light
hitting a surface bounces off in a direction that is entirely
independent of the angle of incidence. There is essentially just one
manner in which this can happen, and it is perfectly described by the
so-called Lambertian model, which is what POV-Ray uses.
Surprisingly enough, for this type of reflection to happen, the object's
surface must be _perfectly smooth_; all of what we might call
"diffuseness" must be from scattering within the material itself -- the
same process we now know as "subsurface scattering". So the Lambertian
model can be thought of as a subsurface scattering model, suitable for
materials in which the light doesn't travel far before exiting again (in
technical terms, materials with a very low "mean free path" between
scattering events).
As soon as the surface exhibits any kind of roughness, other effects
kick in that mess with the neat non-directionality of the Lambertian
model; for instance, in a bumpy surface, portions of the surface which
are angled towards the light source will receive more incoming light;
since each portion of the surface will emit light preferentially in the
direction of its surface normal, this will bias the outgoing light
towards the direction of incoming light.
The alternative models try to account for such effects in different ways:
- The Oren-Nayar model is based on the presumption that the surface is
comprised of microscopic facets of somewhat random orientation that form
V-shaped pits, with each individual facet exhibiting Lambertian
reflection. The model takes into account not only microfacet
orientation, but also shadowing and masking of light by the opposite
side of each pit, as well as interreflection between the sides. For the
sake of computational simplicity, instead of the full model I've
implemented the more commonly used simplified version, known as the
"qualitative model", which eliminates one term that contributes only
little to the result, and uses a very rough approximation for
interreflection.
To use the (qualitative) Oren-Nayar model, specify:
finish {
diffuse FLOAT
oren_nayar ROUGHNESS
}
where the ROUGHNESS parameter is a metric for the roughness of the
material. (Currently this is the _sigma_ parameter in the Oren-Nayar
equations; however, please be aware that this may still be subject to
change without notice.)
The Lambertian model can be considered a special case of the Oren-Nayar
model, with ROUGHNESS = 0.0.
- The Lommel-Seeliger model has its roots in astronomy, where it is used
to model "lunar type" (i.e. rocky or dusty) surfaces, while the
Lambertian model is used for "icy" surfaces, and weighted averages of
the two are used to model anything in between.
To use the Lommel-Seeliger model, specify:
finish {
diffuse FLOAT
lommel_seeliger K
}
where K specifies the weight of the Lommel-Seeliger model, ranging from
0.0 (pure Lambertian) to 1.0 (pure Lommel-Seeliger)
Have fun, and feel free to go crazy testing!

Am 31.03.2016 um 19:27 schrieb clipka:
> In a totally strict sense, diffuse reflection is the effect that light> hitting a surface bounces off in a direction that is entirely> independent of the angle of incidence. There is essentially just one> manner in which this can happen, and it is perfectly described by the> so-called Lambertian model, which is what POV-Ray uses.
I think I wrote nonsense there.
Also, a few more notes:
- My implementation of the Oren-Nayar model turns out to be bugged.
- The mix of Lommel-Seeliger and Lambert is also known as "Lunar-Lambert".

clipka <ano### [at] anonymousorg> wrote:
> Am 31.03.2016 um 19:27 schrieb clipka:>>> - My implementation of the Oren-Nayar model turns out to be bugged.>
I like the feature, could I help test it? I have read this model on wikipedia
and thought about it for a while.

"And" <49341109@ntnu.edu.tw> wrote:
> clipka <ano### [at] anonymousorg> wrote:> > Am 31.03.2016 um 19:27 schrieb clipka:> >> >> > - My implementation of the Oren-Nayar model turns out to be bugged.> >>> I like the feature, could I help test it? I have read this model on wikipedia> and thought about it for a while.
I just tried your new texture. The bigger the sigma the surface appears darker
when applying the same diffuse value. It is from the Oren-Nayar model itself I
have confirmed.
Is this the bug you said?

Am 05.04.2016 um 14:50 schrieb And:
> "And" <49341109@ntnu.edu.tw> wrote:>> clipka <ano### [at] anonymousorg> wrote:>>> Am 31.03.2016 um 19:27 schrieb clipka:>>>>>>>>> - My implementation of the Oren-Nayar model turns out to be bugged.>>>>>>> I like the feature, could I help test it? I have read this model on wikipedia>> and thought about it for a while.> > I just tried your new texture. The bigger the sigma the surface appears darker> when applying the same diffuse value. It is from the Oren-Nayar model itself I> have confirmed.> > Is this the bug you said?
No; since it's an intrinsic property of the model, I don't consider it a
bug.
What I got wrong is the dependence on "sideways" illumination, if you
know what I mean.
In the model there's a term depending on the angle between the light
source and eye directions /projected/ onto the surface (the azimuth
angle, if you like). Normally I should compute the projected vectors,
normalize them, and compute the dot product, to get the cosine of the
angle. But I forgot the normalization step.

clipka <ano### [at] anonymousorg> wrote:
> Am 05.04.2016 um 14:50 schrieb And:> > "And" <49341109@ntnu.edu.tw> wrote:> >> clipka <ano### [at] anonymousorg> wrote:> >>> Am 31.03.2016 um 19:27 schrieb clipka:> >>>> >>>> >>> - My implementation of the Oren-Nayar model turns out to be bugged.> >>>> >>> >> I like the feature, could I help test it? I have read this model on wikipedia> >> and thought about it for a while.> >> > I just tried your new texture. The bigger the sigma the surface appears darker> > when applying the same diffuse value. It is from the Oren-Nayar model itself I> > have confirmed.> >> > Is this the bug you said?>> No; since it's an intrinsic property of the model, I don't consider it a> bug.>> What I got wrong is the dependence on "sideways" illumination, if you> know what I mean.>> In the model there's a term depending on the angle between the light> source and eye directions /projected/ onto the surface (the azimuth> angle, if you like). Normally I should compute the projected vectors,> normalize them, and compute the dot product, to get the cosine of the> angle. But I forgot the normalization step.
OkOK. That sounds very easy to fix for you.
I derived a solution on what I said the albedo value getting dark when sigma
increase.
I study the formula from the wikipedia. It said A=1-0.5*..., B=0.45*...(Both
rely on the sigma)
And the result albedo seems rho*A + rho*B*(2/3-64/45/pi) instead rho
itself. So maybe you can divide it when apply the diffuse albedo feature.

Am 06.04.2016 um 09:52 schrieb And:
> I derived a solution on what I said the albedo value getting dark when sigma> increase.> I study the formula from the wikipedia. It said A=1-0.5*..., B=0.45*...(Both> rely on the sigma)> > And the result albedo seems rho*A + rho*B*(2/3-64/45/pi) instead rho> itself. So maybe you can divide it when apply the diffuse albedo feature.
Thanks! That correction factor appears to make a lot more sense than the
hack I had come up with :)
Not too surprisingly, experiments indicate that it does indeed fit like
a glove.

"And" <49341109@ntnu.edu.tw> wrote:
>> I derived a solution on what I said the albedo value getting dark when sigma> increase.> I study the formula from the wikipedia. It said A=1-0.5*..., B=0.45*...(Both> rely on the sigma)>> And the result albedo seems rho*A + rho*B*(2/3-64/45/pi) instead rho> itself. So maybe you can divide it when apply the diffuse albedo feature.
Should say:
For a small area 'da', incident light irradiance 'E0', and if the incident angle
'theta_i' is fixed, it will receive E0*da*cos(theta_i) energy per second. then
emit
rho*E0*da*cos(theta_i)*A
+rho*E0*da*B/pi*(
sin(2*theta_i)*(theta_i/2 - sin(2*theta_i)/4)
+2*sin(theta_i)*(1/3 - pow(sin(theta_i),3)/3)
)
energy per second.
Then I apply a condition that a homogeneous hemisphere lighting, equivalent to a
fixed incident radiance 'Li', then the small area 'da' receives Li*pi*da energy
per second, emit rho*Li*pi*da*A + rho*Li*da*B*(2*pi/3-64/45) energy per second.
So get the actual albedo rho*A + rho*B*(2/3-64/45/pi).