Persistence of Vision Ray Tracer Version 3.1g Unix Specific Documentation New in version 3.1: The scene description language in POV-Ray 3.1 is not entirely backwards-compatible with earlier versions of the POV-Ray scene description language. The 'halo' feature in earlier versions is obsolete and has been entirely replaced with a 'media' feature which works better. Because older files making use of 'halo' will not render in POV-Ray 3.1 without substantial modification, you may wish to rename executables for pre-3.1 versions of POV-Ray if you would like to be able to render such older files. It should be noted that .povrayrc as described below can only refer to one version. Files: If this file has ^M's in it when you're reading it under Unix, then you need to make sure that when you extract the source files and Unix specific code from the archive it came in, that you tell the de-archiver to convert CR-LF's to LF's in text files. The widely-distributed Info-Zip archiver does this if you supply '-a' on the command-line, i.e. 'unzip -a <archive name>'. You may also like to use 'unzip -aL <archive name>' if the filenames are extracted in upper-case. Care should be taken when unzipping the scene files with older versions of unzip, since using the -a switch may corrupt the binary files in the archive (ie GIF and TTF files). If you don't see [binary] or [text] after each file, you will need to 'unzip -a <archive name>', then 'unzip <archive name> "*.gif" "*.ttf" "*.iff"' to get good copies of the binary files (the double quotes are needed to avoid file name expansion by the shell). If you received these files in a .tar.gz (or .tgz) archive then this has already been done for you. This file contains the documentation specific to compiling POV-Ray on Unix systems. Due to the wide variety of Unix systems available, POV-Ray may not compile directly on all systems as is. Every effort has been made to make it compile on as many systems as we have access to. If you have problems compiling, try checking with a local Unix guru first. If you still have problems and have internet access, check out the comp.graphics.rendering.raytracing newsgroup. Make sure you read the FAQ first (if you don't see it, ask for it.) The POV-Team also has newsgroups at news.povray.org that are not distributed on the Internet. The povray.unix group on this server is a useful resource for those who may be having difficulty compiling POV-Ray on various Unix systems. Please do not contact the POV-Team about problems with compiling POV-Ray. If you are trying to compile POV-Ray on an unsupported platform, this version is the best one to use as a base. The platform specific configuration is in the file config.h, so it is possible that you can change the configuration to suit your system without changing any code. This archive does not, however, contain any of the documentation and files actually needed to USE POV-Ray. The documentation and example scene files are available in the file POVUNI_D.TGZ, which should be available at the same place you got this archive, and it is also in the Linux archive (povlinux.tgz). Executables: Official executables are provided for only Linux on x86 and SPARC SunOS systems because there are so many possible Unix executable formats. In general, however, Unix systems come bundled with a C compiler, so recompiling the source for your target system shouldn't cause a problem. If you want to distribute an executable created by yourself you must comply with POVLEGAL.DOC. An official Linux (a free Unix variant) version is available as povlinux.tgz. If you can't find it at the same place you got this from, and don't want to compile it yourself from the Unix directory, then try one of the following sites: - The POV-Ray FTP site, ftp.povray.org in /pub/povray/Official/Linux. - There are many sites around the world that mirror the povray.org site. These are listed in README.MIRRORS at ftp.povray.org, and you should try to use the closest site for the best speed. - We also have a web site with a link to the binary. Point your browser at http://www.povray.org/. File locations: The Unix versions of POV-Ray now come with an install script that should put most of the necessary files in the appropriate locations. Details of what it does and does not install and where it installs them are below. The install script does not compile the code, though a 'make install' target is now available for installing binaries. The preferred location for installing POV-Ray for Unix is under /usr/local/lib/povray31 for all of the INI, scene, and include files, and /usr/local/bin for povray, x-povray, and/or s-povray. This is handled by the install script. Each user will also need to have an INI file, actually called .povrayrc on Unix systems, to tell POV-Ray where to look for these files. Currently, this must be done manually. The POV-Ray man page, povray.1, should be placed in a similarly accessible location, such as /usr/local/man/man1. The install script, if used, will place it there. If POV-Ray is not installed as suggested above and it is expected that many people will be using one version of POV-Ray, it would be a good idea to edit povray.1, under the section 'FILES' to specify where all of the documentation, scenes, and include files are actually stored. INI files: POV-Ray allows the use of files to store common configuration settings, such as the output format, image size, and library paths. Upon startup, the Unix version of POV-Ray will use the environment variable POVINI to determine custom configuration information if \ that environment variable is set. Otherwise, it will look for the file "povray.ini" in the current directory. If neither of these works, then POV-Ray will try to read a file called ".povrayrc" stored in the user's home directory. If none of these work, then POV-Ray will try to read the file "povray.ini" in a default system-wide directory defined at compile time (/usr/local/lib/povray31 by default). If it will be stored in a different location, POV-Ray should be recompiled for this option to work. It is defined by POVLIBDIR in the makefile. The POVRAYOPT environment variable used by earlier versions of POV-Ray is no longer used. The default povray.ini file that is shipped with the Unix archive assumes that POV-Ray will be installed under /usr/local/lib/povray31. If you are not installing POV-Ray there, you should edit the Library_Path specifications in this file to point to the location where POV-Ray is installed. Each user should copy this file to ".povrayrc" in their home directory. The file gamma.gif.txt explains how to find the correct Display_Gamma value for your .povrayrc file using the gamma.gif image. As this is specific to each display, you may need to make separate INI files to include on the command line if you are using various displays that have different gamma characteristics. The other INI files, like zipfli.ini and tgaflc.ini are of limited use under Unix, but are included as examples of how to automate operations from within POV-Ray, and can be customized to use whatever programs you have installed. Display Formats: There are two different methods of displaying images as they are rendered with POV-Ray on most Unix systems, and an additional display method on Linux systems. The first way is the text format, which can output a crude 75x24 ASCII version of the image, to give an idea of what POV-Ray is doing. This doesn't work very well if you are also using the Verbose (+v) status output. It also isn't very satisfying for the output of a ray tracer, but may be useful in some cases. X Windows Display: Alternately, if you have X-Windows, you can compile in the X-Windows display capability. This will allow you to preview the image using any kind of visual, at any depth, and remotely if desired. During rendering, the window will be updated after every scanline has been rendered, or sooner if the rendering is taking a long time. To update it sooner you can click any mouse button in the window or press (almost) any key. Pressing <CTRL-R> or <CTRL-L> during rendering will refresh the whole screen. If you have the Exit_Enable or +X flag set, pressing 'q' or 'Q' at any time during the rendering will stop POV-Ray rendering and exit. The rendering will pause when complete if the Pause_When_Done (or +P) flag is set. To exit at this point, press the 'q' or 'Q' key or click any mouse button in the window. The xpovicon.xpm is a color icon for use with fvwm or other window manager which can use external icons. To have fvwm use this icon, move the icon to the directory pointed to by your PixmapPath, usually /usr/include/X11/pixmaps/, add the following line to your .fvwmrc: Style "Povray" Icon xpovray.xpm and re-start X Windows. Re-starting fvwm will not be enough. If you don't restart, or choose not to do this this, POV-Ray will use a similar built-in monochrome icon. Using this icon with another window manager may use a different procedure. This icon is not installed by the install script. The X-windows version also supports these standard command-line options in addition to those given in the generic POV-Ray documentation. See the X(1) man page for further explanation of these options. -display <display name> Preview on the specified display -geometry <WIDTHxHEIGHT+XXX+YYY> Start with the given size/position -visual <visual type> Use specified visual if available -title <title> Use the given title for the window -icon Start iconified -owncmap Force POV-Ray to use a private colormap -borderwidth <width> Use a border of the given width -help Output these X Windows options SVGAlib display: For Linux systems that don't have X Windows installed, it is possible to use the libvga library to display directly to the screen, similar to the MS-DOS version. The SVGAlib version must be installed as a setuid root executable to be able to run properly. If s-povray doesn't work (usually complaining about being unable to get I/O permissions) first try (as root): chown root.root s-povray chmod 4755 s-povray NOTE: various bugs in POV-Ray might allow malicious users to gain root access if POV-Ray is setuid root. While this may be convenient, it might not be a good idea, and it's certainly not worth doing if the X Windows version works for you. If it still doesn't work then make sure svgalib is installed on your machine and works properly (sdoom is a good way of doing this :-). Anything that can at least use the 320x200x256 mode (ie regular VGA) should be fine, although modes up to 1280x1024x16M are possible. If you do not have root priviledges or can't have the system admin install POV-Ray, then you must use the X Windows or text-only version, which do not require any special system priviledges to run. If you are using a display resolution that is lower than what you are rendering, the display will be scaled to fit as much of the viewing window as possible. File Formats: The default file format for Unix is "targa" format (+ft). Optionally, the "PPM" format, popular on Unix platforms, or the new "PNG" format can be set as the default format by setting DEFAULT_FILE_FORMAT = 'p' or DEFAULT_FILE_FORMAT = 'n' in the unixconf.h file before compiling, by using +fp or +fn on the command-line or with "Output_File_Type = p" "Ouput_File_Type = n" in your .povrayrc file. There is more information about output file formats in the POV-Ray documentation. The documentation included with POV-Ray for Unix is in ACSII text format. The documentation is also available separately in PDF, HTML, and Microsoft Word 97 document formats, including all of the images, at: ftp://ftp.povray.org/pub/povray/Official/Docs/ or wherever you got your copy of this archive. If you are generating histogram files in the CSV format (comma separated values), then the units of time are in tens of microseconds (10 x 10^-6 s), and each grid block can store times up to 12 hours. Interrupting POV-Ray: To interrupt a rendering in progress, you can use CTRL-C (SIGINT), which will allow POV-Ray to finish writing out any rendered data before it quits. For the two display versions, you can also press the 'q' or 'Q' keys in the rendering preview window to interrupt the trace if the Test_Abort (or +X) flag is set. Post-processing Images: For Unix systems, the PBM utilities are an excellent choice for post-processing utilities, especially if you only have a command-line interface to Unix. XV 3.10a is also commonly installed at Unix sites, and can be used under X Windows to view PPM and TGA files, but XV 3.00 cannot view TGA images. There is also a patch to XV 3.10a to allow it to read and write PNG format images, although you will have to re-compile XV in order to use it. The PNG patch for XV, as well as lots of other PNG information is available at the PNG home page http://www.cdrom.com/pub/png/. POV-Ray can also pipe its output directly into a post-processor. For example, 'povray -iscene.pov -fp -o- | cjpeg > scene.jpg' will create a JPEG output file, because specifing an output filename of '-' to POV-Ray tells it to pipe its output to stdout, which is piped through cjpeg in this example. Questions and problems with Unix versions can be directed to Mark Gordon Please make sure you have consulted with a local Unix person first if you think the problem is likely to be on your end. If you are installing POV-Ray in a publicly accessible location, you must read and comply with the 'Online or Remote Execution' conditions in POVLEGAL.DOC. Mark Gordon Internet: mtgordon@povray.org