POV-Ray : Newsgroups : povray.newusers : diference between render window and PNG output : Re: diference between render window and PNG output Server Time
27 Jun 2024 17:20:30 EDT (-0400)
  Re: diference between render window and PNG output  
From: clipka
Date: 23 Feb 2012 13:52:25
Message: <4f468ae9@news.povray.org>
Am 23.02.2012 19:28, schrieb Le_Forgeron:

> I do not know the windows specific code, but the general code of povray
> would push for 16 bits per channel in case of Gray output. That does not
> seems to be the case in your render. (hint: try it as option from
> command-line box ?)

No; that's only the case for heightfield output.

> Note on palette: it's compact (excepted for black, the 31 other entries
> cover 26 to 56 values.
> What you might be observing is a side effect of computation: The png
> writing get the float value (0 to 1 usual range) into an integer (0 to
> 255 for 8 bits) via a gamma curve, whereas the preview/display get the
> pixel colour probably in a different way (from the same float anyway).

No, the gamma curve is (by default) the same for both file output and 
preview. But the preview is dithered by default; it would be quite 
difficult to emulate the artifacts created by the various file formats 
in the preview, so the current strategy is to show the image in the best 
possible quality (which is somewhat consistent with POV-Ray 3.6, which 
also didn't emulate the effects of reducing color depth to 5 bits, for 
instance.)

> You might want to (either or both):
>   * Use deeper PNG (+FN16 is the max)

You might still get color banding there depending on the image viewer.

>   * experiment with dithering (+TH or +THfs or +THB2 or +THB3 or +THB4 or
> +THD1 or +THD2 )

Yep, probably the best approach.

>   * try the wrath of gods by playing with FILE_GAMMA setting.

Might help with some images (and the God of PNG has a rather liberal 
attitude about File_Gamma), but with the average image you may just 
exchange color banding in dark regions for color banding in bright 
regions. Plus, color banding might be introduced again by the image viewer.

>  From your picture view, the png file you got is correct and cannot
> perform better due to the compact values used with +FN8 and the gamma
> you specified for file (or its default of 2.2);

Indeed. (Given that no dithering is performed, that is.)

(BTW, File_Gamma and Display_Gamma default is actually the sRGB transfer 
formula. Close enough to a power-law transfer function with a gamma of 
2.2 for many practical purposes, but not exactly the same.)


Post a reply to this message

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