Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cmcl2!rna!dan From: dan@rna.UUCP (Dan Ts'o) Newsgroups: comp.graphics Subject: Re: DBW_render for SUN 3 ????? Message-ID: <632@rna.UUCP> Date: 8 Jun 89 07:17:07 GMT References: <93@unmvax.unm.edu> <62500002@uicbert.eecs.uic.edu> <9029@xanth.cs.odu.edu> <631@rna.UUCP> Reply-To: dan@rna.UUCP (Dan Ts'o) Organization: Rockefeller University Neurobiology Lines: 45 In article <631@rna.UUCP> dan@rna.UUCP (Dan Ts'o) writes: >In article <9029@xanth.cs.odu.edu>, writes: >> daniel@unmvax.unm.edu writes: >> >Has anyone converted the public domain ray trace program called DBW_render >> >to run on a SUN workstation? >> >> Ofer Licht has done just that. His >> modified DBW_Render is available via anonymous ftp from >> xanth.cs.odu.edu as /amiga/dbw.zoo. > > I picked this program up and started playing with it. I don't claim >to know much about it. However, it seemed designed for the Amiga (obviously) >and only wanted to output 4bits per color. I decided I wanted a full 8-bits >and started to probe into it. I don't know if the calculations are performed >to at least 8 bit accuracy, although I'd be surprised if they weren't, so >I just arranged to dump out more bits per color per pixel. Correct me if I'm wrong... it also seems to me that the code in ray.c packs bytes little endian style. Thus if run on a SUN3 or SUN4, pixels are reversed. But funny that no-one has noticed. Maybe their re-formatting program takes care of it. I punted on this one as well, and inserted: In file ray.c, line 464: #ifdef BIGENDIAN if (modulo == 0) { j = blueline[i]; blueline[i] <<= 8; blueline[i] |= (j >> 8)&0377; j = greenline[i]; greenline[i] <<= 8; greenline[i] |= (j >> 8)&0377; j = redline[i]; redline[i] <<= 8; redline[i] |= (j >> 8)&0377; } #endif if (didguess) cache[4][col][0] = 0xFF; A better fix would be to change the scan line buffers from (short) to (char) (why make them (short) ??). Also the scan line number is written out in native (short) and may need to be byte-swapped. BTW, does any have other interesting scene files for DBW_render ?