RUNPOV +IMYSCENE +D1 RES120
This renders myscene.pov at 120 by 90 resolution. Note there is no such scene. This is hypothetical. After viewing it, you noticed a mistake which you fixed with your text editor. To rerun the scene type:
RERUNPOV
and that's all. It will rerun the same scene you just ran. Suppose you want more detail on the next run. You can add more switches or INI files. For example:
RERUNPOV RES320
will rerun at higher resolution. Subsequent uses of rerunpov will be at 320 by 200 until you tell it differently. As another example, the +A switch turns on anti-aliasing. Typing " rerunpov +A " reruns with anti- aliasing on. All subsequent reruns will have it on until you do a " rerunpov -A " to turn it off. Note if you do another runpov it starts over from your povray.ini defaults and it overwrites the old rerun.ini .
Two other batch files are included. runphelp.bat is only used as an alternative way to run povhelp from another directory. If you used installation plan two then use runphelp.bat rather than povhelp.exe . This batch file serves no other purpose.
Finally t2g.bat invokes the tga2gif.exe program for converting TGA files to GIF files. You could run \FILE {tga2gif} directly but its default parameters do not generally produce the best results. If you use T2G instead, it adds some command line switches which work better. For a full list of switches available for tga2gif , type tga2gif with no parameters and it will display the available switches and options.
The number "1" after the +D tells it what kind of video hardware to use. If you use +D alone or +D0 then POV-Ray will attempt to auto detect your hardware type. Use +D? to see a message about what type of hardware POV-Ray found.
You may also explicitly tell POV-Ray what hardware to use. The following chart lists all of the supported types.
| +D0 | Auto detect (S)VGA type (Default) |
| +D1 | Standard VGA 320x200 |
| +D2 | Standard VGA 360 x 480 |
| +D3 | Tseng Labs 3000 SVGA 640x480 |
| +D4 | Tseng Labs 4000 SVGA |
| +D5 | AT&T VDC600 SVGA 640x400 |
| +D6 | Oak Technologies SVGA 640x480 |
| +D7 | Video 7 SVGA 640x480 |
| +D8 | Video 7 Vega (Cirrus) VGA 360x480 |
| +D9 | Paradise SVGA 640x480 |
| +DA | Ahead Systems Ver. A SVGA 640x480 |
| +DB | Ahead Systems Ver. B SVGA 640x480 |
| +DC | Chips & Technologies SVGA 640x480 |
| +DD | ATI SGVA 640x480 |
| +DE | Everex SVGA 640x480 |
| +DF | Trident SVGA 640x480 |
| +DG | VESA Standard SVGA Adapter |
| +DH | ATI XL display card |
| +DI | Diamond Computer Systems SpeedSTAR 24X |
The most common type is a VESA standard card which uses +DG . VESA is a standard software interface that works on a wide variety of cards. Those cards which do not have VESA support directly built-in, generally have a video driver that you can load to provide VESA support. The program UniVBE is a high quality universal VESA driver that may work for you. It can be found at http://www.povray.org or possibly other POV-Ray sites.
The options listed above had been tested worked under earlier versions of POV-Ray but there have been many changes in the program and we cannot guarantee these all still work. If you can use VESA then do so. It has been well tested and will give you the most flexibility.
After the +D and the type, you may specify a 3rd character that specifies the palette type.
| +D?3 | Use 332 palette with dithering (default and best for VGA systems). This is a fixed palette of 256 colors with each color consisting 3-bits of red data, 3-bits green and 2-bits blue. |
| +D?0 | Use HSV palette option for VGA display. This is a fixed palette of 256 colors where colors are matched according to hue, saturation and intensity rather than the amount of red, green and blue. |
| +D?G | Use fixed gray scale palette option for VGA display. |
| +D?H | Use HiColor option. Displays more than 32,000 colors with dithering. Supported on VESA, SpeedSTAR 24X, ATI XL HiColor and Tseng 4000 based cards with high color 15 or 16 bit options. |
| +D?T | For Truecolor 24 bit cards. Use 24 bit color. Supported on the Diamond SpeedSTAR 24X and cards with 24bit VESA support only. |
Here are some examples:
+D0H Auto detect the VGA display type and display the image to the
screen as it's being worked on. Use the 15-bit HiColor chip and
dithering to display more than 32,000 colors on screen.
+D4 Display to a TSENG 4000 chipset VGA using the 332 palette option.
+D4H Display to a TSENG 4000 chipset VGA using the HiColor option.
+DG0 Display to a VESA VGA adapter and use the HSV palette option.
+DG3 Display to a VESA VGA adapter and use the 332 palette option.
+DGH Display to a VESA VGA adapter and use the HiColor option for
over 32,000 colors.
+DGT Display to a VESA VGA adapter and use the TrueColor option for
over 16 million colors.
Note that your VESA BIOS must support these options in order for you to use them. Some cards may support HiColor and/or TrueColor at the hardware level but not through their VESA BIOS.
The following sections explain the features in roughly the same order as they are described in the reference chapter.

