POV-Ray : Newsgroups : povray.beta-test : Struggling with gamma... Server Time
30 Jun 2024 13:35:56 EDT (-0400)
  Struggling with gamma... (Message 11 to 20 of 33)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Gyscos
Subject: Re: Struggling with gamma...
Date: 26 Jun 2010 11:35:01
Message: <web.4c261d0665b49d46e3006550@news.povray.org>
When I don't specify any gamma settings, I get a bright image. POV-Ray preview
window shows it bright, window explorer show it bright, gimp and firefox too. So
I guess the file is easy to read and everyone get it right.

Now, I put the two gamma options I said earlier : File_Gamma=1 and
Display_Gamma=1.
POV-Ray preview show a darker image, like one I would get with #version 3.6;
Windows explorer and the Gimp also show the darker image.
Firefox shows a bright image.

This makes think firefox is the one to do it the wrong way... Am I wrong ?

Also, I still don't understand when and why identical values to File_Gamma and
Display_Gamma could lead to differences between the POV-Ray preview and the
resulting file...


Post a reply to this message

From: Alain
Subject: Re: Struggling with gamma...
Date: 26 Jun 2010 13:05:04
Message: <4c263340$1@news.povray.org>

> On 26/06/2010 10:59 AM, Gyscos wrote:
>> If I understood correctly, the 'over-bright impression' is actually
>> the correct
>> way images should be, right ?
>>
>> But then, the default ambient light is waaaay to high, isn't it ?
>>
>>

> high. That means the box does not need a light source to be fully
> illuminated. If you are using radiosity set the ambient to zero. If not
> try an ambient between 0.1 and 0.2.
>
> There have been a few discussions on this newsgroup about the changes in
> the way Pov 3.7 beta handles gamma so you could search here. Also the
> Wiki has a topic.
>
http://wiki.povray.org/content/HowTo:Fix_old_scenes_to_work_with_the_new_gamma_system
>
>
>

ambient 1 is to high ONLY IF you also have a light source and some 
diffuse value larger than 1


Alain


Post a reply to this message

From: clipka
Subject: Re: Struggling with gamma...
Date: 26 Jun 2010 15:56:36
Message: <4c265b74$1@news.povray.org>
Am 26.06.2010 17:30, schrieb Gyscos:
> When I don't specify any gamma settings, I get a bright image. POV-Ray preview
> window shows it bright, window explorer show it bright, gimp and firefox too. So
> I guess the file is easy to read and everyone get it right.

Yup. That's how it should be. If you leave it at that, you should 
normally be happy - as soon as you get used to the fact that 50% linear 
brightness isn't percieved by the human eye as medium grey.

> Now, I put the two gamma options I said earlier : File_Gamma=1 and
> Display_Gamma=1.
> POV-Ray preview show a darker image, like one I would get with #version 3.6;
> Windows explorer and the Gimp also show the darker image.
> Firefox shows a bright image.
>
> This makes think firefox is the one to do it the wrong way... Am I wrong ?

Yes, you are:

- Display_Gamma=1 causes the preview window to lie to you about what 
POV-Ray computes.

- PNG file output /always/ gives you a PNG file containing exactly what 
POV-Ray computes, regardless of File_Gamma, because although the 
parameter affects how the binary values in the file are to be 
interpreted in terms of physical light intensities, the file header 
stores this information in an unambiguous manner.

- Any viewer displaying the PNG file properly must therefore display it 
differently than the lie you see in the preview window.


> Also, I still don't understand when and why identical values to File_Gamma and
> Display_Gamma could lead to differences between the POV-Ray preview and the
> resulting file...

This happens with each and every file format that has clearly defined 
rules how the stored binary values relate to physical light intensities: 
HDR, OpenEXR (both of which always store straightforward linear light 
intensities) and PNG (which stores exact information about how the 
linear light intensities were mapped to binary values, and therefore how 
to reconstruct the linear light intensities from the binary values).


Post a reply to this message

From: Gyscos
Subject: Re: Struggling with gamma...
Date: 26 Jun 2010 16:10:00
Message: <web.4c265ddd65b49d46e3006550@news.povray.org>
Okay, I wasn't clear enough : when I meant the preview and the file being
identical, I meant the preview and how the file was supposed to be displayed...
Then, they should be identical, right ?...

I'm trying to use the no-parameters-yet-still-pretty-bright-for-me way, but...
Daah, it really does look bright (transitions from light to dark are much much
more violent)... :-/


Post a reply to this message

From: Gyscos
Subject: Re: Struggling with gamma...
Date: 26 Jun 2010 16:10:01
Message: <web.4c265e9165b49d46e3006550@news.povray.org>
And, in the previous post, I was also only talking about PNG file ; I understand
the deal with the others.


Post a reply to this message

From: clipka
Subject: Re: Struggling with gamma...
Date: 26 Jun 2010 16:33:58
Message: <4c266436$1@news.povray.org>
Am 26.06.2010 22:06, schrieb Gyscos:
> Okay, I wasn't clear enough : when I meant the preview and the file being
> identical, I meant the preview and how the file was supposed to be displayed...
> Then, they should be identical, right ?...

How /is/ the file supposed to be displayed?

I think there can be no doubt that, technically speaking, it is supposed 
to be displayed the way POV-Ray computed it.

But if the /preview/ doesn't display the image the way POV-Ray computed 
it, how can the preview look identical to a file that does?

And PNG files always do look the way they were computed, provided you're 
using a gamma-aware viewer (like, say, Firefox).


> I'm trying to use the no-parameters-yet-still-pretty-bright-for-me way, but...
> Daah, it really does look bright (transitions from light to dark are much much
> more violent)... :-/

