Path: utzoo!attcan!uunet!husc6!mailrus!cornell!uw-beaver!uoregon!markv From: markv@uoregon.uoregon.edu (Mark VandeWettering) Newsgroups: comp.graphics Subject: My Raytracer, Questions Answered, and a Bug fix! Message-ID: <2683@uoregon.uoregon.edu> Date: 4 Sep 88 22:42:57 GMT Reply-To: markv@drizzle.UUCP (Mark VandeWettering) Organization: University of Oregon, Computer Science, Eugene OR Lines: 83 First of all thanks to everyone who has expressed an interest in my raytracer. I wish to address some questions globally rather than to each individual. Q: The raytracer seems to work, but how do I display it on my XXX brand workstation? A: Well, there are many answers to this. We only have black and white sun workstations here, so I have to display my images on an ancient and probably quite rare Tek4115 graphics terminal which has only 8 bitplanes. What I do is take the output of this raytracer, and pipe it through a program to convert it to the Utah Raster Toolkit format that we use here at the U of O. We have several programs to display these files on a wide variety of devices. The utah Raster Toolkit is available via anonymous FTP from cis.utah.edu, or you can send them some amount of money, and they can make you a tape (I don't have exact details here). The only problem with this is the guts of my conversion program are not original, they consist of some code that Eugene Miya posted to this group awhile ago (never write what you can beg, borrow or steal!), and I would have to contact him before I distributed said program. Also you would have to get the Utah Raster stuff as well. If I get enough mail to warrant posting this stuff, and if I can verify it with Eugene Miya, I will post my programs. My advice: Don't bother hacking pic.c too much. Write a program to display general raster images of an rgb bitmap to whatever device you have on hand. Use dithering if you want black and white. And then POST such programs, so that others can use/improve them. Q: Where can I get Eric Haine's NFF package? A: Simple: I will be reposting it right after this message. Q: Does anyone have any nifty NFF file objects to trace? A: Well, I just converted the teapot to NFF file format (using faceted polygons) but it is pretty big. If someone can suggest an anonymous FTP site where I could put some of these, as well as other revisions to my programs, I would make them available from there. Q: What else am I working on? Well, I would like to add motion blur, and statistically optimized anti-aliasing. I added code so that you can specify colors by name rather than by guessing colors. Parametric patches, tori, and surfaces of revolution would be nice to add too. As soon as I feel the raytracer has been significantly extended, I will repost. Finally, a bug fix (courtesy of Cameron Elliot): Your program will crash on some machines unless you do the following... (The buf array was too small.) Modify screen.c: /* Was before cam... [Ed: Gadzooks, Mark can sure be stupid sometimes....] curbuf = (Pixel *) malloc (xres * sizeof (Pixel)) + 1 ; buf = (Pixel *) malloc (xres * sizeof (Pixel)) + 1; */ curbuf = (Pixel *) malloc ((xres+1) * sizeof (Pixel)) ; buf = (Pixel *) malloc ((xres+1) * sizeof (Pixel)); --- Disclaimer: If employees dont represent an organization what does? Cameron Elliott Portable Cellular Communications Path: ...!uw-beaver!tikal!ptisea!cam Thanks again for the bug fix, and the nice comments! Keep the mail coming! Mark VandeWettering