|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ever since I started working on gamma handling, I had been trying to
concoct a scene that clearly and unambiguously demonstrates why anything
other than "assumed_gamma 1.0" is doing it wrong. I /knew/ this was the
case, but somehow it eluded all my attempts at nailing it down.
Until I stumbled across the description of the `exponent` reflection
parameter in the docs: Here was a feature that probably had been
invented for the sole purpose of working around a phenomenon that early
POVers failed to understand, but which to me shouts "Gamma!" at the top
of its lungs.
So inspired by that text, here it is now at last: The smoking gun of
gamma handling.
The first image shows the scene as it should be, rendered with
`assumed_gamma 1.0` and proper colour math. What you see is a somewhat
reflective checkered plane, a set of somewhat reflective spheres with
highlights, and a black background. That's all, nothing else fancy in
there. (I even turned off ambient and radiosity, as it would have made
the next step far more difficult.)
The second image shows essentially the same scene with `assumed_gamma
2.2`, with the diffuse settings (`diffuse` and `brilliance`) adjusted to
get exactly the same diffuse effect out of the different colour math.
Nothing else changed whatsoever.
I'd like to draw your attention to the following details:
Exhibit A: The highlights. On the darker spheres they get dimmer, while
staying at about the same brightness (actually even getting a bit
brighter) on the bright spheres.
Exhibit B: The reflections. In the shadows and darker portions they seem
to disappear almost /completely/, while in the brightly lit portions
they even get brighter.
Exhibit C: The terminators. In the reflections the transition between
the illuminated and shadowed sides of the spheres become excessively sharp.
Just to scare your kids I've also attached a the third image, rendered
with "assumed_gamma 5.0" to exaggerate the effect. If the "assumed_gamma
2.2" image did not convince you, this one should: All the flaws visible
here are due to non-linear colour math, and while they are a tad more
subtle with a gamma of 2.2, they're still present.
I rest my case.
Post a reply to this message
Attachments:
Download 'smoking_gamma_1.0.png' (173 KB)
Download 'smoking_gamma_2.2.png' (159 KB)
Download 'smoking_gamma_5.0.png' (153 KB)
Preview of image 'smoking_gamma_1.0.png'
Preview of image 'smoking_gamma_2.2.png'
Preview of image 'smoking_gamma_5.0.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> The second image shows essentially the same scene with `assumed_gamma
> 2.2`, with the diffuse settings (`diffuse` and `brilliance`) adjusted to
> get exactly the same diffuse effect out of the different colour math.
Please forgive my ignorance, but does that mean the default settings for diffuse
and brilliance are meant to give the most visually appealing results with an
assumed_gamma of 2.2?
I never really gave assumed_gamma much thought. I just noticed that setting it
to 1.0 produced a washed-out result so I picked 2.2 and never thought about it
again.
Regards,
Dave Blandston
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 22.12.2016 um 05:08 schrieb Dave Blandston:
> clipka <ano### [at] anonymousorg> wrote:
>> The second image shows essentially the same scene with `assumed_gamma
>> 2.2`, with the diffuse settings (`diffuse` and `brilliance`) adjusted to
>> get exactly the same diffuse effect out of the different colour math.
>
> Please forgive my ignorance, but does that mean the default settings for diffuse
> and brilliance are meant to give the most visually appealing results with an
> assumed_gamma of 2.2?
It is more complicated than that.
> I never really gave assumed_gamma much thought. I just noticed that setting it
> to 1.0 produced a washed-out result so I picked 2.2 and never thought about it
> again.
Here are a few facts:
- The brilliance default of 1 fits /perfectly/ with `assumed_gamma 1.0`,
because the developers back then naively implemented a formula that was
designed for linear colours. The whole `brilliance` mechanism is an
awfully hackish thing, and it so happens that it can be used to achieve
the same proper look with other gamma settings (as far as diffuse goes),
so my guess is that it was introduced specifically for the purpose of
fixing the look of diffuse objects, in times when people probably didn't
even know what gamma handling was.
- The diffuse default of 0.7 was presumably introduced in times when bad
gamma handling was the norm, and it can be assumed that it was set in
such a way as to get pleasing results in /that/ environment. In a gamma
1.0 scenario, that would correspond to a setting of about 0.45.
- As Warp demonstrated not long ago, one main reason (besides trying to
use gamma-pre-corrected colours without the "srgb" keyword) for the
washed-out look in gamma 1.0 mode seems to be the "ambient" default:
That setting, too, was quite certainly designed for a gamma of about
2.2, and in a gamma 1.0 scenario that would correspond to an ambient
setting of 0.006 (though that number is difficult to nail down, as
ambient is always added to colours, and adding colours without proper
gamma handling greatly distorts them, particularly if their absolute
value is rather small.)
- Without proper gamma handling, there is stuff that you just simply
/cannot/ get right simultaneously (as demontrated with these images); so
you may need a /lot/ of tweaking to get /somewhat/ close to a realistic
look, and you'll have to do this /over and over again/ for virtually
each and every scene, as you'll need to fine-tune yor materials for the
given lighting conditions and vice versa. On the other hand, with gamma
1.0 all it takes is some experience, and once you get your materials
right you can re-use them quite easily in virtually every lighting
condition. (Also, with proper gamma handling the number of knobs to
tweak is smaller, since you never need to fiddle with any of those
unrealistic hacks like brilliance, reflection exponent, or light source
fade_power values other than 2.0.)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> - Without proper gamma handling, there is stuff that you just simply
> /cannot/ get right simultaneously (as demontrated with these images); so
> you may need a /lot/ of tweaking to get /somewhat/ close to a realistic
> look, and you'll have to do this /over and over again/ for virtually
> each and every scene, as you'll need to fine-tune yor materials for the
> given lighting conditions and vice versa. On the other hand, with gamma
> 1.0 all it takes is some experience, and once you get your materials
> right you can re-use them quite easily in virtually every lighting
> condition. (Also, with proper gamma handling the number of knobs to
> tweak is smaller, since you never need to fiddle with any of those
> unrealistic hacks like brilliance, reflection exponent, or light source
> fade_power values other than 2.0.)
You have made a believer out of me! The images in this post make it very clear
that gamma 1.0 is correct.
Regards,
Dave Blandston
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Am 22.12.2016 um 05:08 schrieb Dave Blandston:
> > clipka <ano### [at] anonymousorg> wrote:
> >> The second image shows essentially the same scene with `assumed_gamma
> >> 2.2`, with the diffuse settings (`diffuse` and `brilliance`) adjusted to
> >> get exactly the same diffuse effect out of the different colour math.
> >
> > Please forgive my ignorance, but does that mean the default settings for diffuse
> > and brilliance are meant to give the most visually appealing results with an
> > assumed_gamma of 2.2?
>
> It is more complicated than that.
>
> > I never really gave assumed_gamma much thought. I just noticed that setting it
> > to 1.0 produced a washed-out result so I picked 2.2 and never thought about it
> > again.
>
> Here are a few facts:
>
> - The brilliance default of 1 fits /perfectly/ with `assumed_gamma 1.0`,
> because the developers back then naively implemented a formula that was
> designed for linear colours. The whole `brilliance` mechanism is an
> awfully hackish thing, and it so happens that it can be used to achieve
> the same proper look with other gamma settings (as far as diffuse goes),
> so my guess is that it was introduced specifically for the purpose of
> fixing the look of diffuse objects, in times when people probably didn't
> even know what gamma handling was.
>
> - The diffuse default of 0.7 was presumably introduced in times when bad
> gamma handling was the norm, and it can be assumed that it was set in
> such a way as to get pleasing results in /that/ environment. In a gamma
> 1.0 scenario, that would correspond to a setting of about 0.45.
>
>
> - As Warp demonstrated not long ago, one main reason (besides trying to
> use gamma-pre-corrected colours without the "srgb" keyword) for the
> washed-out look in gamma 1.0 mode seems to be the "ambient" default:
> That setting, too, was quite certainly designed for a gamma of about
> 2.2, and in a gamma 1.0 scenario that would correspond to an ambient
> setting of 0.006 (though that number is difficult to nail down, as
> ambient is always added to colours, and adding colours without proper
> gamma handling greatly distorts them, particularly if their absolute
> value is rather small.)
>
>
> - Without proper gamma handling, there is stuff that you just simply
> /cannot/ get right simultaneously (as demontrated with these images); so
> you may need a /lot/ of tweaking to get /somewhat/ close to a realistic
> look, and you'll have to do this /over and over again/ for virtually
> each and every scene, as you'll need to fine-tune yor materials for the
> given lighting conditions and vice versa. On the other hand, with gamma
> 1.0 all it takes is some experience, and once you get your materials
> right you can re-use them quite easily in virtually every lighting
> condition. (Also, with proper gamma handling the number of knobs to
> tweak is smaller, since you never need to fiddle with any of those
> unrealistic hacks like brilliance, reflection exponent, or light source
> fade_power values other than 2.0.)
Interesting. Do the default values now reflect assumed gamma 1.0 then or do we
still have to tweak them for assumed gamma 1.0?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> clipka <ano### [at] anonymousorg> wrote:
>> Am 22.12.2016 um 05:08 schrieb Dave Blandston:
>>> clipka <ano### [at] anonymousorg> wrote:
>>>> The second image shows essentially the same scene with `assumed_gamma
>>>> 2.2`, with the diffuse settings (`diffuse` and `brilliance`) adjusted to
>>>> get exactly the same diffuse effect out of the different colour math.
>>>
>>> Please forgive my ignorance, but does that mean the default settings for diffuse
>>> and brilliance are meant to give the most visually appealing results with an
>>> assumed_gamma of 2.2?
>>
>> It is more complicated than that.
>>
>>> I never really gave assumed_gamma much thought. I just noticed that setting it
>>> to 1.0 produced a washed-out result so I picked 2.2 and never thought about it
>>> again.
>>
>> Here are a few facts:
>>
>> - The brilliance default of 1 fits /perfectly/ with `assumed_gamma 1.0`,
>> because the developers back then naively implemented a formula that was
>> designed for linear colours. The whole `brilliance` mechanism is an
>> awfully hackish thing, and it so happens that it can be used to achieve
>> the same proper look with other gamma settings (as far as diffuse goes),
>> so my guess is that it was introduced specifically for the purpose of
>> fixing the look of diffuse objects, in times when people probably didn't
>> even know what gamma handling was.
>>
>> - The diffuse default of 0.7 was presumably introduced in times when bad
>> gamma handling was the norm, and it can be assumed that it was set in
>> such a way as to get pleasing results in /that/ environment. In a gamma
>> 1.0 scenario, that would correspond to a setting of about 0.45.
>>
>>
>> - As Warp demonstrated not long ago, one main reason (besides trying to
>> use gamma-pre-corrected colours without the "srgb" keyword) for the
>> washed-out look in gamma 1.0 mode seems to be the "ambient" default:
>> That setting, too, was quite certainly designed for a gamma of about
>> 2.2, and in a gamma 1.0 scenario that would correspond to an ambient
>> setting of 0.006 (though that number is difficult to nail down, as
>> ambient is always added to colours, and adding colours without proper
>> gamma handling greatly distorts them, particularly if their absolute
>> value is rather small.)
>>
>>
>> - Without proper gamma handling, there is stuff that you just simply
>> /cannot/ get right simultaneously (as demontrated with these images); so
>> you may need a /lot/ of tweaking to get /somewhat/ close to a realistic
>> look, and you'll have to do this /over and over again/ for virtually
>> each and every scene, as you'll need to fine-tune yor materials for the
>> given lighting conditions and vice versa. On the other hand, with gamma
>> 1.0 all it takes is some experience, and once you get your materials
>> right you can re-use them quite easily in virtually every lighting
>> condition. (Also, with proper gamma handling the number of knobs to
>> tweak is smaller, since you never need to fiddle with any of those
>> unrealistic hacks like brilliance, reflection exponent, or light source
>> fade_power values other than 2.0.)
>
> Interesting. Do the default values now reflect assumed gamma 1.0 then or do we
> still have to tweak them for assumed gamma 1.0?
>
The diffuse should be OK, maybe reduce ambient. For the rest, it should
be correct.
something in that range, in the global_settings block.
It's relatively simple: assumed_gamma 1 = correct calculations and
minimal tweaking. assumed_gamma <> 1 = incorrect calculations and LOTS
of tweakings.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alain <kua### [at] videotronca> wrote:
> > clipka <ano### [at] anonymousorg> wrote:
> >> Am 22.12.2016 um 05:08 schrieb Dave Blandston:
> >>> clipka <ano### [at] anonymousorg> wrote:
--->8
> >> - The brilliance default of 1 fits /perfectly/ with `assumed_gamma 1.0`
---8<
> >> - The diffuse default of 0.7
--->8 I believe that should be 0.6 for default diffuse. And 0.7 is used as an
example in the docs.
--->8---8<---
> something in that range, in the global_settings block.
Less the "s", ambient_light.
I like finding mistakes. :)
Bob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 24.12.2016 um 00:02 schrieb Alain:
>> Interesting. Do the default values now reflect assumed gamma 1.0 then
>> or do we
>> still have to tweak them for assumed gamma 1.0?
As I said, the default for `brilliance` does (as does the default for
reflection `exponent`), while the default for `ambient` doesn't.
The default for `diffuse` is in the right ballpark.
> The diffuse should be OK, maybe reduce ambient. For the rest, it should
> be correct.
> something in that range, in the global_settings block.
There's a caveat to this: If you also use other ambient values in your
materials, that change would reduce higher values too much, and reduce
lower values too little.
So you might as well stick to the default of `ambient_light 1.0`, and
instead use:
default { finish { ambient 0.01 } }
which I think is the cleaner fix.
(Or use radiosity anyway ;))
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 24-12-2016 6:43, clipka wrote:
> (Or use radiosity anyway ;))
>
/That/ is what I was missing in the discussion above. Except for ambient
which is switched off with radiosity, any peculiarities to be noted?
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Am 24.12.2016 um 00:02 schrieb Alain:
>
> >> Interesting. Do the default values now reflect assumed gamma 1.0 then
> >> or do we
> >> still have to tweak them for assumed gamma 1.0?
>
> As I said, the default for `brilliance` does (as does the default for
> reflection `exponent`), while the default for `ambient` doesn't.
>
> The default for `diffuse` is in the right ballpark.
>
>
> > The diffuse should be OK, maybe reduce ambient. For the rest, it should
> > be correct.
> > something in that range, in the global_settings block.
>
> There's a caveat to this: If you also use other ambient values in your
> materials, that change would reduce higher values too much, and reduce
> lower values too little.
>
> So you might as well stick to the default of `ambient_light 1.0`, and
> instead use:
>
> default { finish { ambient 0.01 } }
>
> which I think is the cleaner fix.
>
> (Or use radiosity anyway ;))
Just glad you explained all this once again.
I am always going to be tempted to change the way it's supposed to be but that's
from force of habit, wanting to see how a render looks one way then another...
and another...
It's also a good thing to know what does best overall, in general, and go from
there only afterward. If I can relearn how to go about things maybe that's still
possible. :)
Bob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|