######################################################################## MTV RAYTRACER* written by Mark Terrence VandeWettering markv@cs.uoregon.edu ######################################################################## * Well, I have had the initials since 1964, Music Television can't say that :-) This represents the second formal release of the MTV Raytracer. It was written to help me understand how raytracing works, to generate cute images, and generally because I like to program. Feel free to use it for any purpose, I am releasing it into the public domain. The input format to this ray tracer is called "NFF" or Neutral File Format, which was invented by Eric Haines' for his Standard Procedural Database. The SPD was designed to allow programmers to test their raytracers on databases of varying sizes. While not the end-all to object file formats, it has served me well. If you wish to change the input file to something else, you probably only need to change the parser in "parse.y", not any of the other code. NFF supports the following primitives: spheres cylinders cones polygons polygonal patches (normals are interpolated from corner points) The MTV raytracer supports all of these primitives, with the minor limitation that polygonal patches must be triangles (have only three vertices). I am sure some clever person can convert patches with more sides to triangles, I haven't found the need yet. The output from the raytracer is very simple, and not directly tied to any specific device. It consists of a single line, with format in C scanf style of "%d %d\n", which gives the resolution of the image. It is then followed by x*y sets of (red green blue) bytes. We have pretty unstandard hardware here, (I convert these to Utah Raster Toolkit form and then filter that to display on a Tek4115) but I do maintain an archive of source which has been sent to me for this purpose. More below-- By the time you read this, this raytracer should be available via anonymous ftp from drizzle.cs.uoregon.edu. I will try to archive source code for displaying the ".pic" files, as well as interesting objects that I run accross. Filters already exist to display images on suns, to convert to PostScript and Impress, as well as X bitmaps Also available is Eric Haines' SPD source code, so you can generate your own fractal spheres, mountains, gears etc. By placing this in the comp.sources.unix, I hope to get this to more of the people who have requested it. I will entertain e-mail with questions, and even requests for the source code, but remember that I am a grad student only, and have limited time. If it takes me a long time to reply, send mail to me again. Thanks must go to Eric Haines especially, whose e-mail conversations have been interesting and fruitful. Also thanks to the numerous authors whose research into raytracing has seen implementation in this raytracer, and have provided a host of ideas about image synthesis. Also thanks to Jeff Eaton and David Koblas, whose criticism and sense of competition drove this poor hacker to write a better program than he could have without them. Ta Ta For Now... Mark VandeWettering