This is version 3.0 of rayshade, a ray tracing program. Rayshade reads a multi-line ASCII file describing a scene to be rendered and produces a Utah Raster RLE format file of the ray-traced image. Rayshade features: Nine types of primitives (box, cone, cylinder, height field, plane, polygon, sphere, superquadric, flat- and Phong-shaded triangle) Composite objects Point, directional, and extended (area) light sources Solid procedural texturing and bump mapping of primitives, objects, and individual instances of objects Antialiasing through adaptive supersampling or "jittered" sampling Arbitrary linear transformations on primitives, instances of objects, and texture/bump maps Use of uniform spatial subdivision or hierarchy of bounding volumes to speed rendering Options to facilitate rendering of stereo pairs Support for the C-Linda parallel programming language This version supersedes all previous versions, and it is to this release that subsequent patches should be applied. Rayshade has been tested on many different UNIX-based computers. If your machine has a C compiler and enough memory (at least 2Mb), rayshade should be fairly easy to port. Be warned that rayshade uses yacc and lex to process input files. If you do not have lex and yacc, try to get flex and bison from the Free Software Foundation folks (ftp to prep.ai.mit.edu). Normally, rayshade makes use of the Utah Raster toolkit. I strongly suggest you get a copy of the toolkit, as it provides a host of useful tools for image manipulation and a library for reading/reading the toolkit's "RLE" format image files. UTAH.BLURB is the "blurb" file from the latest distribution of the toolkit, which can be obtained via anonymous ftp from cs.utah.edu (128.110.4.21), weedeater.math.yale.edu (130.132.23.17), nl.cs.cmu.edu (128.22.222.56), and uunet.uu.net. Also of interest is the "fbm" library, available from nl.cs.cmu.edu:/usr/mlm/ftp/fbm.tar.Z, which provides tools for converting Utah Raster RLE format images to/from other formats. If you do not want to or cannot use the Utah Raster toolkit, compile-time switches are provided to create image files using a generic format identical to that used by Mark VandeWettering's "mtv" ray tracer. See the Makefile and src/outputp.c for details. The directory "src" contains the source to rayshade. To compile, edit the Makefile in that directory and change include file and library paths and set CFLAGS and LIBS to whatever is appropriate for your particular hardware/ software configuration. The file doc/rayshade.1 contains a brief manual page which covers most things a casual user will need to know in order to produce ray-traced images. A tutorial on adding new textures on rayshade is included in doc/texture.ms. A similar document on adding new primitives to rayshade is in doc/primitive.ms. Unfortunately, there is as yet no technical documentation. Once you've compiled rayshade, you can test it using the example input files in the Examples directory. You can also run the output of Eric Haines' Standard Procedural Database through awk using the "nff2shade.awk" script, and feed the results to rayshade. Note that for several of the databases, you will need to tweak the data a bit to achieve optimal runtimes. See nff2shade.awk for details. As of patch #2, rayshade no longer processes #include directives in the input file. Instead, you are encouraged to make use of cpp in the design of your input files. Rayshade will use cpp-generated lines of the form '#n "filename"' to perform meaningful error reporting. See Examples/planet.ray for more details. Rayshade was not designed to be, nor is it, the be-all and end-all of ray tracers. It was meant to be reasonably fast, portable, and easy to modify. It has some nice features which allow you to produce pretty pictures, but there are countless extensions, modifications, and improvements which could be made. There are many routines which may be optimized and many features which could be added. For a list of suggested improvements and projects see "TODO". You are encouraged to modify the source code left and right. Rayshade had its start as an "introductory" public domain ray tracer written by Roman Kuchkuda. During 1987-88 the first version of rayshade was written by Craig Kolb, David P. Dobkin (the original cylinder, cone and extinct torus- tracing code), and David C. Hoffman (the original octree code). Craig Kolb wrote the current version of rayshade during the fall of 1988 and has made a large number of changes since then. The current version of rayshade owes much to a number of people who have made suggestions, fixed bugs, and who have been all-around good sports about the whole thing. Thanks to David Dobkin, Eric Haines, Lefteris Koutsofios, Ken Musgrave, Przemek Prusinkiewicz, and Allan Snider for their encouragement, comments, and willingness to be on the Front Lines. Thanks also to Roman Kuchkuda for providing a base upon which to build. Special thanks to Robert Skinner for providing the Noise(), DNoise(), and other texturing functions and allowing them to be redistributed. Thanks also to Rodney G. Bogart for providing the depth of field code. If you find any bugs, make any useful extensions, have a nice input file, port rayshade to a new environment, or need assistance understanding a particularly braindamaged section of code, please let me know. I can be most easily reached by email. Craig Kolb 7 Dec 89 kolb@yale.edu Yale University Dept. of Mathematics P.O. Box 2155 Yale Station New Haven, CT 06520-2155