POV-Ray : Newsgroups : povray.binaries.images : Experimental alternative diffuse models Server Time
8 May 2024 04:05:24 EDT (-0400)
  Experimental alternative diffuse models (Message 11 to 20 of 23)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 3 Messages >>>
From: clipka
Subject: Re: Experimental alternative diffuse models
Date: 6 Apr 2016 07:56:39
Message: <5704f977$1@news.povray.org>
Am 06.04.2016 um 11:42 schrieb And:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> On 5-4-2016 15:19, And wrote:
>>> Thomas de Groot <tho### [at] degrootorg> wrote:
>>>> OK. One final example: a pot with albedo added as well as some specular
>>>> value.
>>>>
>>>> I don't know how to interpret or make sense of all this, so some
>>>> feedback is appreciated.
>>>>
>>>> --
>>>> Thomas
>>>
>>> The texture is fun. It has some contrast to the before.
>>>
>>
>> I confess that I am confused. The textures appear darker and somehow
>> with less "contrast". So, my question really is: /when/ to use these
>> alternatives instead of pure Lambertian? To me, at this stage and
>> totally instinctively, pure Lambertian has my preference.

The darker appearance is inherent in the mathematical models: At the
same nominal brightness, the alternative models result in a lower
effective bihemispherical albedo (ratio of total reflected light vs.
total incoming light); a similar effect happens with the conventional
model when you use a high "brilliance" parameter. I'll need to implement
correction factors for that, just as I did for the "brilliance"
mechanism, when the "albedo" keyword is used.

As for having less "contrast", that is also to be expected, and is
actually the feature making them more realistic for some materials.

> Lambertian diffuse is very well truly. I think the others can be used when you
> feel the pure diffuse is plodding, or sometimes Oren-Nayar can be used in an
> ....powdery object like chalk.

Chalk, plaster, sandstone, unglazed clay, Shapeways' 3d-printed
"unpolished strong & flexible plastic", textiles, eggshells, even paper
-- there's plenty of stuff in our world that is seriously non-lambertian.

Granted, smooth plastic, glossy cardboard, finished wood and painted
surfaces are quite dominant in our world, and Lambertian does quite a
good job for those. But as soon as you have something in your scene that
in real life exhibits non-Lambertian reflection, using one of the
alternative models may give your scene that little extra realism.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Experimental alternative diffuse models
Date: 6 Apr 2016 08:07:00
Message: <5704fbe4$1@news.povray.org>
On 6-4-2016 13:56, clipka wrote:
> Am 06.04.2016 um 11:42 schrieb And:
>> Thomas de Groot <tho### [at] degrootorg> wrote:
>>> On 5-4-2016 15:19, And wrote:
>>>> Thomas de Groot <tho### [at] degrootorg> wrote:
>>>>> OK. One final example: a pot with albedo added as well as some specular
>>>>> value.
>>>>>
>>>>> I don't know how to interpret or make sense of all this, so some
>>>>> feedback is appreciated.
>>>>>
>>>>> --
>>>>> Thomas
>>>>
>>>> The texture is fun. It has some contrast to the before.
>>>>
>>>
>>> I confess that I am confused. The textures appear darker and somehow
>>> with less "contrast". So, my question really is: /when/ to use these
>>> alternatives instead of pure Lambertian? To me, at this stage and
>>> totally instinctively, pure Lambertian has my preference.
>
> The darker appearance is inherent in the mathematical models: At the
> same nominal brightness, the alternative models result in a lower
> effective bihemispherical albedo (ratio of total reflected light vs.
> total incoming light); a similar effect happens with the conventional
> model when you use a high "brilliance" parameter. I'll need to implement
> correction factors for that, just as I did for the "brilliance"
> mechanism, when the "albedo" keyword is used.
>
> As for having less "contrast", that is also to be expected, and is
> actually the feature making them more realistic for some materials.
>
>> Lambertian diffuse is very well truly. I think the others can be used when you
>> feel the pure diffuse is plodding, or sometimes Oren-Nayar can be used in an
>> ....powdery object like chalk.
>
> Chalk, plaster, sandstone, unglazed clay, Shapeways' 3d-printed
> "unpolished strong & flexible plastic", textiles, eggshells, even paper
> -- there's plenty of stuff in our world that is seriously non-lambertian.
>
> Granted, smooth plastic, glossy cardboard, finished wood and painted
> surfaces are quite dominant in our world, and Lambertian does quite a
> good job for those. But as soon as you have something in your scene that
> in real life exhibits non-Lambertian reflection, using one of the
> alternative models may give your scene that little extra realism.
>

