Section 6.2.4.4
Help Screen Switches

+H or +? Show help screen 0 if this is the only switch
+H0 to +H8 Show help screen 0 to 8 if this is the only switch
+?0 to +?8 Same as +H0 to +H8

Note that there are no INI style equivalents to these options.

Graphical interface versions of POV-Ray such as Mac or Windows have extensive online help. Other versions of POV-Ray have only a few quick-reference help screens. The +? switch, optionally followed by a single digit from 0 to 8, will display these help screens to the Banner text stream. After displaying the help screens, POV-Ray terminates. Because some operating systems do not permit a question mark as a command line switch you may also use the +H switch. Note however that this switch is also used to specify the height of the image in pixels. Therefore the +H switch is only interpreted as a help switch if it is the only switch on the command line and if the value after the switch is less than or equal to 8.


Section 6.2.5
Tracing Options

There is more than one way to trace a ray. Sometimes there is a trade-off between quality and speed. Sometimes options designed to make tracing faster can slow things down. This section covers options that tell POV-Ray how to trace rays with the appropriate speed and quality settings.

Section 6.2.5.1
Quality Settings

Quality=n Set quality value to n (0 <= n <= 11)
+Qn Same as Quality=n

The Quality =n option or +Q n switch allows you to specify the image rendering quality. You may choose to lower the quality for test rendering and raise it for final renders. The quality adjustments are made by eliminating some of the calculations that are normally performed. For example settings below 4 do not render shadows. Settings below 8 do not use reflection or refraction. The values correspond to the following quality levels:

0,1 Just show quick colors. Use full ambient lighting only. Quick colors are used only at 5 or below.
2,3 Show specified diffuse and ambient light.
4Render shadows, but no extended lights. 5 Render shadows, including extended lights.
6,7 Compute texture patterns.
8Compute reflected, refracted, and transmitted rays.
9Compute halos.

The default is 9 if not specified.


Section 6.2.5.2
Radiosity Setting

Radiosity=bool Turns radiosity on/off
+QR Turns radiosity on -QR Turns radiosity on

Radiosity is an additional calculation which computes diffuse inter-reflection. It is an extremely slow calculation that is somewhat experimental. The parameters which control how radiosity calculations are performed are specified in the global_settings {radiosity {... }} statement. See "Radiosity" for further details.


Section 6.2.5.3
Automatic Bounding Control

Bounding=bool Turn bounding on/off
+MB Turn bounding on; threshold 25 or prev. amt
-MB Turn bounding off
Bounding_Threshold=n Set bound threshold to n
+MBn Turn bounding on; bound threshold to n
-MBn Turn bounding off; for future threshold to n
Light_Buffer=bool Turn light buffer on/off
+UL Turn light buffer on
-UL Turn light buffer off
Vista_Buffer=bool Turn vista buffer on/off
+UV Turn vista buffer on
-UV Turn vista buffer off

POV-Ray uses a variety of spatial sub-division systems to speed up ray-object intersection tests. The primary system uses a hierarchy of nested bounding boxes. This system compartmentalizes all finite objects in a scene into invisible rectangular boxes that are arranged in a tree-like hierarchy. Before testing the objects within the bounding boxes the tree is descended and only those objects are tested whose bounds are hit by a ray. This can greatly improve rendering speed. However for scenes with only a few objects the overhead of using a bounding system is not worth the effort. The Bounding =off option or -MB switch allows you to force bounding off. The default value is on.

The Bounding_Threshold =n or +MB n switch allows you to set the minimum number of objects necessary before bounding is used. The default is +MB 25 which means that if your scene has fewer than 25 objects POV-Ray will automatically turn bounding off because the overhead isn't worth it. Generally it's a good idea to use a much lower threshold like +MB 5.

Additionally POV-Ray uses systems known as vista buffers and light buffers to further speed things up. These systems only work when bounding is on and when there are a sufficient number of objects to meet the bounding threshold. The vista buffer is created by projecting the bounding box hierarchy onto the screen and determining the rectangular areas that are covered by each of the elements in the hierarchy. Only those objects whose rectangles enclose a given pixel are tested by the primary viewing ray. The vista buffer can only be used with perspective and orthographic cameras because they rely on a fixed viewpoint and a reasonable projection (i. e. straight lines have to stay straight lines after the projection).

