Difference between revisions of "Reference:File Output Options"

From POV-Wiki
Jump to navigation Jump to search
m (beginning v3.8 overhaul)
m (output file type related changes and cleanup)
Line 46: Line 46:
 
<tr>
 
<tr>
 
<td><code>Grayscale_Output=</code>bool{{#indexentry:Grayscale_Output, ini-option}}</td>
 
<td><code>Grayscale_Output=</code>bool{{#indexentry:Grayscale_Output, ini-option}}</td>
<td>Sets grayscale output on/off</td>
+
<td>Sets grayscale output on/off (PNG and PPM only)</td>
 
</tr>
 
</tr>
  
Line 56: Line 56:
 
<tr>
 
<tr>
 
<td><code>+F</code>xng{{#indexentry:+g}}</td>
 
<td><code>+F</code>xng{{#indexentry:+g}}</td>
<td>Sets file output on; sets format x, depth n, grayscale</td>
+
<td>Sets file output on; sets format x, depth n, <em>grayscale</em></td>
 
</tr>
 
</tr>
  
 
<tr>
 
<tr>
 
<td><code>-F</code>xng{{#indexentry:-g}}</td>
 
<td><code>-F</code>xng{{#indexentry:-g}}</td>
<td>Sets file output off; but in future use format x, depth n, grayscale</td>
+
<td>Sets file output off; but in future use format x, depth n, <em>grayscale</em></td>
 
</tr>
 
</tr>
  
Line 81: Line 81:
 
<tr>
 
<tr>
 
<td><code>Bits_Per_Color=</code>n{{#indexentry:Bits_Per_Color, ini-option}}</td>
 
<td><code>Bits_Per_Color=</code>n{{#indexentry:Bits_Per_Color, ini-option}}</td>
<td>Sets file output bits/color to n</td>
+
<td>Sets file output bits/color to n. A {{Change}} in version 3.8 allows values ranging from 1 to 16.</td>
 
</tr>
 
</tr>
  
Line 149: Line 149:
 
</tr>
 
</tr>
 
</table>
 
</table>
<p>
+
 
{{New}} as of version 3.8, instead of <code>Output_File_Type=C</code> you can also use <code>Output_File_Type=T Compression=1</code> to choose RLE-encoded Targa format.
+
<p>Grayscale output can be used to generate heightfields for use in other POV-Ray scenes, by using <code>Grayscale_Output=true</code> as an INI option, or <code>+Fxg</code> for output type <em>x</em> as a command-line option. For example, <code>+Fng</code> for PNG and <code>+Fpg</code> for PPM (effectively PGM) grayscale output. By default this option is off.</p>
</p>
+
 
<p>
+
<p>With <code>Grayscale_Output=true</code>, the output file will be in the form of a grayscale image that can be used to generate heightfields, as the height at any point is dependent on the brightness of the pixel. The brightness of a pixel is calculated in the same way that color images are converted to grayscale images:<em><code> height = 0.3 * red + 0.59 * green + 0.11 * blue</code></em>.</p>
PNG is an image format designed not only to replace GIF, but to improve on its shortcomings. PNG offers the highest compression available without loss for high quality applications, such as ray-tracing.
+
 
</p>
+
<p>See also: [[Reference:Height Field|Height Field]] for a description of how POV-Ray heightfields are stored for each file type.</p>
<p>
+
 
{{Change}} Prior to version 3.8, PPM output always created the compact <em>raw</em> (binary) format. The <code>Compression=0</code> ini setting can now be used to select the <em>plain</em> (ASCII) format instead.
+
<p>In <em>previous</em> versions specifying a bit-depth for grayscale file output was simply ignored. A {{Change}} in version 3.8 now allows for a bit-depth setting.</p>
</p>
+
 
<p>
+
<p>It should also be noted that with <em>previous</em> versions setting the <code>Grayscale_Output=true</code> INI option would <em>not</em> cause the preview display, if used, to be grayscale. A {{Change}} in version 3.8 <em>now</em> shows a grayscale image on the preview display as well.</p>
The system specific format depends on the platform used and is covered in the appropriate system specific documentation.
+
 
</p>
+
<p>Currently PNG, and PPM are the only file formats that support grayscale output.</p>
<p>
+
 
JPEG is particularly good at achieving high compression rates with photographic or photorealistic images, making it one of the most frequently used formats on the Internet. However, it is not loss-free. Images generated with this option will always contain compression artifacts (image defects). If you need to keep a high-quality image you should render using one of the loss-free formats.  
+
<p>{{New}} as of version 3.8, instead of <code>Output_File_Type=C</code> you can also use <code>Output_File_Type=T Compression=1</code> to choose RLE-encoded Targa format.</p>
</p>
+
 
 +
<p>PNG is an image format designed not only to replace GIF, but to improve on its shortcomings. PNG offers the highest compression available without loss for high quality applications, such as ray-tracing.</p>
 +
 
 +
<p>{{Change}} Prior to version 3.8, PPM output always created the compact <em>raw</em> (binary) format. The <code>Compression=0</code> ini setting can now be used to select the <em>plain</em> (ASCII) format instead.</p>
 +
 
 +
<p>The system specific format depends on the platform used and is covered in the appropriate system specific documentation.</p>
 +
 
 +
<p>JPEG is particularly good at achieving high compression rates with photographic or photorealistic images, making it one of the most frequently used formats on the Internet. However, it is not loss-free. Images generated with this option will always contain compression artifacts (image defects). If you need to keep a high-quality image you should render using one of the loss-free formats.</p>
 +
 
 
<p class="Note"><strong>Note:</strong> Chroma sub-sampling has been disabled in JPEG output, and there has been a reduction in the default quality setting.</p>
 
<p class="Note"><strong>Note:</strong> Chroma sub-sampling has been disabled in JPEG output, and there has been a reduction in the default quality setting.</p>
<p>
+
 
The JPEG compression quality can be controlled using the <code>Compression</code> ini file option which, if set, needs to be an integer between 0 and 100. If values of 0 or 1 are specified then the default compression quality setting of 85% is used. Otherwise the value specified (2-100) is used as the compression quality setting. A value of 2 produces the smallest file (maximum compression), but looks terrible. A value of 100 produces the largest file (least compression) but can still contain some compression artifacts. Values lower than 0 are clipped to 0. Values greater than 100 are clipped to 100.
+
<p>The JPEG compression quality can be controlled using the <code>Compression</code> ini file option which, if set, needs to be an integer between 0 and 100. If values of 0 or 1 are specified then the default compression quality setting of 85% is used. Otherwise the value specified (2-100) is used as the compression quality setting. A value of 2 produces the smallest file (maximum compression), but looks terrible. A value of 100 produces the largest file (least compression) but can still contain some compression artifacts. Values lower than 0 are clipped to 0. Values greater than 100 are clipped to 100.</p>
</p>
+
 
<p>
+
<p>Most of these formats output 24 bits per pixel with 8 bits for each of red, green and blue data. PNG and PPM allow you to optionally specify the output bit depth from 5 to 16 bits for each of the red, green, and blue colors, giving from 15 to 48 bits of color information per pixel. The default output depth for all formats is 8 bits/color (16 million possible colors), but this may be changed for PNG and PPM format files by setting <code>Bits_Per_Color=</code><em>n</em> or by specifying <code>+FN</code><em>n</em> or <code>+FP</code><em>n</em>, where n is the desired bit depth.</p>
Most of these formats output 24 bits per pixel with 8 bits for each of red,
+
 
green and blue data. PNG and PPM allow you to optionally specify the output bit
+
<p>Specifying a smaller color depth like 5 bits/color (32768 colors) may be enough for people with 8- or 16-bit (256 or 65536 color) displays, and will improve compression of the PNG file. Higher bit depths like 10 or 12 may be useful for video or publishing applications, and 16 bits/color is good for grayscale height field output (See section [[Reference:Height Field|:Height Field|Height Field]] for details on height fields).</p>
depth from 5 to 16 bits for each of the red, green, and blue colors, giving
+
 
from 15 to 48 bits of color information per pixel. The default output depth
+
<p>Targa format also allows 8 bits of alpha transparency data to be output, while PNG format allows 5 to 16 bits of alpha transparency data, depending on the color bit depth as specified above. You may turn this option on with <code> Output_Alpha=on</code> or <code>+UA</code>. The default is off or <code> -UA</code>.</p>
for all formats is 8 bits/color (16 million possible colors), but this may be
+
 
changed for PNG and PPM format files by setting <code>Bits_Per_Color=</code><em>n</em>
+
<p>The alpha channel stores a transparency value for each pixel, just like there is also stored a value for red green and blue light for each pixel. In POV-Ray, when the alpha channel is turned on, all areas of the image where the background is partly or fully visible will be partly or fully transparent. Refractions of the background will also be transparent, but not reflections. Also anti-aliasing is taken into account.</p>
or by specifying <code>+FN</code><em>n</em> or <code>+FP</code><em>n</em>,  
+
 
where n is the desired bit depth.</p>
+
<p>The philosophy of the alpha channel feature in POV-Ray is that the background color should not be present in the color of the image when the
<p>
+
alpha channel is used. Instead, the amount of visible background is kept in the alpha and *only* in the alpha channel. That ensures that images look correct when viewed with the alpha channel.</p>
Specifying a smaller color depth like 5 bits/color (32768 colors) may be
+
 
enough for people with 8- or 16-bit (256 or 65536 color) displays, and will
+
<p>See section <!--<linkto "Using the Alpha Channel">Using the Alpha Channel</linkto>--->[[Reference:Image Map#Using the Alpha Channel|Using the Alpha Channel]] for further details on using transparency in imagemaps in your scene.</p>
improve compression of the PNG file. Higher bit depths like 10 or 12 may be
 
useful for video or publishing applications, and 16 bits/color is good for
 
grayscale height field output (See section [[Reference:Height Field|:Height Field|Height Field]] for
 
details on height fields).</p>
 
<p>
 
Targa format also allows 8 bits of alpha transparency data to be output,
 
while PNG format allows 5 to 16 bits of alpha transparency data, depending on
 
the color bit depth as specified above. You may turn this option on with
 
<code> Output_Alpha=on</code> or <code>+UA</code>. The default is off or
 
<code> -UA</code>. </p>
 
<p>The alpha channel stores a transparency value for each pixel, just like
 
there is also stored a value for red green and blue light for each pixel. In
 
POV-Ray, when the alpha channel is turned on, all areas of the image
 
where the background is partly or fully visible will be partly or fully
 
transparent. Refractions of the background will also be transparent, but not
 
reflections. Also anti-aliasing is taken into account</p>
 
<p>The philosophy of the alpha channel feature in POV-Ray is that the
 
background color should not be present in the color of the image when the
 
alpha channel is used. Instead, the amount of visible background is kept in
 
the alpha and *only* in the alpha channel. That ensures that images look
 
correct when viewed with the alpha channel.</p>
 
<p>See section <!--<linkto "Using the Alpha Channel">Using the Alpha Channel</linkto>--->[[Reference:Image Map#Using the Alpha Channel|Using the Alpha Channel]] for
 
further details on using transparency in imagemaps in your scene.</p>
 
  
 
<p class="Note"><strong>Note:</strong> In version 3.7 alpha handling for image file output has changed. Effectively, the background <em>now requires</em> a <code>filter</code> or <code>transmit</code> value in order for alpha transparency to work properly.</p>
 
<p class="Note"><strong>Note:</strong> In version 3.7 alpha handling for image file output has changed. Effectively, the background <em>now requires</em> a <code>filter</code> or <code>transmit</code> value in order for alpha transparency to work properly.</p>
Line 208: Line 193:
 
<p>Previous versions of POV-Ray always wrote associated alpha for output, this has been changed on a per-file-format basis as follows:</p>
 
<p>Previous versions of POV-Ray always wrote associated alpha for output, this has been changed on a per-file-format basis as follows:</p>
 
<ul>
 
<ul>
<li> PNG will use straight alpha as per specification.</li>
+
<li> PNG will use straight alpha as per specification.</li>
<li> OpenEXR will use associated alpha as per specifications.</li>
+
<li> OpenEXR will use associated alpha as per specifications.</li>
<li> TGA and BMP 32-bit RGBA will use straight alpha, retaining file input compatibility for now, until a final decision has been made on these formats.</li>
+
<li> TGA and BMP 32-bit RGBA will use straight alpha, retaining file input compatibility for now, until a final decision has been made on these formats.</li>
 
</ul>
 
</ul>
<p>
+
 
In addition to support for variable bit-depths, alpha channel, and grayscale
+
<p>In addition to support for variable bit-depths, alpha channel, and grayscale formats, PNG files also store the <code>File_Gamma</code> value so the image displays properly on all systems.</p>
formats, PNG files also store the <code>File_Gamma</code> value so the
+
 
image displays properly on all systems.
 
The <code>hf_gray_16</code> global setting, as described in section
 
[[Reference:Global Settings#HF_Gray_16|:HF_Gray_16|HF_Gray_16]] will also affect the
 
type of data written to the output file.</p>
 
 
<p>The [http://radsite.lbl.gov/radiance/HOME.html Radiance] Synthetic Imaging System or <em>.hdr</em> image format was originally developed to aid lighting designers and architects by predicting the light levels and appearance of a space prior to construction. The [http://www.openexr.com/index.html OpenEXR] or <em>.exr</em> image file format was developed by Industrial Light & Magic&trade; for use in computer imaging applications.</p>
 
<p>The [http://radsite.lbl.gov/radiance/HOME.html Radiance] Synthetic Imaging System or <em>.hdr</em> image format was originally developed to aid lighting designers and architects by predicting the light levels and appearance of a space prior to construction. The [http://www.openexr.com/index.html OpenEXR] or <em>.exr</em> image file format was developed by Industrial Light & Magic&trade; for use in computer imaging applications.</p>
 +
 
<p>Most image formats now include metadata (BMP is a notable exception). This metadata contains the POV-Ray version, render date/time (GMT), platform (e.g. x86_64-pc-win), and compiler used to build the POV-Ray executable.</p>
 
<p>Most image formats now include metadata (BMP is a notable exception). This metadata contains the POV-Ray version, render date/time (GMT), platform (e.g. x86_64-pc-win), and compiler used to build the POV-Ray executable.</p>
 
<p class="Note"><strong>Note:</strong> System-specific or  type &quot;s&quot; output file format is being retained for legacy support reasons. Windows and Unix mapping remains the same,  BMP and TGA respectively, however on Macintosh it has been changed to PNG, and a warning is issued when type &quot;s&quot; is used.</p>
 
<p class="Note"><strong>Note:</strong> System-specific or  type &quot;s&quot; output file format is being retained for legacy support reasons. Windows and Unix mapping remains the same,  BMP and TGA respectively, however on Macintosh it has been changed to PNG, and a warning is issued when type &quot;s&quot; is used.</p>
 
===From hf_gray_16===
 
<p>Preserving content for <code>hf_gray_16</code>...Changes to follow.</p>
 
<p class="Note"><strong>Note:</strong> In version 3.7 the <code>hf_gray_16</code> keyword in the <code>global_settings</code> block has been deprecated. If encountered, it has no effect on the output type and will additionally generate a warning message.</p>
 
 
<p>However grayscale output can still be used to generate heightfields for use in other POV-Ray scenes, and now should be specified by using <code>Grayscale_Output=true</code> as an INI option, or <code>+Fxg</code> (for output type 'x') as a command-line option. For example, <code>+Fng</code> for PNG and <code>+Fpg</code> for PPM (effectively PGM) grayscale output. By default this option is off.</p>
 
 
<p>With <code>Grayscale_Output=true</code>, the <strong>output file</strong> will be in the form of a grayscale image that can be used to generate heightfields, because the height at any point is dependent on the brightness of the pixel. The brightness of a pixel is calculated in the same way that color images are converted to grayscale images:<em><code> height = 0.3 * red + 0.59 * green + 0.11 * blue</code></em>.</p>
 
 
<p>It should also be noted that setting the <code>Grayscale_Output=true</code> INI option will <strong>NOT</strong> cause the preview display, if used, to be grayscale rather than color. See the section [[Reference:Height Field|Height Field]] for a description of how POV-Ray heightfields are stored for each file type.</p>
 
 
<p class="Note"><strong>Note:</strong> Grayscale output implies the maximum bit-depth the format supports is 16, it is not valid to specify bits per color channel with 'g' (e.g. <code>+Fng16</code> is not allowed, and nor for that matter is <code>+Fn16g</code>). If bits per channel is provided via an INI option, it is ignored.</p>
 
 
<p>Currently PNG, and PPM are the only file formats that support grayscale output.</p>
 
  
 
==Output File Name==
 
==Output File Name==

Revision as of 11:45, 27 October 2018

Output_to_File=bool
Sets file output on/off
+F Sets file output on (use default type)
-F Sets file output off

By default, POV-Ray writes an image file to disk. When you are developing a scene and doing test renders, the graphic preview may be sufficient. To save time and disk activity you may turn file output off with Output_to_File=off or -F.

Output File Type

There has been a Change as of version 3.7 regarding the default output file type. For all supported platforms the default is now PNG.

Output_File_Type=x
Sets file output format to x
+Fxn
Sets file output on; sets format x, depth n
-Fxn
Sets file output off; but in future use format x, depth n
Grayscale_Output=bool
Sets grayscale output on/off (PNG and PPM only)
Greyscale_Output=bool
Same as Grayscale_Output=bool
+Fxng
Sets file output on; sets format x, depth n, grayscale
-Fxng
Sets file output off; but in future use format x, depth n, grayscale
Output_Alpha=bool
Sets alpha output on/off
+UA
Sets alpha output on
-UA
Sets alpha output off
Bits_Per_Color=n
Sets file output bits/color to n. A Change in version 3.8 allows values ranging from 1 to 16.
Compression=n
Sets compression parameter for file types that support it.

You may select one of several different file types by using Output_File_Type=x or +Fx where x is one of the following:

B or b
Universal Bitmap image file format
C or c
Compressed Targa-24 format (RLE, run length encoded)
E or e
OpenEXR High Dynamic-Range format
H or h
Radiance High Dynamic-Range format
J or j
JPEG format (Note: This format is not loss-free and will generate compression artifacts)
N or n
PNG (portable network graphics) format
P or p
Unix PPM format
S or s
System-specific format: See the notation at the end of this section.
T or t
Uncompressed Targa-24 format

Grayscale output can be used to generate heightfields for use in other POV-Ray scenes, by using Grayscale_Output=true as an INI option, or +Fxg for output type x as a command-line option. For example, +Fng for PNG and +Fpg for PPM (effectively PGM) grayscale output. By default this option is off.

With Grayscale_Output=true, the output file will be in the form of a grayscale image that can be used to generate heightfields, as the height at any point is dependent on the brightness of the pixel. The brightness of a pixel is calculated in the same way that color images are converted to grayscale images: height = 0.3 * red + 0.59 * green + 0.11 * blue.

See also: Height Field for a description of how POV-Ray heightfields are stored for each file type.

In previous versions specifying a bit-depth for grayscale file output was simply ignored. A Change in version 3.8 now allows for a bit-depth setting.

It should also be noted that with previous versions setting the Grayscale_Output=true INI option would not cause the preview display, if used, to be grayscale. A Change in version 3.8 now shows a grayscale image on the preview display as well.

Currently PNG, and PPM are the only file formats that support grayscale output.

New as of version 3.8, instead of Output_File_Type=C you can also use Output_File_Type=T Compression=1 to choose RLE-encoded Targa format.

PNG is an image format designed not only to replace GIF, but to improve on its shortcomings. PNG offers the highest compression available without loss for high quality applications, such as ray-tracing.

Change Prior to version 3.8, PPM output always created the compact raw (binary) format. The Compression=0 ini setting can now be used to select the plain (ASCII) format instead.

The system specific format depends on the platform used and is covered in the appropriate system specific documentation.

JPEG is particularly good at achieving high compression rates with photographic or photorealistic images, making it one of the most frequently used formats on the Internet. However, it is not loss-free. Images generated with this option will always contain compression artifacts (image defects). If you need to keep a high-quality image you should render using one of the loss-free formats.

Note: Chroma sub-sampling has been disabled in JPEG output, and there has been a reduction in the default quality setting.

The JPEG compression quality can be controlled using the Compression ini file option which, if set, needs to be an integer between 0 and 100. If values of 0 or 1 are specified then the default compression quality setting of 85% is used. Otherwise the value specified (2-100) is used as the compression quality setting. A value of 2 produces the smallest file (maximum compression), but looks terrible. A value of 100 produces the largest file (least compression) but can still contain some compression artifacts. Values lower than 0 are clipped to 0. Values greater than 100 are clipped to 100.

Most of these formats output 24 bits per pixel with 8 bits for each of red, green and blue data. PNG and PPM allow you to optionally specify the output bit depth from 5 to 16 bits for each of the red, green, and blue colors, giving from 15 to 48 bits of color information per pixel. The default output depth for all formats is 8 bits/color (16 million possible colors), but this may be changed for PNG and PPM format files by setting Bits_Per_Color=n or by specifying +FNn or +FPn, where n is the desired bit depth.

Specifying a smaller color depth like 5 bits/color (32768 colors) may be enough for people with 8- or 16-bit (256 or 65536 color) displays, and will improve compression of the PNG file. Higher bit depths like 10 or 12 may be useful for video or publishing applications, and 16 bits/color is good for grayscale height field output (See section Height Field for details on height fields).

Targa format also allows 8 bits of alpha transparency data to be output, while PNG format allows 5 to 16 bits of alpha transparency data, depending on the color bit depth as specified above. You may turn this option on with Output_Alpha=on or +UA. The default is off or -UA.

The alpha channel stores a transparency value for each pixel, just like there is also stored a value for red green and blue light for each pixel. In POV-Ray, when the alpha channel is turned on, all areas of the image where the background is partly or fully visible will be partly or fully transparent. Refractions of the background will also be transparent, but not reflections. Also anti-aliasing is taken into account.

The philosophy of the alpha channel feature in POV-Ray is that the background color should not be present in the color of the image when the alpha channel is used. Instead, the amount of visible background is kept in the alpha and *only* in the alpha channel. That ensures that images look correct when viewed with the alpha channel.

See section Using the Alpha Channel for further details on using transparency in imagemaps in your scene.

Note: In version 3.7 alpha handling for image file output has changed. Effectively, the background now requires a filter or transmit value in order for alpha transparency to work properly.

Previous versions of POV-Ray always wrote associated alpha for output, this has been changed on a per-file-format basis as follows:

  • PNG will use straight alpha as per specification.
  • OpenEXR will use associated alpha as per specifications.
  • TGA and BMP 32-bit RGBA will use straight alpha, retaining file input compatibility for now, until a final decision has been made on these formats.

In addition to support for variable bit-depths, alpha channel, and grayscale formats, PNG files also store the File_Gamma value so the image displays properly on all systems.

The Radiance Synthetic Imaging System or .hdr image format was originally developed to aid lighting designers and architects by predicting the light levels and appearance of a space prior to construction. The OpenEXR or .exr image file format was developed by Industrial Light & Magic™ for use in computer imaging applications.

Most image formats now include metadata (BMP is a notable exception). This metadata contains the POV-Ray version, render date/time (GMT), platform (e.g. x86_64-pc-win), and compiler used to build the POV-Ray executable.

Note: System-specific or type "s" output file format is being retained for legacy support reasons. Windows and Unix mapping remains the same, BMP and TGA respectively, however on Macintosh it has been changed to PNG, and a warning is issued when type "s" is used.

Output File Name

Output_File_Name=file
Sets output file to file
+Ofile
Same as Output_File_Name=file

The default output filename is created from the scene name and need not be specified. The scene name is the input name with all drive, path, and extension information stripped. For example if the input file name is c:\povray3\mystuff\myfile.pov the scene name is myfile. The proper extension is appended to the scene name based on the file type. For example myfile.tga or myfile.png might be used.

You may override the default output name using Output_File_Name=file or +Ofile. For example:

Input_File_Name=myinput.pov
Output_File_Name=myoutput.tga

If an output file name of "-" is specified (a single minus sign), then the image will be written to standard output, usually the screen. The output can then be piped into another program or to a GUI if desired.

If the file specified is actually a path or directory or folder name and not a file name, then the default output name is used but it is written to the

specified directory. For example:

Input_File_Name=myscene.pov
Output_File_Name=c:\povray3\myimages\

This will create c:\povray3\myimages\myscene.png as the output file.

Output File Buffer

The output-file buffer options Buffer_Output and Buffer_Size are removed per POV-Ray 3.6

Note: The options are still accepted, but ignored, in order to be backward compatible with old INI files.

Output File Dithering

Dither=bool
Turns output file dithering on/off
Dither_Method=xx
Selects the output file dithering method, where xx is listed below:
+/-THxx
Command line equivalent
  • B2..B4: Bayer pattern dithering using 2x2, 3x3 or 4x4 patterns, respectively
  • D1: Simple 1-dimensional error diffusion dithering
  • D2: Simple 2-dimensional error diffusion dithering (needs extra memory for 2 pixel rows)
  • FS: Floyd-Steinberg error diffusion dithering (needs extra memory for 2 pixel rows)

The default is -THfs i.e: dithering is off, with Floyd-Steinberg being the default if only +TH is specified.

Dithering works for all file formats except JPEG (where dithering would be counter-productive) and OpenEXR (which provides sufficient precision to make dithering obsolete). These file formats simply ignore the setting.

Note: While dithering does help to reduce color banding, it may instead lead to artifacts in prints, due to interference with the printing device's own dithering algorithms; in that case, choosing a different dither method may help.

Output File Gamma

File_Gamma=x.x
Sets output file gamma to n.n
File_Gamma=sRGB Selects the sRGB transfer function instead of a power-law output file gamma
File_Gamma=BT709 New in version 3.8, selects the ITU-R BT.709 transfer function instead of a power-law output file gamma
File_Gamma=BT2020 New in version 3.8, selects the ITU-R BT.2020 transfer function instead of a power-law output file gamma

Many file formats traditionally have no clearly specified gamma handling policy, and require images to be gamma pre-corrected for whatever target system they are to be displayed on. For such file formats (currently all except PNG, OpenEXR and Radiance HDR), the File_Gamma setting specifies the target display gamma for which to pre-correct (typically a value in the range from 1.6 to around 2.5, with 2.2 being the most commonly used), and will have an influence on the brightness and saturation of the image when displayed.

Some other file formats do have a clearly specified gamma handling policy, but allow for gamma encoding with an arbitrary gamma value (currently only PNG). For such formats, File_Gamma specifies the decoding gamma or, in other words, the inverse of the encoding gamma to use, and will have no effect on the brightness and saturation of the image when displayed with contemporary software; the setting will however affect the likelihood of banding artifacts.

The parameter has no effect on file formats mandating linear storage of color values (currently OpenEXR and Radiance HDR).

Alternatively to a numeric value, sRGB can be specified, instructing POV-Ray to employ the sRGB transfer function, which is similar but not quite identical to a power-law gamma curve with a gamma of 2.2. sRGB is also the default on all platforms currently supported. New in version 3.8, BT709 or BT2020 can also be specified, instructing POV-Ray to employ the transfer function specified in ITU-R BT.709 or ITU-R BT.2020, respectively, which are similar but not quite identical to a power-law gamma curve with a gamma of roughly 1.9. When generating Netpbm PPM output, BT709 is the effective default.

Note: Specifying File_Gamma=BT709 or File_Gamma=BT2020 only affects the transfer function used. Specifically, it does not affect the digital representation of nominal black and white, which remain at 0 and 255 (presuming 8-bit encoding), respectively, as opposed to 16 and 235 for full-fledged ITU-R BT-709 encoding.

See also: Gamma in Output Images for additional information.

CPU Utilization Histogram

The CPU Utilization Histogram feature has been removed as of POV-Ray v3.7.