Difference between revisions of "Documentation:Unix Section 5"

From POV-Wiki
Jump to navigation Jump to search
m (Protected "Documentation:Unix Section 5" [edit=sysop:move=sysop])
m (→‎INI Files: canonicalize a version number)
 
(4 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
<br>
 
<br>
 
<!--</wikitalk>--->
 
<!--</wikitalk>--->
===Understanding File Types===
+
==Understanding File Types==
<p>
+
<p>This section points out the various types of text files that POV-Ray for Unix works with.</p>
This section points out the various types of text files that POV-Ray for Unix works with.
+
 
</p>
 
 
===POV Files===
 
===POV Files===
<p>
+
<p>POV-Ray for Unix works with two types of plain text files.</p>
POV-Ray for Unix works with two types of plain text files. The first is the standard
+
 
POV-Ray scene description file. Although you may give files of this type any legitimate file
+
<p>The first is the standard POV-Ray scene description file. Although you may give files of this type any legitimate file name, it is easiest if you give them the <code>.pov</code> extension. In this Help file, scene description files are referred to as POV files.</p>
name, it is easiest if you give them the .pov extension. In this Help file, scene description
+
 
files are referred to as POV files.
+
<p>The second type, the initialization file. Initialization files normally have <code>.ini</code> extensions and are referred to in this help file as INI files.</p>
</p>
 
<p>
 
The second type, the initialization file, is new to POV-Ray 3. Initialization files normally
 
have .ini extensions and are referred to in this help file as INI files.
 
</p>
 
  
 
===INI Files===
 
===INI Files===
<p>
+
<p>An INI file is a text file containing settings for what used to be called POV-Ray command-line options. It replaces and expands on the functions of the DEF files associated with previous versions of POV-Ray. You can store a default set of options in the main POV-Ray INI file which is searched for at the following locations:</p>
An INI file is a text file containing settings for what used to be called POV-Ray command-line
 
options. It replaces and expands on the functions of the DEF files associated with previous
 
versions of POV-Ray. You can store a default set of options in the main POV-Ray INI file
 
which is searched for at the following locations:
 
</p>
 
  
 
<ul>
 
<ul>
<li>
+
<li>The place defined by the <code>POVINI</code> environment variable.</li>
The place defined by the <code>POVINI</code> environment variable. When you want
+
<li><code>./povray.ini</code> </li>
to use an INI file at a custom location you can set this environment variable.
+
<li><code>$HOME/.povray/vX.y/povray.ini</code></li>
</li>
+
<li><code>$PREFIX/etc/povray/vX.y/povray.ini</code> (<code>$PREFIX</code> by default is <code>/usr/local</code>)</li>
<li>
 
<code>./povray.ini</code>  
 
</li>
 
<li>
 
<code>$HOME/.povray/3.6/povray.ini</code>  
 
</li>
 
<li>
 
<code>PREFIX/etc/povray/3.6/povray.ini</code> (<code>PREFIX</code> by default
 
is <code>/usr/local</code>)
 
</li>
 
 
</ul>
 
</ul>
  
<p>
+
<p>For backwards compatibility with version 3.5, POV-Ray v3.7 and later also attempt to read the main INI file from the old locations when none is found at the places above:</p>
For backwards compatibility with version 3.5, POV-Ray 3.6 also attempts to read  
 
the main INI file from the old locations when none is found at the places above:
 
</p>
 
  
 
<ul>
 
<ul>
<li>
+
<li><code>$HOME/.povrayrc</code></li>
<code>$HOME/.povrayrc</code>  
+
<li><code>$PREFIX/etc/povray.ini</code> (<code>$PREFIX</code> by default is <code>/usr/local</code>)</li>
</li>
 
<li>
 
<code>PREFIX/etc/povray.ini</code> (<code>PREFIX</code> by default
 
is <code>/usr/local</code>)
 
</li>
 
 
</ul>
 
</ul>
  
<p class="Note"><strong>Note:</strong>
+
<p class="Note"><strong>Note:</strong> Use of these locations is deprecated, they will not be available in future versions.</p>
Use of these locations is deprecated, they will not be available in future versions.
+
 
</p>
+
<p>Any other INI file can be specified by passing the INI file name on the command line.</p>
 +
 
 +
<p>One of the options you can set in the INI file is the name of an input file. You can specify the name of a POV file here. This way you can customize POV-Ray settings for any individual scene file.</p>
 +
 
 +
<p>For instance, if you have a file called scene.pov, you can create a file scene.ini to contain settings specific for scene.pov. If you include the option <code>Input_File_Name=scene.pov</code> in scene.ini, and then run <code>povray scene.ini</code>, POV-Ray will process scene.pov with the options specified in scene.ini.</p>
 +
 
 +
<p>Remember, though, that any options set at the command line when you activate an INI file override any corresponding options in the INI file, see the section <!--<linkto "Understanding POV-Ray Options">Understanding POV-Ray Options</linkto>--->[[Documentation:Unix Section 6#Understanding POV-Ray Options|Understanding POV-Ray Options]]. Any options you do not set in the INI file will be taken as last set by any other INI file or as originally determined in <code>povray.ini</code>.</p>
  
<p>
+
<p>You can instruct POV-Ray to generate an INI file containing all the options active at the time of rendering. This way, you can pass a POV file and its associated INI file on to another person and be confident that they will be able to generate the scene exactly the same way you did. See the section <!--<linkto "Using INI files">Using INI Files</linkto>--->[[Documentation:Tutorial Section 2.2#Using INI Files|Using INI Files]] for more information.
Any other INI file can be specified by passing the INI file name on the command line.
 
</p>
 
<p>
 
One of the options you can set in the INI file is the name of an input file. You can specify
 
the name of a POV file here. This way you can customize POV-Ray
 
settings for any individual scene file.
 
</p>
 
<p>
 
For instance, if you have a file called scene.pov, you can create a file scene.ini to contain
 
settings specific for scene.pov. If you include the option 'Input_File_Name=scene.pov' in
 
scene.ini, and then run <code>povray scene.ini</code>, POV-Ray will process scene.pov with the
 
options specified in scene.ini.
 
</p>
 
<p>
 
Remember, though, that any options set at the command line when you
 
activate an INI file override any corresponding options in the INI file (see
 
<!--<linkto "Understanding POV-Ray Options">Understanding POV-Ray Options</linkto>--->[[Documentation:Unix Section 6#Understanding POV-Ray Options|Understanding POV-Ray Options]]).
 
Also, any options you do not set in the INI file
 
will be taken as last set by any other INI file or as originally determined in
 
<code>povray.ini</code>.
 
</p>
 
<p>
 
You can instruct POV-Ray to generate an INI file containing all the options active at the time
 
of rendering. This way, you can pass a POV file and its associated INI file on to another
 
person and be confident that they will be able to generate the scene exactly the same way you
 
did. See the section titled <!--<linkto "Using INI files">Using INI Files</linkto>--->[[Documentation:Tutorial Section 2.2#Using INI Files|Using INI Files]] for more information
 
about INI files.
 
 
</p>
 
</p>
  
===INI File Sections===
+
====INI File Sections====
<p>
+
<p>Sections are not files in themselves; they are portions of INI files. Sections are a means of grouping multiple sets of POV-Ray options together in a single INI file, by introducing them with a section label. Consider the following INI file, taken from the POV-Ray 3 documentation:</p>
Sections are not files in themselves; they are portions of INI files. Sections are a means of
 
grouping multiple sets of POV-Ray options together in a single INI file, by introducing them
 
with a section label. Consider the following INI file, taken from the POV-Ray 3 documentation:
 
</p>
 
  
 
<pre>
 
<pre>
Line 127: Line 73:
 
</pre>
 
</pre>
  
<p>
+
<p>If you select this INI file, the default resolution setting will be 120 x 100. As soon as you select the <code>[High]</code> section, however, the resolution becomes 640 x 480.</p>
If you select this INI file, the default resolution setting will be 120 x 100. As soon as you
 
select the <code>[High]</code> section, however, the resolution becomes 640 x 480.
 
</p>
 
  
<p>
+
<p>For more information on POV-Ray options and INI files consult the section on <!--<linkto "Setting POV-Ray Options">POV-Ray Options</linkto>--->[[Documentation:Tutorial Section 2.2#Setting POV-Ray Options|Setting POV-Ray Options]].
For more information on POV-Ray options and INI files consult the section on
 
<!--<linkto "Setting POV-Ray Options">POV-Ray Options</linkto>--->[[Documentation:Tutorial Section 2.2#Setting POV-Ray Options|POV-Ray Options]].
 
 
</p>
 
</p>
  

Latest revision as of 15:40, 9 June 2021

This document is protected, so submissions, corrections and discussions should be held on this documents talk page.


Understanding File Types

This section points out the various types of text files that POV-Ray for Unix works with.

POV Files

POV-Ray for Unix works with two types of plain text files.

The first is the standard POV-Ray scene description file. Although you may give files of this type any legitimate file name, it is easiest if you give them the .pov extension. In this Help file, scene description files are referred to as POV files.

The second type, the initialization file. Initialization files normally have .ini extensions and are referred to in this help file as INI files.

INI Files

An INI file is a text file containing settings for what used to be called POV-Ray command-line options. It replaces and expands on the functions of the DEF files associated with previous versions of POV-Ray. You can store a default set of options in the main POV-Ray INI file which is searched for at the following locations:

  • The place defined by the POVINI environment variable.
  • ./povray.ini
  • $HOME/.povray/vX.y/povray.ini
  • $PREFIX/etc/povray/vX.y/povray.ini ($PREFIX by default is /usr/local)

For backwards compatibility with version 3.5, POV-Ray v3.7 and later also attempt to read the main INI file from the old locations when none is found at the places above:

  • $HOME/.povrayrc
  • $PREFIX/etc/povray.ini ($PREFIX by default is /usr/local)

Note: Use of these locations is deprecated, they will not be available in future versions.

Any other INI file can be specified by passing the INI file name on the command line.

One of the options you can set in the INI file is the name of an input file. You can specify the name of a POV file here. This way you can customize POV-Ray settings for any individual scene file.

For instance, if you have a file called scene.pov, you can create a file scene.ini to contain settings specific for scene.pov. If you include the option Input_File_Name=scene.pov in scene.ini, and then run povray scene.ini, POV-Ray will process scene.pov with the options specified in scene.ini.

Remember, though, that any options set at the command line when you activate an INI file override any corresponding options in the INI file, see the section Understanding POV-Ray Options. Any options you do not set in the INI file will be taken as last set by any other INI file or as originally determined in povray.ini.

You can instruct POV-Ray to generate an INI file containing all the options active at the time of rendering. This way, you can pass a POV file and its associated INI file on to another person and be confident that they will be able to generate the scene exactly the same way you did. See the section Using INI Files for more information.

INI File Sections

Sections are not files in themselves; they are portions of INI files. Sections are a means of grouping multiple sets of POV-Ray options together in a single INI file, by introducing them with a section label. Consider the following INI file, taken from the POV-Ray 3 documentation:

; RES.INI
; This sample INI file is used to set resolution.

+W120 +H100 ; This section has no label.
; Select it with "RES"

[Low]
+W80 +H60 ; This section has a label.
; Select it with "RES[Low]"

[Med]
+W320 +H200 ; This section has a label.
; Select it with "RES[Med]"

[High]
+W640 +H480 ; Labels are not case sensitive.
; "RES[high]" works

[Really High]
+W800 +H600 ; Labels may contain blanks

If you select this INI file, the default resolution setting will be 120 x 100. As soon as you select the [High] section, however, the resolution becomes 640 x 480.

For more information on POV-Ray options and INI files consult the section on Setting POV-Ray Options.


Example configuration file Understanding POV-Ray Options


This document is protected, so submissions, corrections and discussions should be held on this documents talk page.