The light buffer is created by enclosing each light source in an imaginary box and projecting the bounding box hierarchy onto each of its six sides. Since this relies on a fixed light source, light buffers will not be used for area lights.

Reflected and transmitted rays do not take advantage of the light and vista buffer.

The default settings are Vista_Buffer =on or +UV and Light_Buffer =on or +UL . The option to turn these features off is available to demonstrate their usefulness and as protection against unforeseen bugs which might exist in any of these bounding systems.

In general, any finite object and many types of CSG of finite objects will properly respond to this bounding system. In addition blobs and meshes use an additional internal bounding system. These systems are not affected by the above switch. They can be switched off using the appropriate syntax in the scene file (see "Blob" and "Mesh" for details). Text objects are split into individual letters that are bounded using the bounding box hierarchy. Some CSG combinations of finite and infinite objects are also automatically bound. The end result is that you will rarely need to add manual bounding objects as was necessary in earlier versions of POV-Ray unless you use many infinite objects.


Section 6.2.5.4
Anti-Aliasing Options

Antialias=bool Turns anti-aliasing on/off
+A Turns aa on with threshold 0.3 or previous amount
-A Turns anti-aliasing off
Sampling_Method=n Sets aa-sampling method (1 or 2)
+AMn Same as Sampling_Method=n
Antialias_Threshold=n.n Sets anti-aliasing threshold
+An.n Sets aa on with aa-threshold at n.n
-An.n Sets aa off (aa-threshold n.n in future)
Jitter=bool Sets aa-jitter on/off
+J Sets aa-jitter on with 1.0 or previous amount
-J Sets aa-jitter off
Jitter_Amount=n.n Sets aa-jitter amount to n.n. If n.n <= 0 aa-jitter is set off
+Jn.n Sets aa-jitter on; jitter amount to n.n. If n.n <= 0 aa-jitter is set off
-Jn.n Sets aa-jitter off (jitter amount n.n in future)
Antialias_Depth=n Sets aa-depth (1 <= n <= 9)
+Rn Same as Antialias_Depth=n

The ray-tracing process is in effect a discrete, digital sampling of the image with typically one sample per pixel. Such sampling can introduce a variety of errors. This includes a jagged, stair-step appearance in sloping or curved lines, a broken look for thin lines, moire patterns of interference and lost detail or missing objects, which are so small they reside between adjacent pixels. The effect that is responsible for those errors is called aliasing .

Anti-aliasing is any technique used to help eliminate such errors or to reduce the negative impact they have on the image. In general, anti-aliasing makes the ray-traced image look smoother . The Antialias =on option or +A switch turns on POV-Ray's anti-aliasing system.

When anti-aliasing is turned on, POV-Ray attempts to reduce the errors by shooting more than one viewing ray into each pixel and averaging the results to determine the pixel's apparent color. This technique is called super-sampling and can improve the appearance of the final image but it drastically increases the time required to render a scene since many more calculations have to be done.

POV-Ray gives you the option to use one of two alternate super-sampling methods. The Sampling_Method =n option or +AM n switch selects non-adaptive super-sampling (method 1) or adaptive super-sampling (method 2). Selecting one of those methods does not turn anti-aliasing on. This has to be done by using the +A command line switch or Antialias =on option.

} } }

In the default, non-adaptive method ( +AM 1), POV-Ray initially traces one ray per pixel. If the color of a pixel differs from its neighbors (to the left or above) by more than a threshold value then the pixel is super-sampled by shooting a given, fixed number of additional rays. The default threshold is 0.3 but it may be changed using the Antialias_Threshold =n.n option. When the switches are used, the threshold may optionally follow the +A . For example +A 0.1 turns anti-aliasing on and sets the threshold to 0.1.

The threshold comparison is computed as follows. If r_1, g_1, b_1 and r_2, g_2, b_2 are the rgb components of two pixels then the difference between pixels is computed by

diff = abs(r1-r2) + abs(g1-g2) + abs(b1-b2).

If this difference is greater than the threshold both pixels are super-sampled. The rgb values are in the range from 0.0 to 1.0 thus the most two pixels can differ is 3.0. If the anti-aliasing threshold is 0.0 then every pixel is super-sampled. If the threshold is 3.0 then no anti-aliasing is done. Lower threshold means more anti-aliasing and less speed. Use anti-aliasing for your final version of a picture, not the rough draft. The lower the contrast, the lower the threshold should be. Higher contrast pictures can get away with higher tolerance values. Good values seem to be around 0.2 to 0.4.

