POV-Ray : Newsgroups : povray.pov4.discussion.general : Gamma correction of input colours/image files : Re: Gamma correction of input colours/image files Server Time
17 May 2024 19:46:55 EDT (-0400)
  Re: Gamma correction of input colours/image files  
From: scott
Date: 17 Nov 2008 04:48:12
Message: <49213ddc$1@news.povray.org>
>> if the input was taken as a gamma
>> corrected value I may have to do something like color rgb 0.53 to get the 
>> same
>> result on one monitor (gamma 2.2) and 0.56 for a different monitor (gamma
>> 0.56).

That's why I suggest we have two options for entering colours/images in the 
SDL, one will apply inverse of whatever your gamma setting is, the other 
will just use it linearly.

Your suggestion might be better ie:
color rgb 0.25  // this is 25% the brightness of rgb 1.0 inside the engine, 
ie 25% the photons, 25% the power, whatever. if you are using gamma 
correction, the output pixel value will not be 64,64,64

display_color rgb 0.25 // this is what rgb 64,64,64 would look like on your 
monitor, will come out as rgb 64,64,64 no matter what gamma setting you 
have.  use this if you have chosen a colour from html, some image editor etc 
and you want the output gamma corrected colour to be the same.

>  Well, the whole idea with gamma correction is that it's enough for you
> to specify just the value "rgb 0.25" and then with gamma correction make
> it look exactly 1/4 of the maximum brightness in your display.

Yes, that's true if you know what 25% brightness is, which POV does when it 
works out light/shadow calculations, it says "i want this pixel to be 25% 
brightness" and then the gamma correction fixes it so it looks realistic on 
your monitor.  But sometimes you know what you want the output colour to 
look like, eg RGB 255,128,64, currently there is no way to tell POV to use 
that colour without doing some complex inverse gamma calculation by hand.

>  OTOH IMO gamma correction should not be force-fed, and it should be
> possible to turn it completely off.

You should be able to set display_gamma as 1.0 in an ini file and it should 
actually do that.

> Sometimes you *want* "rgb 0.25" to
> mean exactly the pixel value (64, 64, 64) and nothing else, regardless
> of how it may *look* on the screen.

Agreed, which is why I suggest having two methods for entering 
colours/images.  Note that for colours it is more important than greys, 
because gamma correction actually changes the colour hue, not just the 
brightness.


Post a reply to this message

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