You care to show an example? Maybe we can help you out with ideas how to 
fix what's bugging you.


Post a reply to this message

From: Gyscos
Subject: Re: Struggling with gamma...
Date: 27 Jun 2010 03:00:00
Message: <web.4c26f6bb65b49d46e3006550@news.povray.org>
Sure !

Here is a simple scene I use to test some scattering :


// ----------------------------------------

camera {
    location  <1.4, 0.5, -4.8>
    look_at   <-0.1, -1,  0.0>
}


light_source {
  <0, 0, 0>
  rgb 1
  translate 10*z
}

// ----------------------------------------

// The Wall
difference {
  box {
    <-5, -0.5, -0.2>,
    < 5,  0.5,  0.2>
  }
  #declare i = 0;
  #while (i < 9)
    cylinder {
      <0, 0, -1>
      <0, 0,  1>
      0.3
      translate (-4 + i) * x
    }
    #declare i = i + 1;
  #end
  pigment { rgb 1 }
  finish { ambient 0 }
}

// Dust
box {
  <-4.999, -0.499, -4.999>,
  < 4.999,  0.499,  0.499>
  pigment { rgbt 1 }
  hollow
  interior {
    media {
      intervals 20
      scattering {
        2, rgb 0.1
      }
    }
  }
}

On 3.6, I would get the result I was looking for. In 3.7, with the now-real
gamma computation, the light rays are too bright. So I tried to set a lower
color for the media (0.01 instead of 0.1), but I can't get as much contrast as I
did in 3.6...
The workaround I use is to use type 3 instead of type 2, wich is more directive,
and then gives more contrast...

----

When're you're talking about the computed file, is it the colors of the pixels
stored ? Or after the gamma correction ?
Cause if the gamma correction is set to linear, then a linear preview in POV-Ray
wouldn't be wrong, would it ?...


Post a reply to this message

From: Alain
Subject: Re: Struggling with gamma...
Date: 27 Jun 2010 13:09:45
Message: <4c2785d9$1@news.povray.org>

> Sure !
>
> Here is a simple scene I use to test some scattering :
>
>
> // ----------------------------------------
>
> camera {
>      location<1.4, 0.5, -4.8>
>      look_at<-0.1, -1,  0.0>
> }
>
>
> light_source {
>    <0, 0, 0>
>    rgb 1
>    translate 10*z
> }
>
> // ----------------------------------------
>
> // The Wall
> difference {
>    box {
>      <-5, -0.5, -0.2>,
>      <  5,  0.5,  0.2>
>    }
>    #declare i = 0;
>    #while (i<  9)
>      cylinder {
>        <0, 0, -1>
>        <0, 0,  1>
>        0.3
>        translate (-4 + i) * x
>      }
>      #declare i = i + 1;
>    #end
>    pigment { rgb 1 }
>    finish { ambient 0 }
> }
>
> // Dust
> box {
>    <-4.999, -0.499, -4.999>,
>    <  4.999,  0.499,  0.499>
>    pigment { rgbt 1 }
>    hollow
>    interior {
>      media {
>        intervals 20
>        scattering {
>          2, rgb 0.1
>        }
>      }
>    }
> }
>
> On 3.6, I would get the result I was looking for. In 3.7, with the now-real
> gamma computation, the light rays are too bright. So I tried to set a lower
> color for the media (0.01 instead of 0.1), but I can't get as much contrast as I
> did in 3.6...
> The workaround I use is to use type 3 instead of type 2, wich is more directive,
> and then gives more contrast...
>
> ----
>
> When're you're talking about the computed file, is it the colors of the pixels
> stored ? Or after the gamma correction ?
> Cause if the gamma correction is set to linear, then a linear preview in POV-Ray
> wouldn't be wrong, would it ?...
>
>

Normaly, you should set display_gamma to the actual gamma value of your 
display. On most Windows systems, it should be around 2.2, and I think 
that it's the value that is assumed it you don't explicitely set it.
This tells POV-Ray to correct the display correctly, but don't affect 
the actual output.



Alain


Post a reply to this message

From: Alain
Subject: Re: Struggling with gamma...
Date: 27 Jun 2010 13:17:03
Message: <4c27878f@news.povray.org>


> // Dust
> box {
>    <-4.999, -0.499, -4.999>,
>    <  4.999,  0.499,  0.499>
>    pigment { rgbt 1 }
>    hollow
>    interior {
>      media {
>        intervals 20
>        scattering {
>          2, rgb 0.1
>        }
>      }
>    }
> }
>

Unrelated to your problem, but you should NOT use intervals 20.
Much, much beter to leave it to it's default value of 1 and set samples 
instead.
You'll see that for the same final number of samples, the rendering 
speed get much beter.


Alain


Post a reply to this message

From: Gyscos
Subject: Re: Struggling with gamma...
Date: 27 Jun 2010 17:10:00
Message: <web.4c27be2665b49d46e3006550@news.povray.org>
Yeah, I just noticed that too...
The thing is, I saw in the doc that default value for interval was 10 :
http://www.povray.org/documentation/view/3.6.1/421/
So when I first saw the results weren't good, I changed it to 20. But now if I
set it to 10, it works fine too, so I doubt the default value really is 10...
Maybe 1 indeed.

Also, still unrelated, but when I use method 3 with a very low variance
(0.000000001), a very high confidence (0.99999999), and "samples 10, 100",
shouldn't it use more than 10 if the result isn't perfect ? I don't see why
"samples 30, 100" works better there...


Post a reply to this message

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

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