POV-Ray : Newsgroups : povray.newusers : Gamma Settings Server Time
1 Nov 2024 00:23:50 EDT (-0400)
  Gamma Settings (Message 1 to 10 of 22)  
Goto Latest 10 Messages Next 10 Messages >>>
From: JamesB7271
Subject: Gamma Settings
Date: 29 Feb 2012 22:15:00
Message: <web.4f4ee94b37a403b5345179960@news.povray.org>
Hello,

I am new to POV-Ray and have just upgraded from POV-Ray 6 to POV-Ray 7. I notice
now that all my renders seem too bright. As an extreme example: if I render a
simple sphere over a flat plane in a scene that has no light sources, I can
clearly see both the sphere and the plane (although somewhat dimmed). With
version 6 I believe a scene with no light sources would render completely black,
which I think is correct for a scene with no lights. <-(is this a correct
assumption?)

I read that there were some changes made to Gamma settings in version 7? How do
I get it back to normal?

Thanks!
-James


Post a reply to this message

From: JamesB7271
Subject: Re: Gamma Settings
Date: 29 Feb 2012 22:25:00
Message: <web.4f4eeb30e3adea41345179960@news.povray.org>
Sorry, I meant version 3.6 to 3.7


"JamesB7271" <nomail@nomail> wrote:
> Hello,
>
> I am new to POV-Ray and have just upgraded from POV-Ray 6 to POV-Ray 7. I notice
> now that all my renders seem too bright. As an extreme example: if I render a
> simple sphere over a flat plane in a scene that has no light sources, I can
> clearly see both the sphere and the plane (although somewhat dimmed). With
> version 6 I believe a scene with no light sources would render completely black,
> which I think is correct for a scene with no lights. <-(is this a correct
> assumption?)
>
> I read that there were some changes made to Gamma settings in version 7? How do
> I get it back to normal?
>
> Thanks!
> -James


Post a reply to this message

From: Warp
Subject: Re: Gamma Settings
Date: 1 Mar 2012 01:20:39
Message: <4f4f1537@news.povray.org>
JamesB7271 <nomail@nomail> wrote:
> With
> version 6 I believe a scene with no light sources would render completely black,
> which I think is correct for a scene with no lights. <-(is this a correct
> assumption?)

  No, because the default ambient term of lighting is not zero. (If you set
it to zero then it would be so.)

> I read that there were some changes made to Gamma settings in version 7? How do
> I get it back to normal?

  Are you explicitly specifying "#version 3.7"? Because that turns on the
new gamma correction scheme, but you should also get a warning that you
should also explicitly specify an "assumed_gamma" in your global settings.

  If you don't explicitly specify "#version 3.7" then the old gamma scheme
is assumed by default.

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: Gamma Settings
Date: 1 Mar 2012 10:56:24
Message: <4f4f9c28@news.povray.org>
Am 01.03.2012 04:13, schrieb JamesB7271:
> Hello,
>
> I am new to POV-Ray and have just upgraded from POV-Ray 6 to POV-Ray 7. I notice
> now that all my renders seem too bright. As an extreme example: if I render a
> simple sphere over a flat plane in a scene that has no light sources, I can
> clearly see both the sphere and the plane (although somewhat dimmed). With
> version 6 I believe a scene with no light sources would render completely black,
> which I think is correct for a scene with no lights.<-(is this a correct
> assumption?)
>
> I read that there were some changes made to Gamma settings in version 7? How do
> I get it back to normal?

(Just for the records: I tend to become somewhat itchy when people refer 
to the 3.6 or even 3.5 gamma handling as "normal", because it isn't - 
it's obsolete, with POV-Ray 3.7's default gamma handling being far 
superior.)

There are multiple ways of achieving what you're asking for, the 
simplest being to tell POV-Ray that your scene was designed for POV-Ray 
3.6; just insert the following line at the beginning of your scene file:

     #version 3.6;

POV-Ray 3.7 will then (among other things) automatically switch to a 
gamma handling mode that is backward compatible with POV-Ray 3.6 (with 
minor exceptions relating to PNG input images).