When using the non-adaptive method, the default number of super-samples is nine per pixel, located on a 3*3 grid. The Antialias_Depth =n option or +R n switch controls the number of rows and columns of samples taken for a super-sampled pixel. For example +R 4 would give 4*4=16 samples per pixel.

} }

The second, adaptive super-sampling method starts by tracing four rays at the corners of each pixel. If the resulting colors differ more than the threshold amount additional samples will be taken. This is done recursively, i. e. the pixel is divided into four sub-pixels that are separately traced and tested for further subdivision. The advantage of this method is the reduced number of rays that have to be traced. Samples that are common among adjacent pixels and sub-pixels are stored and reused to avoid re-tracing of rays. The recursive character of this method makes it adaptive, i. e. the super-sampling concentrates on those parts of the pixel that are more likely to need super-sampling (see figure below).


Example of how the adpative super-sampling works.

The maximum number of subdivisions is specified by the Antialias_Depth =n option or +R n switch. This is different from the non-adaptive method were the total number of super-samples is specified. A maximum number of n subdivisions results in a maximum number of samples per pixel that is given by the following table.

      Number of samples per    Maximum number of samples
      super-sampled pixel for  per super-sampled pixel for
 +Rn  the non-adaptive method  the adaptive method
  1                1                       9
  2                4                      25
  3                9                      81
  4               16                     289
  5               25                    1089
  6               36                    4225
  7               49                   16641
  8               64                   66049
  9               81                  263169

You should note that the maximum number of samples in the adaptive case is hardly ever reached for a given pixel. If the adaptive method is used with no anti-aliasing each pixel will be the average of the rays traced at its corners. In most cases a recursion level of three is sufficient.

Another way to reduce aliasing artifacts is to introduce noise into the sampling process. This is called jittering and works because the human visual system is much more forgiving to noise than it is to regular patterns. The location of the super-samples is jittered or wiggled a tiny amount when anti-aliasing is used. Jittering is used by default but it may be turned off with the Jitter =off option or -J switch. The amount of jittering can be set with the Jitter_Amount =n.n option. When using switches the jitter scale may be specified after the +J switch. For example +J 0.5 uses half the normal jitter. The default amount of 1.0 is the maximum jitter which will insure that all super-samples remain inside the original pixel. Note that the jittering noise is random and non-repeatable so you should avoid using jitter in animation sequences as the anti-aliased pixels will vary and flicker annoyingly from frame to frame.

If anti-aliasing is not used one sample per pixel is taken regardless of the super-sampling method specified.


Section 7
Scene Description Language

The Scene Description Language allows you to describe the world in a readable and convenient way. Files are created in plain ASCII text using an editor of your choice. The input file name is specified using the Input_File_Name = file option or +I file switch. By default the files have the extension .pov . POV-Ray reads the file, processes it by creating an internal model of the scene and then renders the scene.

The overall syntax of a scene is a file that contains any number of the following items in any order.

LANGUAGE_DIRECTIVES camera{ CAMERA_ITEMS } OBJECT_STATEMENTS ATMOSPHERE_STATEMENTS global_settings { GLOBAL_ITEMS }

See "Language Directives" , "Objects" , "Camera" , "Atmospheric Effects" and "Global Settings" for details.


Section 7.1
Language Basics

The POV-Ray language consists of identifiers, reserved keywords, floating point expressions, strings, special symbols and comments. The text of a POV-Ray scene file is free format. You may put statements on separate lines or on the same line as you desire. You may add blank lines, spaces or indentations as long as you do not split any keywords or identifiers.

Section 7.1.1
Identifiers and Keywords

POV-Ray allows you to define identifiers for later use in the scene file. An identifier may be 1 to 40 characters long. It may consist of upper or lower case letters, the digits 0 through 9 or an underscore character ("_"). The first character must be an alphabetic character. The declaration of identifiers is covered later.