Thanks. I am beginning to see/understand where this may lead my use. I 
am still a bit unsure about the dedicated use of either of the two 
alternatives though for given materials.

-- 
Thomas


Post a reply to this message

From: clipka
Subject: Re: Experimental alternative diffuse models
Date: 6 Apr 2016 09:47:03
Message: <57051357$1@news.povray.org>
Am 06.04.2016 um 13:24 schrieb Thomas de Groot:
> On 6-4-2016 12:28, And wrote:
>> Or the carton.
>>
> 
> Powdery/chalk, carton, yes that makes sense indeed for oren_nayar.
> 
> Got back to the original clipka message:
> 
> [quote] 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. [/quote]
> 
> What would you say for the following:
> 
> - Lambertian for icy or shiny surfaces;
> - oren_nayar for fine, powdery-like surfaces;
> - lommel_seeliger for coarser, dusty-like surfaces.

Actually, having read up a bit on the models' origins and technical
background by now, I'd say the following:

- There is probably no significant practical difference between powdery,
dusty or coarse surfaces.

- Lommel-Seeliger is a niche model, designed to be computationally
"lightweight" while reasonably approximating dark (*) coarse surfaces;
from all I know, its use is almost exclusively restricted to astronomy.

(* Many people don't realize it, but the moon is about as bright as a
lump of anthrazit coal.)

- Pure Lambertian is only reasonably realistic for /some/ (**) bright
coarse surfaces.

- With an additional fresnel-based term to compensate for light lost to
specular reflection (finish-level "fresnel on" in recent POV-Ray
versions), the Lambertian model is also reasonably realistic for
[non-metallic] uncoated shiny surfaces, and /some/ (***) coated shiny
surfaces.

- For most coarse surfaces, including /some/ (**) bright ones,
Oren-Nayar [with noteworthy roughness] is better suited.

- For /some/ (***) coated shiny surfaces, Oren-Nayar with an additional
fresnel-based compensating term (as mentioned above) is better suited.

(**) For bright coarse surfaces, the choice betwen the Lambertian and
Oren-Nayar model depends on the underlying material's optical
properties: If, at the dimensions of the surface's roughness, the
material exhibits some degree of translucency, the Lambertian model is
sufficient (e.g. snow, not-yet-licked ice cream, wood, Spectralon,
possibly Styrofoam), though it may call for SSLT if shown up close. If
on the other hand the material is opaque at those dimensions, Oren-Nayar
is better suited (e.g. Shapeways' unpolished "strong & flexible"
plastic, unglazed ceramics).

(Actually this is also true for dark coarse surfaces, but they are
almost exclusively opaque at the dimensions in question.)

(***) For coated shiny surfaces, the choice between the Lambertian and
Oren-Nayar model depends on which one would be appropriate if the
surface was uncoated. In both cases, use of finish-level "fresnel on" is
recommended.


Also, for the sake of completeness:

- POV-Ray's "brilliance"-based variation of the Lambertian model is an
abomination that has no physical justification whatsoever; my current
guess is that it originated as a botched attempt to implement the
so-called Minnaert model.


Post a reply to this message

From: clipka
Subject: Re: Experimental alternative diffuse models
Date: 6 Apr 2016 09:51:54
Message: <5705147a$1@news.povray.org>
Am 06.04.2016 um 14:06 schrieb Thomas de Groot:

> Thanks. I am beginning to see/understand where this may lead my use. I
> am still a bit unsure about the dedicated use of either of the two
> alternatives though for given materials.

It's actually pretty simple:

- If you're working in the field of planetary photometrics, you probably
want to use Lommel-Seeliger.

