POV-Ray : Newsgroups : povray.beta-test : Struggling with gamma... Server Time
4 Jul 2024 13:14:13 EDT (-0400)
  Struggling with gamma... (Message 31 to 33 of 33)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: clipka
Subject: Re: Struggling with gamma...
Date: 29 Jun 2010 07:23:34
Message: <4c29d7b6$1@news.povray.org>
Am 29.06.2010 11:44, schrieb Gyscos:
> But then, in theory, this gamma value just affects the transition, it shouldn't
> change the final image (except for this precision improvements), right ?
> So whatever File_Gamma I set, the correctly decoded image should have pretty
> much the same brightness ?

Yes - at least for PNG files: Provided you use a file viewer that does 
its homework properly, PNG files created by POV-Ray 3.7 look (almost) 
identical regardless of how you set File_Gamma.

For the other files like JPEG or BMP it's not that easy because the file 
viewer doesn't know the encoding gamma used (that information is not in 
the file header), and will have to resort to wild guessing. Typically, 
it will expect a value of around 1/2.2, corresponding to File_Gamma=2.2, 
so any significantly different value will make the file viewer display 
the image differently.


As a general rule, you should keep File_Gamma set to 2.2 (the default), 
because that's what most file viewers will expect for JPEG, BPM and the 
like - and it doesn't hurt for PNG either, giving a very efficient encoding.


Post a reply to this message

From: Gyscos
Subject: Re: Struggling with gamma...
Date: 30 Jun 2010 16:45:01
Message: <web.4c2bac7b65b49d46e3006550@news.povray.org>
One last question : if I got it right, v3.6 used a wrong lighting algorithm,
that happened to work as if it didn't pre-encore with gamma, and 3.7 corrected
that.

But how could I, in v3.6, get the 'correct' results that I get from 3.7 ? Could
gamma be of any help there ?


Post a reply to this message

From: clipka
Subject: Re: Struggling with gamma...
Date: 1 Jul 2010 05:44:24
Message: <4c2c6378$1@news.povray.org>
Am 30.06.2010 22:43, schrieb Gyscos:
> One last question : if I got it right, v3.6 used a wrong lighting algorithm,
> that happened to work as if it didn't pre-encore with gamma, and 3.7 corrected
> that.
>
> But how could I, in v3.6, get the 'correct' results that I get from 3.7 ? Could
> gamma be of any help there ?

All that I said about POV-Ray 3.6 applies to scenes without any 
"assumed_gamma" statement, or with "assumed_gamma 2.2".

When specifying "assumed_gamma 1.0" in POV-Ray 3.6, you'll get proper 
color math just as in POV-Ray 3.7 - for most things that is: Input image 
files aren't handled properly by POV-Ray 3.6 no matter what (except for 
PNG if I'm not mistaken), and I'm not sure right now whether PNG file 
output might be bogus. Other file formats output - e.g. JPEG or BMP - is 
right, provided that Display_Gamma is set to something sensible 
(typically 2.2).

POV-Ray 3.6 also doesn't have the "gamma" keyword for colors (neither 
does beta 37a, but the upcoming beta 38 will; should be released any 
moment now).

I'm also not sure whether POV-Ray 3.6 does a proper job with 
anti-aliasing. I think it does it wrong regarding gamma.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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