POV-Ray : Newsgroups : povray.unofficial.patches : post_process and gamma Server Time
1 Nov 2024 03:16:10 EDT (-0400)
  post_process and gamma (Message 1 to 6 of 6)  
From: Kari Kivisalo
Subject: post_process and gamma
Date: 16 Jul 2001 13:32:24
Message: <3B5325C9.89C5577E@pp.htv.fi>
Just a quick note if you haven't noticed. Gamma correction is
applied _before_ post_process in MP0.7. This kind of alters the
operation of all the post functions. Let's take invert for example
with 2.0 gamma.

original linear sample: 20%
after gamma:            45%
after invert:           55%

original linear sample: 20%
after invert:           80%
after gamma:            89%

It's fine if post is used like a filter in an image editor which
operates in perceptually uniform color space (2.2 gamma corrected).
One of the reasons for operating on corrected values is to minimise
the effects on quantisation errors. 8 bits is really the lowest
number of bits to present an acceptable quality image. Any oprations
done in 8 bits result in visible quantisation errors. When done in
linear space the biggest errors appear in the low intensity areas.
When done in corrected space the errors spread evenly among samples.

Because post_process (supposedly) operates on decimal samples there
is no reason to apply gamma before the operations because, for the
practical purposes, the quantisation errors won't be visible anyway.

Of course some people prefer post_process would work the same as
Photoshop for example because they are used to invert producing
"reverse gamma inverted" effect :)

I hope this is addressed in POV 3.5 if post_process is included.
The best solution would be a switch that selects the order of gamma
and post_process.


Here is Q & A from Poynton's gamma FAQ:

   21. Should I do image processing operations on 
       linear or nonlinear image data?

   If you wish to simulate the physical world,
   linear-light coding is necessary.


_____________
Kari Kivisalo


Post a reply to this message

From: Rune
Subject: Re: post_process and gamma
Date: 16 Jul 2001 16:28:15
Message: <3b534e5f@news.povray.org>
"Kari Kivisalo" wrote:
> Because post_process (supposedly) operates on decimal
> samples there is no reason to apply gamma before the
> operations because, for the practical purposes, the
> quantisation errors won't be visible anyway.

> I hope this is addressed in POV 3.5 if post_process is included.

post_process won't be included in POV-Ray 3.5.

See http://www.povray.org/3.5-status.html

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Jérôme Grimbert
Subject: Re: post_process and gamma
Date: 17 Jul 2001 17:12:19
Message: <3B54901F.F6221B29@free.fr>
Kari Kivisalo wrote:

> I hope this is addressed in POV 3.5 if post_process is included.
> The best solution would be a switch that selects the order of gamma
> and post_process.
> 

The best solution would be do remove the Gamma correction, and stick
to a flat 1.0 from the PNG file to the final display.
BUT there is the well-known problem of backward compatibility...
And systems which are unable to display correctly a gamma 1.0 image,
because they are not correctly calibrated or have no idea what a gamma
correction really is.


Post a reply to this message

From: Kari Kivisalo
Subject: Re: post_process and gamma
Date: 17 Jul 2001 18:06:07
Message: <3B54B772.1E3D1EAE@pp.htv.fi>

>
> The best solution would be do remove the Gamma correction, and stick
> to a flat 1.0 from the PNG file to the final display.

This would be fine for 48 bit images but not for 24 bit. Also for example
Photoshop 4, 5 and 6 are unable to read 48 bit pngs generated by pov. For
a year I have tried to find an image editor that can read in pov generated
48 bit pngs and do something with it. I have found none. I have asked in
several newsgroups about this and they didn't know either.

For 24 bit image files the optimal coding is the perceptually uniform 
2.2 gamma corrected. If a linear coded 24 bit image is gamma corrected
for display visible banding results in low intensity image areas.


_____________
Kari Kivisalo


Post a reply to this message

From: Dennis Milller
Subject: Re: post_process and gamma
Date: 28 Jul 2001 12:33:16
Message: <3b62e94c$1@news.povray.org>
Is it safe to alter the gamma setting, for example to achieve overall
brightness of a scene? Sometimes I have a scene that is fine but simply too
dark. Rather than messing with the lights, can you brighten a scene safely
by lowering the gamma setting?
thanks,
D.

"Kari Kivisalo" <kki### [at] pphtvfi> wrote in message
news:3B54B772.1E3D1EAE@pp.htv.fi...

> >
> > The best solution would be do remove the Gamma correction, and stick
> > to a flat 1.0 from the PNG file to the final display.
>
> This would be fine for 48 bit images but not for 24 bit. Also for example
> Photoshop 4, 5 and 6 are unable to read 48 bit pngs generated by pov. For
> a year I have tried to find an image editor that can read in pov generated
> 48 bit pngs and do something with it. I have found none. I have asked in
> several newsgroups about this and they didn't know either.
>
> For 24 bit image files the optimal coding is the perceptually uniform
> 2.2 gamma corrected. If a linear coded 24 bit image is gamma corrected
> for display visible banding results in low intensity image areas.
>
>
> _____________
> Kari Kivisalo


Post a reply to this message

From: Kari Kivisalo
Subject: Re: post_process and gamma
Date: 29 Jul 2001 03:01:33
Message: <3B63B572.43AE6139@pp.htv.fi>
Dennis Milller wrote:
> 
> Is it safe to alter the gamma setting, for example to achieve overall
> brightness of a scene?

Sure, as long as the output file format doesn't store the (incorrect)
gamma information. I think only png stores it. You know what your
monitor gamma is and if the image looks good on screen then all is well.

Remember to adjust your monitor brightness and contrast too.
http://www.pp.htv.fi/kkivisal/adjust.gif

When publishing your images I would recommend using gamma 2.2 in the
image file. It's the standard agreed by such small companies like
Microsoft, HP, Adobe and Corel. Just apply your_gamma/2.2 correction
to the image in an image editor (Paint Shop Pro, Image Ready, etc.).


_____________
Kari Kivisalo


Post a reply to this message

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