Documentation Talk:Reference Section 1
Command-line Options
The reference section describes all command line switches and INI file keywords that are used to set the options of POV-Ray. It is supposed to be used as a reference for looking up things. It does not contain detailed explanations on how scenes are written or how POV-Ray is used. It just explains all features, their syntax, applications, limits, drawbacks, etc.
Options may be specified by switches
or INI-style options. Almost all INI-style options have equivalent
+
/ -
switches and most switches have equivalent INI-style
option. The following sections give a detailed description of each POV-Ray
option. It includes both the INI-style settings and the +
/
-
switches.
The notation and terminology used is described in the tables below.
Keyword= bool |
Turn Keyword on if bool equals true ,
|
Keyword=true |
Do this option if true , yes , on
or 1 is specified. |
Keyword=false |
Do this option if false , no ,
off or 0 is specified. |
Keyword= filename |
Set Keyword to filename where filename is any valid file
name. Note: some options prohibit the use of any of the above |
n | Any integer such as in +W320 |
n.n | Any float such as in Clock=3.45 |
0.n | Any float < 1.0 even if it has no leading 0 |
s | Any string of text |
x or y | Any single character |
path | Any directory name, drive optional, no final path separator ("\" or "/", depending on the operating system) |
Unless otherwise specifically noted, you may assume that either a plus or minus sign before a switch will produce the same results.
Animation Options
Internal animation loop, automatic output file name numbering and the ability to shell out to the operating system to external utilities which can assemble individual frames into an animation, greatly improved the animation capability. The internal animation loop is simple yet flexible. You may still use external programs or batch files to create animations without the internal loop.
External Animation Loop
Clock= n.n |
Sets clock float identifier to n.n |
+K n.n |
Same as Clock= n.n |
The Clock=
n.n option or the
+K
n.n switch may be used to pass a single float value to the
program for basic animation. The value is stored in the float identifier
clock
. If an object had a rotate <0,clock,0>
attached then you could rotate the object by different amounts over different
frames by setting +K10.0
,+K20.0
... etc. on
successive renderings. It is up to the user to repeatedly invoke POV-Ray with
a different Clock
value and a different
Output_File_Name
for each frame.
Internal Animation Loop
Initial_Frame= n |
Sets initial frame number to n |
Final_Frame= n |
Sets final frame number to n |
Initial_Clock= n.n |
Sets initial clock value to n.n |
Final_Clock= n.n |
Sets final clock value to n.n |
+KFI n |
Same as Initial_Frame= n |
+KFF n |
Same as Final_Frame= n |
+KI n.n |
Same as Initial_Clock= n.n |
+KF n.n |
Same as Final_Clock= n.n |
The internal animation loop relieves the user of the
task of generating complicated sets of batch files to invoke POV-Ray multiple
times with different settings. While the multitude of options may look
intimidating, the clever set of default values means that you will probably
only need to specify the Final_Frame
=n or the
+KFF
n option to specify the number of frames. All other
values may remain at their defaults.
Any Final_Frame
setting other than -1 will trigger
POV-Ray's internal animation loop. For example
Final_Frame=10
or +KFF10
causes POV-Ray to render your
scene 10 times. If you specified Output_File_Name=file.tga
then each frame would be output as file01.tga
, file02.tga
,
file03.tga
etc. The number of zero-padded digits in the file name
depends upon the final frame number. For example +KFF100
would
generate file001.tga
through file100.tga
. The frame
number may encroach upon the file name. On MS-DOS with an eight character limit,
myscene.pov
would render to mysce001.tga
through
mysce100.tga
.
The default Initial_Frame=1
will probably never have to be
changed. You would only change it if you were assembling a long animation
sequence in pieces. One scene might run from frame 1 to 50 and the next from
51 to 100. The Initial_Frame
=n or
+KFI
n option is for this purpose.
Note: if you wish to render a subset of frames such as 30 through 40 out
of a 1 to 100 animation, you should not change Initial_Frame
or
Final_Frame
. Instead you should use the subset commands
described in section "Subsets of Animation Frames".
Unlike some animation packages, the action in POV-Ray animated scenes does
not depend upon the integer frame numbers. Rather you should design your
scenes based upon the float identifier clock
. By default, the
clock value is 0.0 for the initial frame and 1.0 for the final frame. All
other frames are interpolated between these values. For example if your
object is supposed to rotate one full turn over the course of the animation,
you could specify rotate 360*clock*y
. Then as clock runs from
0.0 to 1.0, the object rotates about the y-axis from 0 to 360 degrees.
The major advantage of this system is that you can render a 10 frame animation or a 100 frame or 500 frame or 329 frame animation yet you still get one full 360 degree rotation. Test renders of a few frames work exactly like final renders of many frames.
In effect you define the motion over a continuous float valued parameter (the clock) and you take discrete samples at some fixed intervals (the frames). If you take a movie or video tape of a real scene it works the same way. An object's actual motion depends only on time. It does not depend on the frame rate of your camera.
Many users have already created scenes for POV-Ray 2 that expect clock
values over a range other than the default 0.0 to 1.0. For this reason we
provide the Initial_Clock
=n.n
or +KI
n.n and Final_Clock
=n.n
or +KF
n.n options. For example to run the clock from 25.0 to
75.0 you would specify Initial_Clock=25.0
and Final_Clock=75.0
.
Then the clock would be set to 25.0 for the initial frame and 75.0 for the final frame.
In-between frames would have clock values interpolated from 25.0 through 75.0 proportionally.
Users who are accustomed to using frame numbers rather than clock values
could specify Initial_Clock=1.0
and Final_Clock=10.0
and Frame_Final=10
for a 10 frame animation.
For new scenes, we recommend you do not change the
Initial_Clock
or Final_Clock
from their default 0.0 to
1.0 values. If you want the clock to vary over a different range than the
default 0.0 to 1.0, we recommend you handle this inside your scene file as
follows...
#declare Start = 25.0; #declare End = 75.0; #declare My_Clock = Start+(End-Start)*clock;
Then use My_Clock
in the scene description. This keeps the
critical values 25.0 and 75.0 in your .pov file.
Note: more details concerning the inner workings of the animation loop are in the section on shell-out operating system commands in section "Shell-out to Operating System".
Subsets of Animation Frames
Subset_Start_Frame= n
| Set subset starting frame to n |
Subset_Start_Frame= 0.n |
Set subset starting frame to n percent |
Subset_End_Frame= n
| Set subset ending frame to n |
Subset_End_Frame= 0.n |
Set subset ending frame to n percent |
+SF 0.n
| Same as Subset_Start_Frame |
+EF 0.n
| Same as Subset_End_Frame |
When creating a long animation, it may be handy to render only a portion
of the animation to see what it looks like. Suppose you have 100 frames but
only want to render frames 30 through 40. If you set Initial_Frame=30
and Final_Frame=40
then the clock would vary from 0.0 to 1.0 from
frames 30 through 40 rather than 0.30 through 0.40 as it should. Therefore
you should leave Initial_Frame=1
and Final_Frame=100
and use Subset_Start_Frame=30
and Subset_End_Frame=40
to selectively render part of the scene. POV-Ray will then properly compute the
clock values.
Usually you will specify the subset using the actual integer frame numbers
however an alternate form of the subset commands takes a float value in the
range 0.0 <=n.nnn <=1.0 which is interpreted as a fraction of
the whole animation. For example, Subset_Start_Frame=0.333
and
Subset_End_Frame=0.667
would render the middle 1/3rd of a
sequence regardless of the number of frames.
Cyclic Animation
Cyclic_Animation= bool
| Turn cyclic animation on/off |
+KC
| Turn cyclic animation on |
-KC
| Turn cyclic animation off |
Many computer animation sequences are designed to be run in a continuous
loop. Suppose you have an object that rotates exactly 360 degrees over the
course of your animation and you did rotate 360*clock*y
to do
so. Both the first and last frames would be identical. Upon playback there
would be a brief one frame jerkiness. To eliminate this problem you need to
adjust the clock so that the last frame does not match the first. For example
a ten frame cyclic animation should not use clock 0.0 to 1.0. It should run
from 0.0 to 0.9 in 0.1 increments. However if you change to 20 frames it
should run from 0.0 to 0.95 in 0.05 increments. This complicates things
because you would have to change the final clock value every time you changed
Final_Frame
. Setting Cyclic_Animation=on
or using
+KC
will cause POV-Ray to automatically adjust the final clock
value for cyclic animation regardless of how many total frames. The default
value for this setting is off.
Field Rendering
Field_Render= bool
| Turn field rendering on/off |
Odd_Field= bool
| Set odd field flag |
+UF
| Turn field rendering on |
-UF
| Turn field rendering off |
+UO
| Set odd field flag on |
-UO
| Set odd field flag off |
Field rendering is sometimes used for animations when the animation is being output for television. TVs only display alternate scan lines on each vertical refresh. When each frame is being displayed the fields are interlaced to give the impression of a higher resolution image. The even scan lines make up the even field, and are drawn first (i.e. scan lines 0, 2, 4, etc.), followed by the odd field, made up of the odd numbered scan lines are drawn afterwards. If objects in an animation are moving quickly, their position can change noticeably from one field to the next. As a result, it may be desirable in these cases to have POV-Ray render alternate fields at the actual field rate (which is twice the frame rate), rather than rendering full frames at the normal frame rate. This would save a great deal of time compared to rendering the entire animation at twice the frame rate, and then only using half of each frame.
By default, field rendering is not used. Setting
Field_Render=on
or using +UF
will cause alternate frames
in an animation to be only the even or odd fields of an animation. By
default, the first frame is the even field, followed by the odd field. You
can have POV-Ray render the odd field first by specifying
Odd_Field=on
, or by using the +UO
switch.
General Output Options
Height and Width of Output
Height= n
| Sets screen height to n pixels |
Width= n
| Sets screen width to n pixels |
+H n
| Same as Height= n |
+W n
| Same as Width= n |
These switches set the height and width of the image in pixels. This specifies the image size for file output. The preview display, if on, will generally attempt to pick a video mode to accommodate this size but the display settings do not in any way affect the resulting file output.
Partial Output Options
Start_Column= n
| Set first column to n pixels |
Start_Column= 0.n |
Set first column to n percent of width |
+SC 0.n
| Same as Start_Column |
Start_Row= n
| Set first row to n pixels |
Start_Row= 0.n |
Set first row to n percent of height |
+S n
| Same as Start_Row= n |
+SR 0.n or +S 0.n |
Same as Start_Row= 0.n |
End_Column= n
| Set last column to n pixels |
End_Column= 0.n |
Set last column to n percent of width |
+EC 0.n
| Same as End_Column |
End_Row= n
| Set last row to n pixels |
End_Row= 0.n |
Set last row to n percent of height |
+E n
| Same as End_Row= n |
+ER 0.n or +E 0.n |
Same as End_Row= 0.n |
When doing test rendering it is often convenient to define a small,
rectangular sub-section of the whole screen so you can quickly check out one
area of the image. The Start_Row
, End_Row
,
Start_Column
and End_Column
options allow you to define
the subset area to be rendered. The default values are the full size of the
image from (1,1) which is the upper left to (w,h) on the lower right where w
and h are the Width=
n and
Height=
n values you have set.
Note: if the number specified is greater than 1 then it is interpreted as an absolute row or column number in pixels. If it is a decimal value between 0.0 and 1.0 then it is interpreted as a percent of the total width or height of the image.
For example: Start_Row=0.75
and
Start_Column=0.75
starts on a row 75% down from the top at a column
75% from the left. Thus it renders only the lower-right 25% of the image
regardless of the specified width and height.
The +SR
, +ER
, +SC
and
+EC
switches work in the same way as the corresponding INI-style
settings for both absolute settings or percentages. Early versions of POV-Ray
allowed only start and end rows to be specified with
+S
n and +E
n so they are still
supported in addition to +SR
and +ER
.
When rendering a subset of *columns* (+sc/+ec
) POV-Ray generates a full width image and fills the not rendered columns with black pixels. This should not be a problem for any image reading program no matter what file
format is used.
when rendering a subset of *rows* (+sr/+er
) POV-Ray writes the full height into the image file header and only writed those lines into the
image that are rendered. This can cause problems with image reading
programs that are not checking the file while reading and just read over
the end.
if POV-Ray wrote the actual height of the partial image into the image header there would be no way to continue the trace in a later run.