Difference between revisions of "Documentation Talk:Reference Section 1.1"

From POV-Wiki
Jump to navigation Jump to search
m (started this talk page)
 
Line 58: Line 58:
 
<td width="70%"><strong>C</strong>ompressed Targa-24 format (RLE, run length
 
<td width="70%"><strong>C</strong>ompressed Targa-24 format (RLE, run length
 
encoded)</td>
 
encoded)</td>
 +
</tr>
 +
 +
<tr>
 +
<td width="30%"><code>.. J</code><!--<indexentry primary "JPEG output, compressed" "Output, JPEG, compressed"><indexentry "+fj"></td>--->
 +
 +
<td width="70%"><strong>J</strong>PEG format (Note: This format is not loss-free and will generate compression artifacts)</td>
 
</tr>
 
</tr>
  
Line 89: Line 95:
 
and no longer necessary. PPM, PNG, and system specific formats have been
 
and no longer necessary. PPM, PNG, and system specific formats have been
 
added. PPM format images are uncompressed, and have a simple text header,
 
added. PPM format images are uncompressed, and have a simple text header,
which makes it a widely portable image format. PNG is an image format
+
which makes it a widely portable image format.  
 +
</p>
 +
<p>PNG is an image format
 
designed not only to replace GIF, but to improve on its shortcomings. PNG
 
designed not only to replace GIF, but to improve on its shortcomings. PNG
 
offers the highest compression available without loss for high quality
 
offers the highest compression available without loss for high quality
Line 95: Line 103:
 
platform used and is covered in the appropriate system specific
 
platform used and is covered in the appropriate system specific
 
documentation.</p>
 
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>
 +
GIF is good at achieving high compression rates when there are large areas of flat color. This image format is frequently used for banners and logos on the Internet. Most raytraced images contain subtle color changes which do not compress well with GIF compression, but POV-Ray can be used to generate flat-color images using high ambient values and no light sources.
 +
</p>
 
<p>
 
<p>
 
Most of these formats output 24 bits per pixel with 8 bits for each of red,
 
Most of these formats output 24 bits per pixel with 8 bits for each of red,

Revision as of 17:15, 5 October 2009

Output File Type

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
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

The default type of image file depends on which platform you are using. MS-DOS and most others default to 24-bit uncompressed Targa. Windows defaults to 'sys', which is 24-bit BMP. See your platform-specific documentation to see what your default file type is. You may select one of several different file types using Output_File_Type=x or +Fx where x is one of the following...

.. C Compressed Targa-24 format (RLE, run length encoded)
.. J JPEG format (Note: This format is not loss-free and will generate compression artifacts)
.. N PNG (portable network graphics) format
.. P Unix PPM format
.. S System-specific such as Mac Pict or Windows BMP
.. T Uncompressed Targa-24 format

Note: the obsolete +FD dump format and +FR raw format have been dropped because they were rarely used and no longer necessary. PPM, PNG, and system specific formats have been added. PPM format images are uncompressed, and have a simple text header, which makes it a widely portable image 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. 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.

GIF is good at achieving high compression rates when there are large areas of flat color. This image format is frequently used for banners and logos on the Internet. Most raytraced images contain subtle color changes which do not compress well with GIF compression, but POV-Ray can be used to generate flat-color images using high ambient values and no light sources.

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.

In addition to support for variable bit-depths, alpha channel, and grayscale formats, PNG files also store the Display_Gamma value so the image displays properly on all systems (see section "Display Hardware Settings"). The hf_gray_16 global setting, as described in section "HF_Gray_16" will also affect the type of data written to the output file.