POV-Ray : Newsgroups : povray.pov4.discussion.general : Gamma correction of input colours/image files : Re: Gamma correction of input colours/image files Server Time
18 Jun 2024 10:02:46 EDT (-0400)
  Re: Gamma correction of input colours/image files  
From: Allen
Date: 19 Nov 2008 12:00:00
Message: <web.4924451180bfb2618f162dfb0@news.povray.org>
> Why not? If you've set display_gamma to 1.0 then both color 0.5 and
> display_color 0.5 will give 50% brightness.

If display_gamma is 1.0, then no output gamma correction would occur and it
would give an output pixel of 128,128,128, which is for 2.2 gamma only about
~21% brightness.  If display_gamma is 2.2, then it would give an output of
186,186,186 for 'color' and still about 128,128,128 for display_color

> > Images as images/textures:
> > 2. I want 128 input to represent 128 output
> >
> > When loading the image, do not do any gamma correction based on file gamma
> > so
> > 128 loads internally as 0.5.  Then with the 0.5 do a correction like with
> > display_color, so that 0.5 becomes corrected to 0.217 if display_gamma is
> > 2.2
>
> I think this would be the most used situation, if someone uses an image they
> have made in a photo editor, or taken with their camera, or rendered
> previously with gamma correction in POV, they want the colours to be the
> same in the POV rendered scene as the original colours appear on their
> monitor.  For this reason, POV should use the inverse of display_gamma for
> the input.

I think this or 3.  If your are using images from the web, their gamma may not
be the same as your monitor gamma.  In this case you would probably want the
true original brightness on the output in which case 3 makes sense.  If the
file gamma matches the monitor gamma, then option 3 is like option 2 because
loading the image would 'undo' the file gamma instead of undoing the display
gamma, which both would have the same values.


Post a reply to this message

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