Version=n.n | Set initial language compatibility to version n.n |
+MVn.n | Same as Version=n.n |
While many language changes have been made for POV-Ray 3.0, all of version 2.0 syntax and most of version 1.0 syntax still works. Whenever possible we try to maintain backwards compatibility. One feature introduced in 2.0 that was incompatible with any 1.0 scene files is the parsing of float expressions. Setting Version=1.0 or using +MV1.0 turns off expression parsing as well as many warning messages so that nearly all 1.0 files will still work. The changes between 2.0 and 3.0 are not as extensive. Setting Version=2.0 is only necessary to eliminate some warning messages. Naturally the default setting for this option is Version=3.0.
The #version language directive can also be used to change modes several times within scene files. The above options affect only the initial setting. See section "Version Directive" for more details about the language version directive.
Remove_Bounds=bool | Turn unnecessary bounds removal on/off |
+UR | Turn unnecessary bounds removal on |
-UR | Turn unnecessary bounds removal off |
Split_Unions=bool | Turn split bounded unions on/off |
+SU | Turn split bounded unions on |
-SU | Turn split bounded unions off |
Early versions of POV-Ray had no system of automatic bounding or spatial sub-division to speed up ray-object intersection tests. Users had to manually create bounding boxes to speed up the rendering. POV-Ray 3.0 has more sophisticated automatic bounding than any previous version. In many cases the manual bounding on older scenes is slower than the new automatic systems. Therefore POV-Ray removes manual bounding when it knows it will help. In rare instances you may want to keep manual bounding. Some older scenes incorrectly used bounding when they should have used clipping. If POV-Ray removes the bounds in these scenes the image will not look right. To turn off the automatic removal of manual bounds you should specify Remove_Bounds=off or use -UR. The default is Remove_Bounds=on.
One area where the jury is still out is the splitting of manually bounded unions. Unbounded unions are always split into their component parts so that automatic bounding works better. Most users do not bound unions because they know that doing so is usually slower. If you do manually bound a union we presume you really want it bound. For safety sake we do not presume to remove such bounds. If you want to remove manual bounds from unions you should specify Split_Unions=on or use +SU. The default is Split_Unions=off.
Pre_Scene_Command=s | Set command before entire scene |
Pre_Frame_Command=s | Set command before each frame |
Post_Scene_Command=s | Set command after entire scene |
Post_Frame_Command=s | Set command after each frame |
User_Abort_Command=s | Set command when user aborts POV-Ray |
Fatal_Error_Command=s | Set command when POV-Ray has fatal error |
Note that no +/- switches are available for these options. They cannot be used from the command line. They may only be used from INI files.
would use the utility tga2gif with the -D and -M parameters to convert myfile.tga to myfile.gif after the scene had finished rendering.
POV-Ray will substitute the %s with the scene name in the command. The scene name is the Input_File_Name or +I setting with any drive, directory or extension removed. For example:
is stripped down to the scene name waycool which results in...
In an animation it may be necessary to have the exact output file name with the frame number included. The string %o will substitute the output file name. Suppose you want to save your output files in a zip archive using pkzip. You could do...
After rendering frame 12 of myscene.pov POV-Ray would shell to the operating system with "pkzip -m myscene mysce012.tga". The -M switch in pkzip moves mysce012.tga to myscene.zip and removes it from the directory. Note that %o includes frame numbers only when in an animation loop. During the Pre_Scene_Command and Post_Scene_Command there is no frame number so the original, unnumbered Output_File_Name is used. Any User_Abort_Command or Fatal_Error_Command not inside the loop will similarly give an unnumbered %o substitution.
Here is the complete list of substitutions available for a common string.
%o | Output file name with extension and embedded frame number if any |
%s | Scene name derived by stripping path and ext from input name |
%n | Frame number of this frame |
%k | Clock value of this frame |
%h | Height of image in pixels |
%w | Width of image in pixels |
%% | A single % sign. |
1) Process all INI file keywords and command line switches just once. 2) Open any text output streams and do Create_INI if any. 3) Execute Pre_Scene_Command if any. 4) Loop through frames (or just do once on non-animation). a) Execute Pre_Frame_Command if any. b) Parse entire scene file, open output file and read settings, turn on display, render the frame, destroy all objects, textures etc., close output file, close display. c) Execute Post_Frame_Command if any. d) Go back to 4 a until all frames are done. 5) Execute Post_Scene_Command if any. 6) Exit POV-Ray.
If the user interrupts processing the User_Abort_Command, if any, is executed. User aborts can only occur during the parsing and rendering parts of step 4 a above.
If a fatal error occurs that POV-Ray notices the Fatal_Error_Command, if any, is executed. Sometimes an unforeseen bug or memory error could cause a total crash of the program in which case there is no chance to shell out. Fatal errors can occur just about anywhere including during the processing of switches or INI files. If a fatal error occurs before POV-Ray has read the Fatal_Error_Command string then obviously no shell can occur.
Note that the entire scene is re-parsed for every frame. Future versions of POV-Ray may allow you to hold over parts of a scene from one frame to the next but for now it starts from scratch every time. Note also that the Pre_Frame_Command occurs before the scene is parsed. You might use this to call some custom scene generation utility before each frame. This utility could rewrite your .pov or .inc files if needed. Perhaps you will want to generate new .gif or .tga files for image maps or height fields on each frame.
Pre_Scene_Return=s | Set pre scene return actions |
Pre_Frame_Return=s | Set pre frame return actions |
Post_Scene_Return=s | Set post scene return actions |
Post_Frame_Return=s | Set post frame return actions |
User_Abort_Return=s | Set user abort return actions |
Fatal_Error_Return=s | Set fatal return actions |
Note that no +/- switches are available for these options. They cannot be used from the command line. They may only be used from INI files.
The actions are designated by a single letter in the different ..._Return=s options. The possible actions are:
I | ignore the code |
S | skip one step |
A | all steps skipped |
Q | quit POV-Ray immediately |
U | generate a user abort in POV-Ray |
F | generate a fatal error in POV-Ray |
For example if your Pre_Frame_Command calls a program which generates your height field data and that utility fails then it will return a non-zero code. We would probably want POV-Ray to abort as well. The option Pre_Frame_Return=F will cause POV-Ray to do a fatal abort if the Pre_Frame_Command returns a non-zero code.
Sometimes a non-zero code from the external process is a good thing. Suppose you want to test if a frame has already been rendered. You could use the S action to skip this frame if the file is already rendered. Most utilities report an error if the file is not found. For example the command pkzip -V myscene mysce012.tga tells pkzip you want to view the catalog of myscene.zip for the file mysce012.tga. If the file isn't in the archive pkzip returns a non-zero code.
Pre_Frame_Return=S will skip if the code shows error (non-zero) and will proceed normally on no error (zero). Pre_Frame_Return=-S will skip if there is no error (zero) and will proceed normally if there is an error (non-zero).
On return from any User_Abort_Command if there is an action triggered and you have specified...
F | then turn this user abort into a fatal error. Do the Fatal_Error_Command, if any. Exit POV-Ray with error code 1. |
S, A, Q, or U | then proceed with the user abort. Exit POV-Ray with error code 2. |
On return from any Fatal_Error_Command proceed with the fatal error no matter what. Exit POV-Ray with error code 1. On return from any Pre_Scene_Command, Pre_Frame_Command, Post_Frame_Command or Post_Scene_Commands if there is an action triggered and you have specified...
F | then generate a fatal error. Do the Fatal_Error_Command, if any. Exit POV-Ray with an error code 1. |
U | then generate a user abort. Do the User_Abort_Command, if any. Exit POV-Ray with an error code 2. |
Q | then quit POV-Ray immediately. Acts as though POV-Ray never really ran. Do no further shells, (not even Post_Scene_Command) and exit POV-Ray with an error code 0. |
On return from a Pre_Scene_Command if there is an action triggered and you have specified...
S | then skip rendering all frames. Acts as though the scene completed all frames normally. Do not do any Pre_Frame_Command or Post_Frame_Commands. Do the Post_Scene_Command, if any. Exit POV-Ray with error code 0. On the earlier chart this means skip step #4. |
A | then skip all scene activity. Works exactly like Q quit. On the earlier chart this means skip to step #6. |
On return from a Pre_Frame_Command if there is an action triggered and you have specified...
S | then skip only this frame. Acts as though this frame never existed. Do not do the Post_Frame_Command. Proceed with the next frame. On the earlier chart this means skip steps #4b and #4c but loop back as needed in #4d. |
A | then skip rendering this frame and all remaining frames. Acts as though the scene completed all frames normally. Do not do any further Post_Frame_Commands. Do the Post_Scene_Command, if any. Exit POV-Ray with error code 0. On the earlier chart this means skip the rest of step #4 and proceed at step #5. |
On return from a Post_Frame_Command if there is an action triggered and you have specified...
S | then skip rendering all remaining frames. Acts as though the scene completed all frames normally. Do the Post_Scene_Command, if any. Exit POV-Ray with error code 0. On the earlier chart this means skip the rest of step #4 and proceed at step #5. |
A | same as S for this shell command. |
On return from any Post_Scene_Command if there is an action triggered and you have specified...
S or A | same as I for this shell command. |
Here is a description of each stream.
BANNER: This stream displays the program's sign-on banner, copyright, contributor's list, and some help screens. It cannot be turned off or directed to a file because most of this text is displayed before any options or switches are read. Therefore you cannot use an option or switch to control it. There are switches which display the help screens. They are covered in section "Help Screen Switches".
DEBUG: This stream displays debugging messages. It was primarily designed for developers but this and other streams may also be used by the user to display messages from within their scene files. See section "Text Message Streams" for details on this feature. This stream may be turned off and/or directed to a text file.
RENDER: This stream displays information about what options you have specified to render the scene. It includes feedback on all of the major options such as scene name, resolution, animation settings, anti-aliasing and others. This stream may be turned off and/or directed to a text file.
STATISTICS: This stream displays statistics after a frame is rendered. It includes information about the number of rays traced, the length of time of the processing and other information. This stream may be turned off and/or directed to a text file.
STATUS: This stream displays one-line status messages that explain what POV-Ray is doing at the moment. On some systems this stream is displayed on a status line at the bottom of the screen. This stream cannot be directed to a file because there is generally no need to. The text displayed by the Verbose option or +V switch is output to this stream so that part of the status stream may be turned off.
WARNING: This stream displays warning messages during the parsing of scene files and other warnings. Despite the warning, POV-Ray can continue to render the scene. You will be informed if POV-Ray has made any assumptions about your scene so that it can proceed. In general any time you see a warning, you should also assume that this means that future versions of POV-Ray will not allow the warned action. Therefore you should attempt to eliminate warning messages so your scene will be able to run in future versions of POV-Ray. This stream may be turned off and/or directed to a text file.