Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!ames!sgi!shinobu!odin!texas.esd.sgi.com!robert From: robert@texas.esd.sgi.com (Robert Skinner) Newsgroups: comp.graphics Subject: Re: A-Buffer source (and plotting lots of triangles)? Message-ID: <10491@odin.corp.sgi.com> Date: 17 Jul 90 22:29:58 GMT References: <1990Jul16.225553.2623@maths.tcd.ie> <1264@idunno.Princeton.EDU> Sender: news@odin.corp.sgi.com Reply-To: robert@sgi.com Organization: Silicon Graphics Inc., Entry Systems Division Lines: 63 In article <1264@idunno.Princeton.EDU>, markv@gauss.Princeton.EDU (Mark VandeWettering) writes: |> In article <1990Jul16.225553.2623@maths.tcd.ie> jorice@maths.tcd.ie (Jonathan Rice) writes: |> |> [ Jonathan needs to draw large numbers of small polygons quickly |> and with proper antialiasing. Wants suggestions over A buffer |> or Abram-Westover-Whitted's method ] |> |> You might also examine the Reyes paper in the 86 Siggraph (I think, all |> this stuff is once again, not in my office). Reyes basically just did |> a scanline Z buffer at some higher resolution, and then filtered the |> results apprpriately to get an nice image. I believe the aliasing |> artifacts will be lessened because imformation from adjacent pixels can |> be used for filtering, allowing a wider filter to be used. |> |> Mark actually, the Reyes implementation discussed in the paper divides the screen up into rectangular chunks, I expect from 16-64 pixels on a side. I thought the most interesting thing about Reyes was the way it processed primitives *before* they were scan converted (its simple and can be made object-oriented). The back-end scan conversion is independent; Pixar used a Z buffer. I implemented a renderer with a Reyes-like front end, and two scan conversion back ends: scanline Z buffer with 4x4 or 8x8 stochastically jittered subsamples, an alpha buffer with 4x4 or 8x8 masks. The back-ends were like ying and yang. The Z buffer was about 3-4 times as slow as the alpha buffer, because you have to test a group of samples for inclusion in a polygon. You can't use coherence because the subsamples are jittered (well you could use some, but its not worth it because the polygons only cover a few subsamples). The alpha buffer was optimized to convert polygon edges into alpha masks representing half spaces. These half-space alpha masks were then logically AND'ed to get the mask(s) for a single polygon. The mask was then inserted into the sorted list for the pixel it covered. Logical occlusion operations were performed on the mask as it was inserted. If the mask was found to be totally occluded before its insertion point was found, it was thrown away. All masks behind the new one were then occluded by it, and if any of them went to zero, they were thrown away. Believe it or not, doing all of those extra occlusion operations was faster than putting them off to the end, because they kept the size of the list small. (Oops, I slipped into thesis mode there. That's probably more detail than you wanted.) On the other hand, I never was able to fully debug the alpha buffer. Because of all sorts of odd boundary conditions, I occasionally created incorrect masks. The Z buffer was much simpler to code (about 1/7th the size of the alpha buffer), and worked flawlessly from the beginning. The two algorithms produced almost identical images. Robert Skinner robert@sgi.com You don't know what we could find. Why don't you come with me, little girl, on a magic carpet ride