POV-Ray has a number of reserved keywords which are listed below.

  
aa_level                 fog_offset           reciprocal
aa_threshold             fog_type             recursion_limit
abs                      frequency            red
acos                     gif                  reflection
acosh                    global_settings      refraction
adaptive                 glowing              render
adc_bailout              gradient             repeat
agate                    granite              rgb
agate_turb               gray_threshold       rgbf
all                      green                rgbft
alpha                    halo                 rgbt
ambient                  height_field         right
ambient_light            hexagon              ripples
angle                    hf_gray_16           rotate
aperture                 hierarchy            roughness
arc_angle                hollow               samples
area_light               hypercomplex         scale
asc                      if                   scallop_wave
asin                     ifdef                scattering
asinh                    iff                  seed
assumed_gamma            image_map            shadowless
atan                     incidence            sin
atan2                    include              sine_wave
atanh                    int                  sinh
atmosphere               interpolate          sky
atmospheric_attenuation  intersection         sky_sphere
attenuating              inverse              slice
average                  ior                  slope_map
background               irid                 smooth
bicubic_patch            irid_wavelength      smooth_triangle
black_hole               jitter               sor
blob                     julia_fractal        specular
blue                     lambda               sphere
blur_samples             lathe                spherical_mapping
bounded_by               leopard              spiral
box                      light_source         spiral1
box_mapping              linear               spiral2
bozo                     linear_spline        spotlight
break                    linear_sweep         spotted
brick                    location             sqr
brick_size               log                  sqrt
brightness               looks_like           statistics
brilliance               look_at              str
bumps                    low_error_factor     strcmp
bumpy1                   mandel               strength
bumpy2                   map_type             strlen
bumpy3                   marble               strlwr
bump_map                 material_map         strupr
bump_size                matrix               sturm
camera                   max                  substr
case                     max_intersections    superellipsoid
caustics                 max_iteration        switch
ceil                     max_trace_level      sys
checker                  max_value            t
chr                      merge                tan
clipped_by               mesh                 tanh
clock                    metallic             test_camera_1
color                    min                  test_camera_2
color_map                minimum_reuse        test_camera_3
colour                   mod                  test_camera_4
colour_map               mortar               text
component                nearest_count        texture
composite                no                   texture_map
concat                   normal               tga
cone                     normal_map           thickness
confidence               no_shadow            threshold
conic_sweep              number_of_waves      tightness
constant                 object               tile2
control0                 octaves              tiles
control1                 off                  torus
cos                      offset               track
cosh                     omega                transform
count                    omnimax              translate
crackle                  on                   transmit
crand                    once                 triangle
cube                     onion                triangle_wave
cubic                    open                 true
cubic_spline             orthographic         ttf
cylinder                 panoramic            turbulence
cylindrical_mapping      pattern1             turb_depth
debug                    pattern2             type
declare                  pattern3             u
default                  perspective          ultra_wide_angle
degrees                  pgm                  union
dents                    phase                up
difference               phong                use_color
diffuse                  phong_size           use_colour
direction                pi                   use_index
disc                     pigment              u_steps
distance                 pigment_map          v
distance_maximum         planar_mapping       val
div                      plane                variance
dust                     png                  vaxis_rotate
dust_type                point_at             vcross
eccentricity             poly                 vdot
else                     polygon              version
emitting                 pot                  vlength
end                      pow                  vnormalize
error                    ppm                  volume_object
error_bound              precision            volume_rendered
exp                      prism                vol_with_light 
exponent                 pwr                  vrotate
fade_distance            quadratic_spline     v_steps
fade_power               quadric              warning
falloff                  quartic              warp
falloff_angle            quaternion           water_level
false                    quick_color          waves
file_exists              quick_colour         while
filter                   quilted              width
finish                   radial               wood
fisheye                  radians              wrinkles
flatness                 radiosity            x
flip                     radius               y
floor                    rainbow              yes
focal_point              ramp_wave            z
fog                      rand                 
fog_alt                  range                


All reserved words are fully lower case. Therefore it is recommended
that your identifiers contain at least one upper case character so it
is sure to avoid conflict with reserved words.

The following keywords are in the above list of reserved keywords but 
are not currently used by POV-Ray however they remain reserved. 

  bumpy1               test_camera_1
  bumpy2               test_camera_2
  bumpy3               test_camera_3
  incidence            test_camera_4
  pattern1             track
  pattern2             volume_object
  pattern3             volume_rendered
  spiral               vol_with_light







Next Section
Table Of Contents