Path: utzoo!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!maverick.ksu.ksu.edu!hoss!fergvax!butch From: butch@fergvax.unl.edu (FERGVAX Daily Operator) Newsgroups: comp.sys.amiga.programmer Subject: Re: 3D Graphics Message-ID: Date: 18 Mar 91 15:29:00 GMT References: <91067.230242R18QC@CUNYVM.BITNET> <1991Mar10.183032.17717@hoss.unl.edu> <27843@netcom.COM> Sender: news@hoss.unl.edu (Network News Administer) Organization: University of Nebraska - Lincoln Lines: 75 In comp.sys.amiga.programmer Ben writes: >butch@hoss.unl.edu (Charles Rosecrans Jr.) writes: >> Jeannopoulos Alex writes: >>> [stuff about what Alex wants] >> [stuff about what I do, including calling Depth-Sorting Depth-Cueing >> (thanks for not calling me an idiot as you should have :-=) )] > 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. I've got a byte which I use as flags. There are bits corresponding to rendering (wireframe or solid), lighting (illuminated or one-shade/color), whether or not the face is visible, and whether or not you want the face always visible. With this last bit set, you can throw the viewpoint into the object and let it run. Although before I stuffed 3D clipping into the code, the Guru visited me on several occasions with a few words of wisdom. >> 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.) I've looked into this and thought maybe it was much too slow for my purposes. Someone else mentioned doing the distance from the center of the face to the viewpoint. This, to me, seems a little more appropriate, but still might give problems. Still, I think there's a better way out there, but I don't know what it is. Of course, my reference point is the commercial products (games especially) which have a specific function and are designed around that. > 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? On sharing code/algorithms/ideas: This sounds good. I'd be interested as well in doing this. I've got some assembly code for rotations and drawing in 3D which are not very pure at the moment. I'd post them when they're cleaned up, if there's interest. One drawback of the code is the coordinates are limited to short ints. Why? so I could use the hardware multiply and divide instructions. I guess I chose to sacrifice accuracy for speed. On fast triangle clipper/drawer: There was a person who posted a polygon drawer which was optimized for 4 bitplanes. It ran faster than the Amiga's own Area--- routines. I've been working on optimizing it further for 5 bitplanes and EHB mode, but haven't had the time to finish yet. If I've still got the code laying around on my hard drive, I'll post it up here (assuming there's no problem with the person who orinally posted it and the interest exists). Also, I hope to add a clip-while-draw algorithm in the future, which may not be very difficult but I haven't given it a whole lot of thought as of late. >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. How about a real-time animation language? I'm thinking about this too. Actually, I'm thinking about a compiler which supports a language to define objects and move them about a 3D world. Anyone else thinking of doing this? I'd be most interested in trading ideas. >-------------------------- >Ben, In San Jose, a horrible city with ignorant destructive uncaring people. Butch butch@fergvax.unl.edu Butch Rosecrans butch@fergvax.unl.edu