- Otherwise, you probably want to use Oren-Nayar.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Experimental alternative diffuse models
Date: 7 Apr 2016 02:43:36
Message: <57060198$1@news.povray.org>
On 6-4-2016 15:51, clipka wrote:
> Am 06.04.2016 um 14:06 schrieb Thomas de Groot:
>
>> Thanks. I am beginning to see/understand where this may lead my use. I
>> am still a bit unsure about the dedicated use of either of the two
>> alternatives though for given materials.
>
> It's actually pretty simple:
>
> - If you're working in the field of planetary photometrics, you probably
> want to use Lommel-Seeliger.
>
> - Otherwise, you probably want to use Oren-Nayar.
>

Very good. That makes my life much simpler :-)

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Experimental alternative diffuse models
Date: 7 Apr 2016 02:47:07
Message: <5706026b@news.povray.org>
On 6-4-2016 15:46, clipka wrote:

> Actually, having read up a bit on the models' origins and technical
> background by now, I'd say the following:
>
[...]

Thanks indeed. That answers my questions and makes comprehensive the use 
of both Lambertian and oren_nayar models. As for my own use, I think I 
shall skip the lommel_seeliger model.

-- 
Thomas


Post a reply to this message

From: Le Forgeron
Subject: Re: Experimental alternative diffuse models
Date: 7 Apr 2016 12:32:42
Message: <57068baa@news.povray.org>
Testing the new (123) code.

Center prism is lambertian (traditional)

On left, lommel_seeliger (0.5 and 1 at full left)

On most right, oren_nayar (2)

on front right, oren_nayar (1) and lommel_seeliger (0.5)


Now, I know we have a "fresnel" qualifier, but could we have some easier keyword for
the alternative diffuse models ?
(and "lambert" is not even mentionned, that is a bit unfair)

There is no chance to remember the exact spelling without double-checking the
documentation...

Something like "dusty" for oren_nayar, or "rough" ? and I have no clue for
lommel_seeliger.

It's unfair when compared to "phong", but a short name is better to avoid typo and for
memory.


Post a reply to this message


Attachments:
Download 't.png' (150 KB)

Preview of image 't.png'
t.png


 

From: clipka
Subject: Re: Experimental alternative diffuse models
Date: 7 Apr 2016 16:26:22
Message: <5706c26e$1@news.povray.org>
Am 07.04.2016 um 18:32 schrieb Le_Forgeron:

> Now, I know we have a "fresnel" qualifier, but could we have some easier keyword for
the alternative diffuse models ?
> (and "lambert" is not even mentionned, that is a bit unfair)
> 
> There is no chance to remember the exact spelling without double-checking the
documentation...
> 
> Something like "dusty" for oren_nayar, or "rough" ? and I have no clue for
lommel_seeliger.

That's a no-go, as far as I'm concerned. Here's why:

"Dustyness" or "roughness" are physical phenomena.

Oren-Nayar and Lommel-Seeliger are two mathematical approaches that
differ in the underlying model and the resulting formulae, but they are
both designed to model dustyness and roughness, and they are equally
valid attempts to approximate these phenomena.

If we call one "rough", what do we call the other? "rough2"?

What if at some point in the future we decide to provide yet another
alternative? Minnaert would be a hot candidate, for instance. "rough3"?

The "phong" and "specular" keywords are an ideal showcase of what is
wrong with that approach: The one uses the Phong model, the other the
Blinn-Phong model. One is a tad faster, while the other is a tad more
precise, but both are equally valid models to compute specular
highlights. Yet only one has the honor of carrying the generic name of
the phenomenon. (And, as a matter of fact, the name is misleading:
"specular" would normally encompass not only specular highlights but
also specular reflection -- which in turn we just call "reflection",
although that therm could also encompass diffuse reflection. In short,
keyword choice is a bitch. "albedo" turns out to have been a bad pick,
too, because besides the white-sky albedo it is actually meant to denote
there's also blue-sky albedo, black-sky albedo, geometric albedo, bond
albedo, single-scattering albedo, and what-have-you-not albedo, all
meaning different things.)


As for being difficult to remember, there are two approaches to solve this:


