From: Allen A. <ak...@po...> - 2000-06-19 19:12:05
|
On Mon, Jun 19, 2000 at 03:44:57PM -0300, Mark Paton wrote: | The basic problem here seems to be that we are culling triangles | without regard to its neighbouring triangles. I expect this would | be very difficult to do and it is desirable to treat each triangle | independently. ... Yes, in fact OpenGL requires that the triangles be treated independently. | ... However, wouldn't a solution be that the smallest | a triangle can be is one pixel - e.g. the scan conversion for this | triangle is automatic. If a triangle is mathematically smaller then a | pixel area its rasterization is just the nearest pixel. ... OpenGL also requires that filled primitives be "point sampled." Essentially, the image plane is examined at regularly-spaced points. If the projection of a triangle (for example) covers one of those points, then the color, depth, etc. at that point are derived from that triangle, no matter how small the area of the triangle might be. This behavior is essential for proper antialiasing and visible-surface resolution, among other things -- including avoiding the problem that you first mentioned (gaps/overlaps in dense meshes of small polygons). However, for all this to work, the rasterization code must be written *very* carefully. When I wrote the original version of the code that eventually become Mesa's triangle rasterizer, I was aware of the issues, but took a few shortcuts for performance and made a few mistakes as well. Many of those have been fixed by now, but a few probably still remain, and the triangle-size cutoff may have been installed to work around them. It would be worth trying to reduce the cutoff size. My guess is that it would probably work in most cases. The ones least-likely to work are those in which the vertex coordinates are far from zero. | Then if you do something crazy like rendering 50 million polygons in | a 72x72 pixel box (which I tried). The system will have to render 50 | million pixels, and many of them will be the same pixel but the result | will be correct. Is this a valid thing to consider? ... Assuming the projected images of the polygons don't overlap, then the right behavior is that all 50 million polygons will be considered, but only 72x72 pixels will be written. Allen |