Path: utzoo!utgpu!watmath!watserv1!watdragon!bmacintyre From: bmacintyre@watdragon.waterloo.edu (Blair MacIntyre) Newsgroups: comp.sys.amiga.tech Subject: Re: 3D-graphics Message-ID: <18344@watdragon.waterloo.edu> Date: 20 Nov 89 16:14:51 GMT References: <1470@cc.helsinki.fi> Reply-To: bmacintyre@watdragon.waterloo.edu (Blair MacIntyre) Organization: University of Waterloo Lines: 79 PKONTKANEN@cc.helsinki.fi writes: > > I am going to make a program, which uses filled 3D vector >graphics with hidden-surface removal. Normal methods - transform and >rotation matrices - aren't fast enough for my purposes. I have planned >to build a whole city with vector graphics. Can anybody recommend >any good books about this subject? Does somebody know better ways >to calculate the necessary transformations and rotations? ( what do you mean by filled 3D vector graphics? ) I assume you mean the normal "graphics pipeline" approach when you are talking about matrices? If you are going to build a large scene, the amount of time taken to multiply the standard rotation and transformation matrices onto the top of the stack is _trivial_ compared to the rest of the work needed, since you are only doing the transformation calculations once per scene. What slows you down is the rendering sequence: for every point ( line vertex, etc ) you have to do a matrix * vector multiplication, do the clipping and do the scaling to the screen coordinates. If that wasn't bad enough, you wish to do hidden surface removal which is incredibly expensive. Since you say you want to move about in an arbitrary 3D-world, no nice tricks will be available. I have a library of 3D routines ( that I've been working on off and on - more off than on - for over a year and may someday release ) that do things in the general case. It's not terribly fast, though, compared to an IRIS. :-) Summary: if you want to draw a city and travel around, make some simplifying assumptions if they will help. Perhaps only traveling on the ground with no tilt ( a "car view" ) or ( even better, perhaps ) use a bounded 3D world so that you can use specialize routines ( the general ones won't cut it ) > I haven't yet decided what kind of graphics routine to use. >It should make possible to move anywhere in arbitrary 3D-world in >real time. Does anybody have good ideas how to do this? On an Amiga, I feel quite confident in saying this is _not_ possible in general (see above ). [ Actually, moving anywhere is possible, drawing from anywhere is the hard part. ( I am assuming you have a fairly large "city" that you want to display ) :^) ] There are tricks you can do to reduce the amount of data you want to draw but if you want to draw a lot of stuff the computer just isn't fast enough. Get a math coprocessor and things will get a little better, but not much. Wade posted: ] No can do! If you want to move in arbitrary 3-Space your going to ] have to do the algebra. If nothing in your 3-D world moves you can cut some ] big corners, but if the viewpoint is to be able to move to any point and ] look in any direction you have to do the math. They went on to say: ] Try developing a fixed point integer system if you want to strive ] for speed. This is fine for a fixed size world, but for an "arbitrary 3D-world" I think you will need to use floating point. ] As far as a good text, try Foley & VanDam's (not sure of the ] spelling) "Fundamentals of Interactive Computer Graphics", or Newman and ] Sproull's "Principals of Interactive Computer Graphics" (McGraw Hill). These books will not help you with anything that will allow you to get any speed improvements over the "standard" approaches. If you aren't using a graphics pipeline approach, you should look into these books, however. The matrix representation is as fast as you are going to go, in general. -- -- Blair MacIntyre, Professional Leech on Society ( aka CS Graduate Student ) -- bmacintyre@{watcgl, watdragon, violet}.{waterloo.edu, UWaterloo.ca} -- "Love can be strange sometimes ... if it's done right!"