Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!bloom-beacon!eru!luth!sunic!mcsun!ukc!tcdcs!swift.cs.tcd.ie!maths.tcd.ie!jorice From: jorice@maths.tcd.ie (Jonathan Rice) Newsgroups: comp.graphics Subject: A-Buffer source (and plotting lots of triangles)? Message-ID: <1990Jul16.225553.2623@maths.tcd.ie> Date: 16 Jul 90 22:55:53 GMT Organization: Dept. of Maths, Trinity College, Dublin, Ireland. Lines: 37 I'm writing this program to draw perspective pictures of landscapes and I could do with some help on a couple of fronts. What I start out with is a gridded height map and a satellite photo overlay image. To render the thing I use just about the simplest method possible - I treat neighbouring heights in the height map as the corners of quadrilateral surface tiles. I perspectively transform these corner points to give me a 2-D quadrilateral in screen space, which I fill with a colour read out of the photo overlay. Hidden surface stuff is done with back-to-front overplotting along scan-lines of the height map as in Coquillart and Gangnet's "The Shaded Display of Digital Maps". I've got a sort of a prototype going in an X environment and it's okay as far as it goes, but in order to improve image quality, I'm going to have to renounce the graphics functions of X and do my own anti-aliased 24-bit polygon or triangle filling. What I think I need is something along the lines of Carpenter's A-Buffer - has this algorithm been improved on in any substantial way since it was published in '84? One paper I've read claims better quality images by anti-aliasing on an area greater than just the current pixel ("Efficient Alias-free Rendering by using Bit-masks and Look-up Tables" - Abram, Westover & Whitted, '85). How much does that matter? I'm going to be trying to put my images together into a short video, so what I'm particularly interested in is removal of frame-to-frame aliases rather than absolute rendering accuracy. Also, I have a HELL of a lot of very small triangles or quadrilaterals to draw - are there any optimisations that can be made to the scan-conversion process when no polygon ever gets larger than about five pixels? Any information that anyone wishes to grace me with would be appreciated. I'd particularly love some code that implements this stuff, particularly an A-buffer or such-like. I am no masochist. -- Jonathan o----------------------o----------------------------o--------------------------o | Jonathan Rice | Email: jorice@cs.tcd.ie | He was a common fly | |----------------------| Tel: 353.1.772941 x2156 (w)| With a taste for fashion | |Computer Science Dept.| 353.1.6245415 (h)| They were thrown together| | Trinity College | Fax: 353.1.772204 | In a heat of passion | | Dublin 2, | woof /\___/ | - "Human Fly", | | Ireland. | /| |\ | The Horseflies | o----------------------o----------------------------o--------------------------o