In addition, if you explicitly specify "Display_Gamma" somwehere in your 
.ini files, you also need to set "File_Gamma" to the same value (unless 
you're using PNG, OpenEXR or Radiance HDR as output format).

If you do not specify "Display_Gamma", you may still see slight 
differences in dark image regions; if you consider that a problem, 
explicitly specify "Display_Gamma=2.2" and "File_Gamma=2.2" to iron 
those out.


Alternatively, specifying "assumed_gamma srgb" will give you essentially 
the same gamma-related behaviour as POV-Ray 3.5 (or POV-Ray 3.6 without 
any "assumed_gamma" statement), except for gamma handling of any input 
images.

If your scenes already contain an "assumed_gamma" statement, gamma 
handling in 3.7 /should/ automatically be essentially the same (again 
except for input images), and your observed changes should be a no-issue.

In both cases, the aforementioned advice for "Display_Gamma" and 
"File_Gamma" also applies.


I hope this helps. For future scenes, if realism is of any concern to 
you I strongly recommend using "#version 3.7" and "assumed_gamma 1.0", 
leaving "File_Gamma" at its default, and using the new "srgb" family of 
color keywords instead of "rgb" to specify colors taken from external 
applications.


Post a reply to this message

From: JamesB7271
Subject: Re: Gamma Settings
Date: 4 Mar 2012 18:30:01
Message: <web.4f53fa01e3adea41345179960@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 01.03.2012 04:13, schrieb JamesB7271:
> > Hello,
> >
> > I am new to POV-Ray and have just upgraded from POV-Ray 6 to POV-Ray 7. I notice
> > now that all my renders seem too bright. As an extreme example: if I render a
> > simple sphere over a flat plane in a scene that has no light sources, I can
> > clearly see both the sphere and the plane (although somewhat dimmed). With
> > version 6 I believe a scene with no light sources would render completely black,
> > which I think is correct for a scene with no lights.<-(is this a correct
> > assumption?)
> >
> > I read that there were some changes made to Gamma settings in version 7? How do
> > I get it back to normal?
>
> (Just for the records: I tend to become somewhat itchy when people refer
> to the 3.6 or even 3.5 gamma handling as "normal", because it isn't -
> it's obsolete, with POV-Ray 3.7's default gamma handling being far
> superior.)
>
> There are multiple ways of achieving what you're asking for, the
> simplest being to tell POV-Ray that your scene was designed for POV-Ray
> 3.6; just insert the following line at the beginning of your scene file:
>
>      #version 3.6;
>
> POV-Ray 3.7 will then (among other things) automatically switch to a
> gamma handling mode that is backward compatible with POV-Ray 3.6 (with
> minor exceptions relating to PNG input images).
>
> In addition, if you explicitly specify "Display_Gamma" somwehere in your
> .ini files, you also need to set "File_Gamma" to the same value (unless
> you're using PNG, OpenEXR or Radiance HDR as output format).
>
> If you do not specify "Display_Gamma", you may still see slight
> differences in dark image regions; if you consider that a problem,
> explicitly specify "Display_Gamma=2.2" and "File_Gamma=2.2" to iron
> those out.
>
>
> Alternatively, specifying "assumed_gamma srgb" will give you essentially
> the same gamma-related behaviour as POV-Ray 3.5 (or POV-Ray 3.6 without
> any "assumed_gamma" statement), except for gamma handling of any input
> images.
>
> If your scenes already contain an "assumed_gamma" statement, gamma
> handling in 3.7 /should/ automatically be essentially the same (again
> except for input images), and your observed changes should be a no-issue.
>
> In both cases, the aforementioned advice for "Display_Gamma" and
> "File_Gamma" also applies.
>
>
> I hope this helps. For future scenes, if realism is of any concern to
> you I strongly recommend using "#version 3.7" and "assumed_gamma 1.0",
> leaving "File_Gamma" at its default, and using the new "srgb" family of
> color keywords instead of "rgb" to specify colors taken from external
> applications.

Thank you so much for the detailed response. I of course want the most realism,
so I do want to make sure I'm getting started right.
Below is a simple sample scene (partly from the tutorials). If I render it as
shown below, it looks too bright and washed out to me. However, if I change the
"#version" statement to 3.6, or change the "assumed_gamma" statement from 1.0 to
srgb, the scene seems to look more realistic. Can you try it and give me your
opinion? If the new 3.7 gamma handling is the correct and more accurate method,
then I think I may be doing something else wrong?

---------------------------------------------
#version 3.7

global_settings {
 assumed_gamma 1.0
}

#include "colors.inc"
#include "stones.inc"

camera {
  location <0, 3, -4>
  look_at <0, 1, 2>
}

sphere {
  <0, 1, 2>, 2
  texture {
    pigment {color Yellow}
  }
}

plane { <0, 1, 0>, -1
  texture {T_Stone25
  }
}

light_source {
 <2, 10, -3>
 color White
 area_light <5, 0, 0>, <0, 0, 5>, 5, 5
   adaptive 1
   jitter
}
---------------------------------------------


Post a reply to this message

From: clipka
Subject: Re: Gamma Settings
Date: 4 Mar 2012 20:41:25
Message: <4f5419c5@news.povray.org>
Am 05.03.2012 00:25, schrieb JamesB7271:

> Thank you so much for the detailed response. I of course want the most realism,
> so I do want to make sure I'm getting started right.

In that case, assumed_gamma 1.0 is /definitely/ the thing you want.

> Below is a simple sample scene (partly from the tutorials). If I render it as
> shown below, it looks too bright and washed out to me. However, if I change the
> "#version" statement to 3.6, or change the "assumed_gamma" statement from 1.0 to
> srgb, the scene seems to look more realistic. Can you try it and give me your
> opinion? If the new 3.7 gamma handling is the correct and more accurate method,
> then I think I may be doing something else wrong?


I personally find nothing wrong with the scene you provided, when 
rendered with POV-Ray 3.7 and "assumed_gamma 1.0"; to the contrary, I 
find the result of "assumed_gamma srgb" unrealistically (and 
undesirably) dark.

Essentially, there are three possible reasons why you might think the 
image is too bright:


(1) The image as computed by POV-Ray might be fine, but what you see is 
not what POV-Ray computed, because your system's display pipeline (i.e. 
Windows color management settings, graphics driver settings, graphics 
card and display hardware properties) and/or the image viewing software 
might introduce some "color distortions" that POV-Ray isn't aware of.

POV-Ray 3.7 comes with a sample scene named 
"scenes/gamma/gamma_showcase.pov" which is specially tailored for 
identifying this type of problem.

Make sure your Windows screen settings are configured to use your 
display's native resolution. Render the scene at 640x480 resolution and 
display it at 1:1 zoom; from a distance, the left and right hemispheres 
of each sphere in the image should look uniform in color, saturation and 
brightness. (Close inspection of the image however will reveal that most 
of them are not: The right hemispheres are actually striped 
horizontally; that's perfectly intentional.)

If on your system the left hemisphere of each sphere appears 
significantly brighter and/or more washed-out, fixing your display 
settings (black-/whitepoint and gamma) might solve your problems; you 
can find plenty of sites on the Interwebs to help you with this.


(2) The colors in the scene might simply /be/ brighter and more washed 
out than you'd like them to be. In that case, try...

... choosing more saturated colors (might be difficult for the yellow 
ball, but you can probably do something about the marble floor; a good 
bet might be using "srgb" wherever the material currently uses "rgb"; 
you might need to copy the materials from the default .ini files for this);

... reducing the global_settings { ambient_light ... } parameter 
(default is 1.0) and/or your materials' finish { ambient ... } setting; 
especially the latter is typically quite high in old materials, as they 
were designed to look good with the de-facto too dark image results as 
computed by POV-Ray 3.5 (or 3.6 with default settings); better yet, use 
radiosity (with 3.7, this will automatically turn off the ambient 
mechanism);

... using fade_distance and fade_power for a realistic distance-based 
fading of the light. (Rule of thumb: Set fade_power to 2, set 
fade_distance to the size of your area light, and increase (or in rare 
cases decrease) light intensity to achieve the desired overall 
brightness level. (Don't be surprised if you need to set the nominal 
brightness of the light source to some pretty high value.)


(3) You might have become so accustomed to 3.5's rather dark results 
with deep shadows that the old look feels more realistic to you than it 
actually is. In that case you'll need to either get used to realistic 
renders again, or abandon realism and go for artistic freedom instead.


 From a distance I can't tell which of the three is the case (and I 
wouldn't be surprised if it's actually a combination of all three of 
them), so - as I already mentioned - you should first check your display 
settings.


Post a reply to this message

From: Warp
Subject: Re: Gamma Settings
Date: 5 Mar 2012 12:44:45
Message: <4f54fb8d@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> ... choosing more saturated colors (might be difficult for the yellow 
> ball, but you can probably do something about the marble floor; a good 
> bet might be using "srgb" wherever the material currently uses "rgb"; 
> you might need to copy the materials from the default .ini files for this);

  The thing about assumed_gamma 1.0 is that while it may produce more
physically correct results in terms of lighting calculations, it's
unintuitive with respect to defining colors. For instance, with that
assumed_gamma something like "color 0.5" will *not* be 50% gray (instead
being something like 73% gray IIRC). The reasons for this are complicated.
(Basically, it's the difference between radiant energy and the brightness
perceived by the human eye.)

  If you want to, for example, specify 50% gray, you have to indeed use
the 'srgb' keyword (in other words, define your color as "srgb 0.5").

  It becomes a bit more problematic when you are not defining the colors
yourself, but are using a pre-defined texture (eg. from an include file).
Now, I don't remember if something was added to POV-Ray 3.7 to "convert"
such a pre-defined texture into 'srgb' on the fly.

  Another problem is that currently there's no way to define linear
gradients that would remain linear regardless of assumed_gamma (in other
words, if you define assumed_gamma 1.0, your gradients will not look
linear). Some work will be done in the future to remedy these shortcomings.

-- 
                                                          - Warp


Post a reply to this message

From: clipka
Subject: Re: Gamma Settings
Date: 5 Mar 2012 14:32:28
Message: <4f5514cc$1@news.povray.org>
Am 05.03.2012 18:44, schrieb Warp:
> clipka<ano### [at] anonymousorg>  wrote:
>> ... choosing more saturated colors (might be difficult for the yellow
>> ball, but you can probably do something about the marble floor; a good
>> bet might be using "srgb" wherever the material currently uses "rgb";
>> you might need to copy the materials from the default .ini files for this);
>
>    The thing about assumed_gamma 1.0 is that while it may produce more
> physically correct results in terms of lighting calculations, it's
> unintuitive with respect to defining colors.

That's only true if you define colors the old way, using "rgb" rather 
than the new "srgb". With POV-Ray 3.7, it's not a matter of which 
assumed_gamma setting gives you a more intuitive way to specify colors, 
but a matter of choosing between intuitive ("srgb") and physical ("rgb") 
colors.

Fun fact: "srgb" does take into account what assumed_gamma you choose, 
so e.g. "srgb <0.1,0.5,1.0>" gives the same hue regardless of that setting.

> For instance, with that
> assumed_gamma something like "color 0.5" will *not* be 50% gray (instead
> being something like 73% gray IIRC). The reasons for this are complicated.
> (Basically, it's the difference between radiant energy and the brightness
> perceived by the human eye.)

You remember correctly. Though I'd phrase it differently: What is 
/perceived/ as (and frequently labelled) "73% gray" actually corresponds 
to a physical brightness of 50% (=0.5).

>    If you want to, for example, specify 50% gray, you have to indeed use
> the 'srgb' keyword (in other words, define your color as "srgb 0.5").

Which is exactly the reason why the "srgb" keyword was introduced.

>    It becomes a bit more problematic when you are not defining the colors
> yourself, but are using a pre-defined texture (eg. from an include file).
> Now, I don't remember if something was added to POV-Ray 3.7 to "convert"
> such a pre-defined texture into 'srgb' on the fly.

No, indeed not. I guess the proper solution there is to overhaul the 
standard include files to use "srgb" throughout.

>    Another problem is that currently there's no way to define linear
> gradients that would remain linear regardless of assumed_gamma (in other
> words, if you define assumed_gamma 1.0, your gradients will not look
> linear). Some work will be done in the future to remedy these shortcomings.

I strongly disagree with you about the use of the term "linear gradient" 
here. "linear-/looking/" would be a better choice of words, as from a 
/physical/ perspective it's the "assumed_gamma 1.0" gradient that is linear.

It should also be noted that while "assumed_gamma 2.2" does give 
superior-looking /brightness/ gradients, it gives poor results for 
/color/ gradients ("assumed_gamma 1.0" gives very good results there), 
so the issue of gradients does /not/ generally speak in favor of any 
particular "assumed_gamma" setting. Instead, the results simply indicate 
that what we really need is a much smarter handling of gradients.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Gamma Settings
Date: 5 Mar 2012 17:44:17
Message: <4f5541c1@news.povray.org>
clipka wrote:

> That's only true if you define colors the old way, using "rgb" rather
> than the new "srgb". With POV-Ray 3.7, it's not a matter of which 
> assumed_gamma setting gives you a more intuitive way to specify
> colors, but a matter of choosing between intuitive ("srgb") and
> physical ("rgb") colors.

Actually this now made me wonder if 3.7 should redefine the rgb
keyword to mean "intuitive colors" (srgb) and introduce a new keyword
for "physical colors" (prgb).

Color arithmetic could still be done in linear prgb space (unless the
user actually used vector arithmetic before converting to color).

The change in gamma handling would then come simultaneously with
a change in rgb interpretation that mostly cancels out for existing
scenes that already used assumed_gamma 1.0, reducing all the whining
about "my image is too washed out", and the new gamma handling could
be used without having to adapt all existing textures at once.

Or else (quite possibly) I completely misunderstood everything ;)


Post a reply to this message

From: clipka
Subject: Re: Gamma Settings
Date: 5 Mar 2012 18:11:17
Message: <4f554815$1@news.povray.org>
Am 05.03.2012 23:43, schrieb Christian Froeschlin:
> clipka wrote:
>
>> That's only true if you define colors the old way, using "rgb" rather
>> than the new "srgb". With POV-Ray 3.7, it's not a matter of which
>> assumed_gamma setting gives you a more intuitive way to specify
>> colors, but a matter of choosing between intuitive ("srgb") and
>> physical ("rgb") colors.
>
> Actually this now made me wonder if 3.7 should redefine the rgb
> keyword to mean "intuitive colors" (srgb) and introduce a new keyword
> for "physical colors" (prgb).

It might make /some/ sense to add a kind of "prgb" keyword; the rgb 
keyword actually means "physical colors" /only/ if assumed_gamma is set 
to 1.0. This interpretation of "rgb" is backward compatible with 3.6.

> The change in gamma handling would then come simultaneously with
> a change in rgb interpretation that mostly cancels out for existing
> scenes that already used assumed_gamma 1.0, reducing all the whining
> about "my image is too washed out", and the new gamma handling could
> be used without having to adapt all existing textures at once.

Strictly speaking, POV-Ray 3.7 doesn't introduce a fully new gamma 
handling concept at all; it just (1) obsoletes the 3.6 default of not 
performing any gamma handling at all (in favor of "assumed_gamma 1.0" 
mode; you can still get the 3.5 handling by specifying "assumed_gamma 
srgb"), and (2) complements the 3.6 assumed_gamma-based handling with 
some tools that were lacking in 3.6, especially to work with colors from 
external sources - whether they are images (except for PNG, 3.6 provided 
no way of gamma-adjusting input images that didn't happen to match the 
assumed_gamma) or explicit color values.

Also note that if you don't explicitly specify a "#version" statement, 
POV-Ray 3.7 /does/ warn you, so it's not like POV-Ray isn't giving 
people any hints at all. (And with "#version 3.6" you do get the old 
behaviour.)


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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