Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!ucsd!pacbell.com!tandem!netcom!rodent From: rodent@netcom.COM (Ben Discoe) Newsgroups: comp.sys.amiga.programmer Subject: Re: 3D Graphics Message-ID: <27843@netcom.COM> Date: 12 Mar 91 02:36:27 GMT References: <91067.230242R18QC@CUNYVM.BITNET> <1991Mar10.183032.17717@hoss.unl.edu> Organization: Netcom - Online Communication Services UNIX System {408 241-9760 guest} Lines: 59 butch@hoss.unl.edu (Charles Rosecrans Jr.) writes: > Jeannopoulos Alex writes: >> Has anyone done any 3d graphics on the AMIGA. I have been some 3D program >>ming but I was wondering how I can calculate whether certain lines are removed >>ed or should be visible. Any info on hidden line removal would be greatly >>appreciated. Thanks >> Alex Jeannopoulos >In my integer-based 3D code, I have a pre-computed surface normal (I use >this basically for my shading algorithm) that I use. If the Z-element >of the normal vector is positive after rotation, then the face is pointing >towards the viewer (or camera). I don't use this (backface removal) because I want to be able put the viewpoint INSIDE objects. However, I also don't do shading yet. > So far, this has given me very reliable >results. Anyone know of a quick algorithm for depth cueing (I think >thats the word I'm looking for) the faces. I use the Newell,Newell,Sancha (NNS) algorithm from Foley,VanDam etc. Warning! The first edition of this book gave a description of the NNS algorithm that was misleading (actually, just plain wrong.) > Right now I use the minimum Z >value, but this goofs up from time to time. I found that any method (min,max,mid,median...) relying totally on Z would mess up badly a large fraction of the time. NNS has no such trouble but it's a lot slower. In my implementation, NNS is a *lot* slower because although almost everything is integerized, the 3D plane equations used in one phase of NNS are done by converting to floating point, simply because they're fiendishly hard with integers. > Any help on this would be >greatly appreciated. I am looking for people who are working on real-time 3D for the Amiga and are willing to share code/algorithms/ideas. Y'all are welcome to my code. Anyone have a fast triangle clipper/drawer? Currently I do it in C and official Library calls which is rather slow. Anyone have anything in assmbler that might be linked to C? > Also, I think someone mentioned a clock-wise algorithm, which works well >too. The reason why I choose the normal algorithm is the time it took to >rotate the normal as opposed to the time it took to derive the value for the >clock-wise test. Isn't this really the same thing? You're just computing ahead of time, right? >Butch Rosecrans butch at fergvax.unl.edu I also have a decent 3D model editor with a few interesting features. I'd be delighted to share with anyone who could help advance the general cause of real-time, non-commercial 3D on the Amiga. -------------------------- Ben, In San Jose, a horrible city with ignorant destructive uncaring people.