Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!itsgw!steinmetz!uunet!snjsn1!bilbo!greg From: greg@bilbo (Greg Wageman) Newsgroups: comp.graphics Subject: Re: MTV-Raytracer on ATARI ST Message-ID: <737@snjsn1.SJ.ATE.SLB.COM> Date: 8 Mar 89 21:17:09 GMT References: <1171@laura.UUCP> Sender: news@SJ.ATE.SLB.COM Reply-To: greg@sj.ate.slb.com (Greg Wageman) Organization: Schlumberger ATE, San Jose, CA Lines: 59 In article <1171@laura.UUCP> wagener@unidocv.UUCP (Roland Wagener) writes: >I have ported the MTV-Raytracer on the ATARI ST using the Turbo-C- >Compiler. The Program works fine and it uses about 3 hours CPU-Time >to create the Balls-Picture in 320x200 Resolution. I have also. Using Mark Williams C version 3.0.6. >But there is a bug somewhere in the program. There are white spots in >all reflecting surfaces. This bug does not apear on a IBM-PC programmed >with Zortech-C++. But the PC needs 5 hours for a 200x200-Picture ... Are you sure it's a bug, and not specular highlights? There are several versions of the MTV raytracer around, some did not implement the Phong cosine-alpha highlights (some not-quite correct code was "#ifdef"ed out), while others did. The highlights appear on surfaces where the sixth (highlight) value in the NFF surface line is non-zero, such as in the "balls" picture, one for each light source which is reflected by the surface towards the eye point. For example: R G B D S C T I f 1 .9 .7 .5 .5 3 0 0 R/G/B - Red, Green, Blue components of surface color, range 0 - 1.0 D - Diffuse reflection coefficient. S - Specular reflection coefficient. C - Phong "shine" cosine power, for specular highlights T - Transmission value. Should be range 0-1.0, but due to bugs in the shading routine, does not work logically. I - Index of refraction. Irrelevant if T < .01 Could your Atari compiler have ignored the #ifdef and compiled-in the specular highlights code? >I have programmed the octree-reduction-algorithm in two versions. One >version for 16 colours out of 512 and one version for 256 colours out of >256K. The last version needs a aditional graphics-board to show the >pictures. > >I will post this C-Source if anyone asks for it. I've written an MTV-to-Spectrum converter, but I used a "best-fit" algorithm. I would be interested in comparing the differences. Longish .signature follows. Skip now, or don't complain! Greg Wageman ARPA: greg@sj.ate.slb.com Schlumberger Technologies BIX: gwage 1601 Technology Drive CIS: 74016,352 San Jose, CA 95110-1397 UUCP: ...!uunet!sjsca4!greg (408) 437-5198 ------------------ There's nothing I hate more than a Usenet posting which took three seconds to compose and three minutes to type, glibly dismissing three years (or three decades) of an author's work in three lines. ------------------ Opinions expressed herein are solely the responsibility of the author. (And the author wouldn't have it any other way.)