This kind of coordinate system is called a left-handed coordinate system. If you use your left hand's fingers you can easily see why it is called left-handed. Just point your thumb in the direction of the positive x-axis, your index finger in the direction of the positive y-axis and your middle finger in the positive z-axis direction. You can only do this with your left hand. If you had used your right hand you would not have been able to point the middle finger in the correct direction.
The left hand can also be used to determine rotation directions. To do this you must perform the famous Computer Graphics Aerobics exercise. Hold up your left hand. Point your thumb in the positive direction of the axis of rotation. Your fingers will curl in the positive direction of rotation. Similarly if you point your thumb in the negative direction of the axis your fingers will curl in the negative direction of rotation.

In the above illustration, the left hand is curling around the x-axis. The thumb points in the positive x direction and the fingers curl over in the positive rotation direction.
If you want to use a right-handed system, as some CAD systems such as AutoCAD do, the right vector in the camera specification needs to be changed. See the detailed description in "Handedness" . In a right-handed system you use your right hand for the Aerobics .
Note that there is some controversy over whether POV-Ray's method of doing a right-handed system is really proper. If you want to avoid problems we suggest you stick with the left-handed system which is not in dispute.
The first include statement reads in definitions for various useful colors. The second include statement reads in some useful shapes. The next read pre-defined finishes, glass, metal, stone, and wood textures. When you get a chance, have a look through them to see but a few of the many possible shapes and textures available.
You should only include files you really need in your scene. Some of the include files coming with POV-Ray are quite large and you should better save the parsing time (and memory) if you don't need them. In the following examples we will only use the colors.inc , finish.inc and stones.inc include files so you'll better remove the appropriate lines from your scene file.
You may have as many include files as needed in a scene file. Include files may themselves contain include files, but you are limited to declaring includes nested only ten levels "deep".
Filenames specified in the include statements will be searched for in the current directory first and, if not found, will then be searched for in directories specified by any +L or Library_Path options active. This would facilitate keeping all your "include" ( .inc ) files such as shapes.inc , colors.inc , and textures.inc in an "include" subdirectory, and giving an +L option on the command line to where your library of include files are.
Add the following camera statement to the scene.
Briefly, location <0,2,-3> places the camera up two units and back three units from the center of the ray-tracing universe which is at <0,0,0>. Remember that by default +z is into the screen and -z is back out of the screen.
Also look_at <0,1,2> rotates the camera to point at x, y, z coordinates <0,1,2>. A point 5 units in front of and 1 unit lower than the camera. The look_at point should be the center of attention of your image.
The first vector specifies the center of the sphere. In this example the x coordinate is zero so it is centered left and right. It is also at y=1 or 1 unit up from the origin. The z coordinate is 2 which is 5 units in front of the camera, which is at z=-3. After the center vector is a comma followed by the radius which in this case is 2 units. Since the radius is half the width of a sphere, the sphere is 4 units wide.
The color you define is the way you want it to look if fully illuminated. If you were painting a picture of a sphere you would use dark shades of a color to indicate the shadowed side and bright shades on the illuminated side. However ray-tracing takes care of that for you. You pick the basic color inherent in the object and POV-Ray brightens or darkens it depending on the lighting in the scene. Because we are defining the basic color the object actually has rather than how it looks the parameter is called pigment .
Many types of color patterns are available for use in a pigment {... } statement. The keyword color specifies that the whole object is to be one solid color rather than some pattern of colors. You can use one of the color identifiers previously defined in the standard include file colors.inc .
If no standard color is available for your needs, you may define your own color by using the color keyword followed by red , green and blue keywords specifying the amount of red, green and blue to be mixed. For example a nice shade of pink can be specified by:
The values after each keyword should be in the range 0.0 to 1.0. Any of the three components not specified will default to 0. A shortcut notation may also be used. The following produces the same shade of pink:
Colors are explained in more detail in section "Specifying Colors" .
to your scene file to get your first complete POV-Ray scene file as shown below.
The vector in the light_source statement specifies the location of the light as 2 units to our right, 4 units above the origin and 3 units back from the origin. The light source is invisible, it only casts light, so no texture is needed.
That's it! Close the file and render a small picture of it using the command
If your computer does not use the command line, see your platform specific docs for the correct command to render a scene.
You may also set any other command line options you like. The scene is written to the image file demo.tga (or some suffix other than .tga if your computer uses a different default file format).
The scene you just traced isn't quite state of the art but we'll have to start with the basics before we soon get to much more fascinating features and scenes.
Section 4.1.6
Defining a Light Source
povray +w160 +h120 +p +x +d0 -v -idemo.pov
Table Of Contents