(A) Provide a standard include file with generic finish macros, just
like we provide standard include files with pigments, colours and some
such. You could have one "Rough" finish, that may happen to invoke the
Oren-Nayar model. Or the Lommel-Seeliger model. Or Minnaert. Or
what-have-you. If all you want is /any/ rough finish, any of the
mathematical models is good enough.

Note that work on this could be started any moment, by whoever wants to
assist in improving POV-Ray.


(B) Overhaul the entire finish syntax to define materials based on the
physical phenomena that need modelling, and _optionally_ the
mathematical model(s) to use (with defaults being picked otherwise),
maybe like so:

    finish {
      roughness 0.05
      reflection {
        // how to model light reflected in a specular manner
        brightness {
          // variable reflection
          minimum 0.0
          maximum auto // compute from ior
          #if (!UseFresnel)
            linear // just use a linear interpolation model
          #elseif (UseSchlickApproximation)
            schlick // use schlick's approximation
          #else
            fresnel // use fresnel model
          #endif
        }
        light_source {
          // how to model light coming from a light_source
          blinn_phong
        }
        environment {
          // how to model light coming from other objects
          raytracing { blur off }
        }
      }
      diffuse {
        // how to model light reflected diffusely
        brightness 0.5
        conserve_energy on // compensate for variable reflection
        light_source {
          oren_nayar
        }
        environment {
          #if (UseRadiosity)
            radiosity
          #elseif (UseMonteCarlo)
            raytracing { blur on } // Monte Carlo!
          #else
            constant 0.2 // our current "ambient"!
          #end
        }
      }
      refraction {
        // how to model light transmitted in a "specular" manner
        conserve_energy on // compensate for variable reflection
        light_source {
          raytracing { blur off } // uses looks_like
        }
        environment {
          photons
          raytracing { blur off }
        }
      }
      translucency {
        // how to model light transmitted in a diffuse manner
        ...
    }

As a matter of fact that's the general direction I'd personally prefer
to go, but it's still a loooong way to get there. So in the meantime,
new features need to be hooked up in whatever way they fit best with the
current syntax.


Post a reply to this message

From: Le Forgeron
Subject: Re: Experimental alternative diffuse models
Date: 7 Apr 2016 16:46:48
Message: <5706c738$1@news.povray.org>
Le 07/04/2016 22:26, clipka a écrit :
> Am 07.04.2016 um 18:32 schrieb Le_Forgeron:
> 
>> Now, I know we have a "fresnel" qualifier, but could we have some easier keyword
for the alternative diffuse models ?
>> (and "lambert" is not even mentionned, that is a bit unfair)
>>
>> There is no chance to remember the exact spelling without double-checking the
documentation...
>>
>> Something like "dusty" for oren_nayar, or "rough" ? and I have no clue for
lommel_seeliger.
> 
> That's a no-go, as far as I'm concerned. Here's why:
> 

Can we shorten them ? selecting only one of them (and if possible the easiest to
spell) ?
(or have aliases in the token array, so that either of them get recognised/parsed ?)

phong / specular is a nice illustration of that problem. Thanks for the point.

(I hate "Name of specifier" as a designation of item:
the law of refraction ( ior1.sin phi1 = ior2.sin phi2 ) is for many Snell's law.
But it is hammered in school as Descartes' law in France.
And sometime it is Snell-Descartes law.
Whatever, if you talk of it with an alien, you have no change of being understood
if you stick to "Name of specifier".

It's the first step of obscuring things in jargon.
)

Guess which country thinks CarolusMagnus, son of Pepin and Berthe/Bertrada, was the
emperor from ?


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Experimental alternative diffuse models
Date: 7 Apr 2016 17:22:34
Message: <5706cf9a$1@news.povray.org>
Hard names aside, might it be more logical to write it like this

   diffuse {<amount> method <bla> roughness <x> ...}

similar to e.g. how reflection or media parameters are grouped.
Supported parameters depend on the method, and if it makes sense
to have e.g. a roughness parameter for multiple methods it can
have different range / interpretation depending on method).

You can also make method name lambert explicit this way except
method lambert will be default anyway.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 3 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.