Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!uw-beaver!ubc-cs!alberta!cdshaw From: cdshaw@cs.UAlberta.CA (Chris Shaw) Newsgroups: comp.graphics Subject: Re: A-Buffer source (and plotting lots of triangles)? Message-ID: <1990Jul20.231437.22325@cs.UAlberta.CA> Date: 20 Jul 90 23:14:37 GMT References: <31673@masscomp.ccur.com> <10673@odin.corp.sgi.com> Sender: news@cs.UAlberta.CA (News Administrator) Organization: University of Alberta, Edmonton, Canada Lines: 69 In article <10673@odin.corp.sgi.com> robert@sgi.com writes: >In article mark@calvin..westford.ccur.com (Mark Thompson) writes: >|> In article <10588@odin.corp.sgi.com> I write: >|> >The Z buffer algorithm can't do transparency. >I hesitated before making such an absolute statement, because I know >that people are constantly improving things. Well, Z-Buffer is Z-Buffer. Z-Buffer with an Alpha channel is Duff's Alpha-compositing. Or something other than Z-buffer. >..ignoring the multiple overlapping transparent objects, tell me what >happens at a pixel when you have this case: You have rendered an opaque >object, then a transparent object in front of it. I can see how you calculate >the correct color at this point. Now you render another opaque object >behind the transparent one, you have one of two cases: > >(1) The second opaque object is behind the the very first one, No problem. Looks fine. >(2) The second opaque object is between the transparent one and the opaque one You can't beat this without extra storage. A-buffer uses a data structure in mainstore to solve this. When all first-pass rendering is done, you run through each pixel list nearest-to-farthest, adding colour and clipping area. Fournier's Ultracomputer algorithm just takes the top two contributions. Weinberg's pipeline architecture does something similar to A-buffer. Duff's algorithm trades spatial accuracy (no pixel mask) for transparency, but the fact remains that to get it right, you have to sort in depth. Fortunately, the stuff being sorted can be *objects* as opposed to *pixels*, so the sorting task is has a much smaller N in the O(N) sense. One of Prusiceiwicz's students at U of Regina came up with an algorithm that combines A-Buffer and Compositing, so you have a mask AND and an alpha channel. >I just can't see that this works without doing one or more of the >following: > A: render objects back-to-front > B: save more information at each pixel C: Punt. Ignore the problem, push it upstairs. >Doing A eliminates the render-any-number-of-primitives-in-any-order >advantage of the Z buffer. Doing B to save just one value doubles the >amount of memory the Z buffer takes, which is already considerable. >If you save much more information, it starts to look like the alpha buffer. Well, doing A means you may sort 100's of polygons as a single entity. Much better than sorting the polygons. >|> The main reason we used >|> an A buffer in the system I last worked on was to remove edge artifacts >|> on abutting antialiased polygons (using alpha lets the background >|> color seep through the 'cracks'). You can fix this by rendering common edges aliased. If you have a polygonal mesh, you know that the inner edges are each shared by two polygons, so you can treat these separately, and render the inner edges aliased, with full coverage. It's an extra check per edge, but the calculation per edge may be less. >Robert Skinner robert@sgi.com -- Chris Shaw University of Alberta cdshaw@cs.UAlberta.ca Now with new, minty Internet flavour! CatchPhrase: Bogus as HELL !