Difference between revisions of "Reference:Scene Parsing Options"

From POV-Wiki
Jump to navigation Jump to search
m (indexentry tag repair)
m (removed redundant and added link)
 
(6 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
assumptions it should make while parsing it.</p>
 
assumptions it should make while parsing it.</p>
  
 +
==Constant==
 
{{#indexentry:ini files, constant}}
 
{{#indexentry:ini files, constant}}
 
{{#indexentry:Declare, ini-option}}
 
{{#indexentry:Declare, ini-option}}
==Constant==
 
 
<table width="100%" class="option-list">
 
<table width="100%" class="option-list">
 
<tr>
 
<tr>
Line 41: Line 41:
 
     ...
 
     ...
 
     }
 
     }
#end
+
  #end
}
+
  }
</pre>
 
 
 
==Input File Name==
 
<table width="100%" class="option-list">
 
<tr>
 
<td width="30%"><code>Input_File_Name=</code>file{{#indexentry:Input_File_Name, ini-option}}</td>
 
 
 
<td width="70%">Sets input file name to file</td>
 
</tr>
 
 
 
<tr>
 
<td><code>+I</code>file{{#indexentry:+i}}</td>
 
 
 
<td>Same as <code>Input_File_Name=</code>file</td>
 
</tr>
 
</table>
 
<p class="Note"><strong>Note:</strong> There may be no space between <code>+I</code> and <code>file</code>.</p>
 
<p>You will probably always set this option but if you do not the default
 
input filename is <code>object.pov</code>. If you do not have an extension
 
then <code>.pov</code> is assumed. On case-sensitive operating systems both
 
<code>.pov</code> and <code>.POV</code> are tried. A full path specification
 
may be used (on MS-DOS systems <code> +Ic:\povray3\mystuff\myfile.pov</code>
 
is allowed for example). In addition to specifying the input file name this
 
also establishes the <em>scene name</em>.</p>
 
<p>
 
The scene name is the input name with drive, path and extension stripped. In
 
the above example the scene name is <code>myfile</code>. This name is used to
 
create a default output file name and it is referenced other places.</p>
 
<p class="Note"><strong>Note:</strong> As of version 3.5 you can now specify a POV file on the command-line
 
without the use of the +i switch (i.e. it works the same way as specifying an INI
 
file without a switch), the POV file then should be the last on the command-line.</p>
 
<p>
 
If you use &quot;-&quot; as the input file name the input will be read from
 
standard input. Thus you can pipe a scene created by a program to POV-Ray and
 
render it without having a scene file.</p>
 
<p>
 
Under MS-DOS you can try this feature by typing.</p>
 
<pre>
 
type ANYSCENE.POV | povray +I-
 
 
</pre>
 
</pre>
 
==Include File Name==
 
==Include File Name==
Line 101: Line 62:
 
scene file. You can for example use this option to always include a specific
 
scene file. You can for example use this option to always include a specific
 
set of default include files used by all your scenes.</p>
 
set of default include files used by all your scenes.</p>
 +
 
==Library Paths==
 
==Library Paths==
{{#indexentry:Include Path|Include Files, finding|Finding include files|Search Path|Path, include files}}
+
{{#indexentry:Include Path}}
 +
{{#indexentry:Include Files, finding}}
 +
{{#indexentry:Finding include files}}
 +
{{#indexentry:Search Path}}
 +
{{#indexentry:Path, include files}}
  
 
<table width="100%" class="option-list">
 
<table width="100%" class="option-list">
Line 148: Line 114:
 
</table>
 
</table>
  
<p>As POV-Ray has evolved from version 1.0 through to today we have made every
+
<p>See also: [[Reference:Version Directive|Version Directive]]</p>
effort to maintain some amount of backwards compatibility with earlier
 
versions. Some old or obsolete features can be handled directly without any
 
special consideration by the user. Some old or obsolete features can no
 
longer be handled at all. However <em>some</em> old features can still be
 
used if you warn POV-Ray that this is an older scene. In the POV-Ray scene
 
language you can use the <code>#version</code> directive to switch version
 
compatibility to different settings. See section [[Reference:Version Directive|:#version|The #version Directive]]
 
for more details about the language version directive.
 
Additionally you may use the <code>Version=</code><em>n.n</em> option or the
 
<code>+MV</code><em>n.n</em> switch to establish the <em>initial</em>
 
setting. For example one feature introduced in 2.0 that was incompatible with
 
any 1.0 scene files is the parsing of float expressions. Setting <code>
 
Version=1.0</code> or using <code>+MV1.0</code> turns off expression parsing
 
as well as many warning messages so that nearly all 1.0 files will still
 
work. Naturally the default setting for this option is the current version number.</p>
 
 
 
<p class="Warning">The version directive and command-line setting no longer provide compatibility with most rendering bugs in versions prior to POV-Ray 3.5. However, compatibility with the scene language is provided for scenes as old as POV-Ray 1.0 just as in all previous versions of POV-Ray. Nevertheless, we strongly recommend you update scenes at least to POV-Ray 3.5 syntax if you plan to use them in future versions of POV-Ray.</p>
 

Latest revision as of 00:07, 1 October 2018

POV-Ray reads in your scene file and processes it to create an internal model of your scene. The process is called parsing. As your file is parsed other files may be read along the way. This section covers options concerning what to parse, where to find it and what version specific assumptions it should make while parsing it.

Constant

Declare=IDENTIFIER=FLOAT Declares an identifier with a float value

You can now declare a constant in an INI file, and that constant will be available to the scene. Since INI file statements may also be laced on the command-line, you can therefore also declare on the command-line (though there is no switch for it).

  Declare=MyValue=24 

This would be the same as a #declare MyValue=24; in a scene file. The value on the right-hand side must be a constant float value.

A possible use could be switching off radiosity or photons from command-line:

--in INI-file / on command-line

Declare=RAD=0

--in scenefile

global_settings {
  #if (RAD)
    radiosity {
    ...
    }
  #end
  }

Include File Name

Include_Header=file
Sets primary include file name to file
+HIfile
Same as Include_Header=file

This option allows you to include a file as the first include file of a scene file. You can for example use this option to always include a specific set of default include files used by all your scenes.

Library Paths

Library_Path=path
Add path to list of library paths
+Lpath
Same as Library_Path=path

POV-Ray looks for files in the current directory. If it does not find a file it needs it looks in various other library directories which you specify. POV-Ray does not search your operating system path. It only searches the current directory and directories which you specify with this option. For example the standard include files are usually kept in one special directory. You tell POV-Ray to look there with...

Library_Path=c:\povray3\include

You must not specify any final path separators ("\" or "/") at the end.

Multiple uses of this option switch do not override previous settings. If you specify the exact same path twice it is only counted once. The current directory will be searched first followed by the indicated library directories in the order in which you specified them.

Language Version

Version=n.n
Set initial language compatibility to version n.n
+MVn.n
Same as Version=n.n

See also: Version Directive