POV-Ray : Newsgroups : povray.binaries.images : I think warp is right ... 3.7 gamma : Re: I think warp is right ... 3.7 gamma Server Time
4 Nov 2024 14:58:49 EST (-0500)
  Re: I think warp is right ... 3.7 gamma  
From: Mike Raiford
Date: 2 Sep 2009 07:04:47
Message: <4a9e514f@news.povray.org>
scott wrote:

> Exactly.  POV assumes all input files and colour literals are in linear 
> colour space.  Images and colours that you see on your monitor (eg in 
> picture viewer, colour picker, or on the web) are not in linear colour 
> space, they have already been gamma corrected.  Unless you "undo" the 
> gamma correction before handing them to POV, your output file is going 
> to look very washed out as essentially they have been gamma corrected 
> twice.  This is very obvious if you pick colours in Windows and then try 
> to use them in POV, without undoing the gamma correction first they can 
> be very obviously wrong!

Isn't this counterintuitive? Heck, even Photoshop, which has a very 
sophisticated color correction system will give you the colors you 
expect. e.g. If I give a 50% gray on input, I get in the output a 50% gray.

>> Convert the texture file to PNG using IC for instance (to make sure it 
>> has a gAMA chunk, too), and you should be perfectly fine.
> 
> Or alternatively you can use a paint program to undo the gamma 
> correction and save as bmp or jpeg.  I think someone also posted some 
> SDL code here to do the conversion within POV.
> 

In fact a gamma of 0.46 works well to "uncorrect" the gamma setting in 
the image, but this does cause a loss of color fidelity in the 
highlights, because the highlight area is being stretched over a larger 
range of colors, this could potentially cause posterization and banding 
in gradients.


With the following scene, what would you expect the output color to be?

global_settings
{
     max_trace_level 20
}

camera
{
     location <0, 0.2, -5>
     look_at 0


}

box
{
   -1,1

   pigment { color rgb .5 } // intuitively: 50% gray!

   finish { ambient 1 }
}

Sampled with irfanview, the box samples as 186,186,186 (not 128,128,128 
gray as you would expect!)

If your monitor is calibrated to a 2.2 gamma, this will be too bright, 
My colorimiter doesn't allow me to select a gamma higher than 2.4. With 
the monitor calibrated to the same gamma as a Macintosh it is way to 
bright. There is no calibration where the colors will look right.


Post a reply to this message


Attachments:
Download 'gamma.png' (2 KB) Download 'gamma_ps.png' (4 KB)

Preview of image 'gamma.png'
gamma.png

Preview of image 'gamma_ps.png'
gamma_ps.png


 

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