In this webpage several approaches to Anti-Aliasing are presented. ABAA nd MSAA are compared with a series of Q&A.
A new approach, Area-Based Anti-Aliasing (ABAA), is a great improvement over other methods that rely on point sampling. ABAA relies on area sampling. During rendering, edges efficiently traverse the image from pixel to pixel. Intersected pixels and the covered areas are easily identified in 1 step.
There are several references to other approaches to anti-aliasing in CGI. With MSAA, anti-aliasing depends on the number of subpixel sample points, like x4, and x8. The selection of sample points for MSAA is explained using “solutions to the 8-queens puzzle” or “solutions to the 4- or 8-rooks puzzle”. The quality of the anti-aliased images improves with the number of subpixels. MSAA is slow, since it needs several (4x or 8x) frame computations, followed by averaging.
Several solutions have been introduced to improve the frame rate: FXAA, SMAA, TAA, ARAA, CSAA, EQAA, FXAA. Although MSAA produces better images, these solutions are a compromise between system performance and image quality.
Speed of ABAA
Q: Why is ABAA the fastest solution?
A: With ABAA, only one image with anti-aliasing is computed. During rendering, triangle edges efficiently traverse the image from pixel to pixel. One key feature of ABAA is the speed and simplicity for detecting partially covered pixels. The intersected pixels and their covered areas are easily identified in 1 step. There is no need for image averaging or postprocessing.
ABAA vs Other Solutions
Q: What are other advantages of ABAA vs MSAA and other anti-aliasing approaches?
A: With ABAA, the quality of image rendering is independent of edge orientation.
In the ABAA implementation, pixels are subdivided into N subpixel areas of equal size.
1. There is no need for multiple image computations. For each edge position, the sampled area is detected in only one sampling, or measurement
2. As an edge moves across a Pixel, the covered area gradually increases from 0.0 to 1.0, in N increments evenly spaced, independently of the edge orientation.
3. The pixel covered area are easily mapped into subpixels areas.
4. ABAA is better at handling narrow faces with width < 1 pixel wide.
In the MSAA Implementation, the number of covered Subpixel is detected with point sampling.
1. MSAA is slow, since it requires N image computations for N Subpixels.
2. As an edge moves across a Pixel, the N subpixels increment from 0 to N are evenly spaces for edges parallel to the horizontal and vertical coordinate axes. This is worse for other edge orientations.
3. Since MSAA uses subpixel point samples, there are always pairs of subpixels that are aligned with some edge orientations. For example, with 8 Subpixels there are at least 7+6+5+4+3+2+1=28 such pairs. Each time an edge moves across a subpixel pair, it results in one double increment instead of 2 distinct increments.
4. MSAA is worse at handling narrow faces with width < 1 pixel wide.
Problems with Narrow Faces
Q: Why is ABAA the fastest solution?
A: There are 2 main problems with narrow faces.
1. “narrow-face breakup”: When faces become narrower than 1 pixel wide, this can result in “face popping in-and-out of scene”.
Most anti-aliasing methods based on point sampling have problems handling “narrow face breakup”. ABAA is the best at handling narrow face breakup”.
In the general case, MSAA can handle “jaggies” for faces that are wider than 1 pixel. This consists of blurring edges with sharp color transitions. But, MSAA will start showing “narrow face breakup” when faces are getting narrower than ½ pixel wide.
The following rules are estimated guidelines to avoid “narrow face breakup”.
With single sample point sampling, narrow faces should have a width > ~1 pixel).
For MSAA4, they should be > ½ to ¼ pixel wide. For MSAA8, they should be > 1/4 to 1/8 pixel wide. MSAA works better for triangle edges that are near vertical or near horizontal.
ABAA4 can handle narrow faces > ¼ pixel wide. ABAA8 can handle narrow faces > 1/8 pixel wide. As faces become narrower, the color contrast decreases, making the narrow face breakup less noticeable.
2. “gradient overflow”: When faces become narrower than 1 or 2 pixels wide, the function gradients (for color, intensity an z-depth) can become very large. This can cause gradient overflow when the sample point is outside of the face.
Since ABAA samples these functions at the center of pixels, gradient overflow can occur when the sample point of narrow faces is outside of faces.
In order to prevent overflow of function gradients in the projected triangle, the gradients should be clamped for faces narrower than 2-pixel wide, for example. There is a patent from M A Rohner that provides a solution for gradient clamping.
Method and apparatus for clamping image gradients
US US6184887B1 Michel A. Rohner, Oak Technology, Inc., 2/6/2001.
https://patentimages.storage.googleapis.com/fc/12/09/fa30d26af5f2ba/US6184887.pdf
Availability of Systems with ABAA
Q: Where can I get a computer system with ABAA.
A: ABAA is a new solution for anti-aliasing in CGI. After companies decide to manufacture systems with ABAA, it should take between 6 months to 2 years until systems appear in the market. Most current systems using point sample will become obsolete. But knowing that better anti-aliasing systems will be available soon might influence how much you want to spend on an expensive system now. ABAA is an attractive solution for computer hardware. It is not a question of if, it is a question of when.
Also, the ABAA solution can be applied in software for 3D rendering. This would save processing time for TV advertising and Movies. The better image quality and faster processing should be an incentive for modifying rendering programs.
MSAA and Solutions to the 8-Queens Puzzle
Q: How to Select Sample Points for MSAA4 and MSAA8?
A: In the literature, the selection of sample points within a pixel for MSAA8 is often referred to as “solutions to the 8-queens puzzle”. The idea is to position 8 queens (Qs) on a chess board, so that no Q can attack another Q. Refer to Figure 1
How Good are the Solutions to the 8-Queens Puzzle
Q: Does the 8-queens puzzle provide good solutions for selecting MSAA sample points?
A: The 8-queens puzzle canprovide acceptable solutions for MSAA8.
Not all solutions to the puzzle provide good results for MSAA8. Also, there are better sample point selections that are not solutions to the 8-Qs puzzle.
When considering near horizontal (HE) and near vertical (VE) edges (i.e. edges at 0 and 90 degrees), all solutions to the puzzle provide good results for MSAA8. As HEs or VEs move across the Qs, the color mix changes in 8 equal intensity steps, similar to ABAA. But, for edge with angles in-between the effectiveness of anti-aliasing is degraded.
On the other hand, the ABAA solution works consistently for all edge angles.
Also, cases where 2Qs can attack each other diagonally (at 45 degrees), should be allowed. It looks like the solutions could even be better, when the 45 degrees constraint is removed. Then it is no longer a solution to the 8-Qs puzzle. May be, 2 Qs should be allowed to align diagonally and the name should be changed to “solutions to the 8 rooks puzzle”,
Another consideration consists of cases when several Qs are aligned with edges. With 8 Qs, there are at least 1+2+3+4+5+6+7=28 cases where 2 Qs are aligned with an edge. In these cases, the intensity steps become larger when edges cross several Qs at once. Cases with more than 3 aligned Qs should be avoided.
Also, the width of gaps between aligned edges should be minimized. In example 4 of Figure 1, two pairs of Qs have swapped rows or columns to reduce the gaps between aligned edges. After the swaps, there is a better distribution of the Qs. Two pairs of Qs are now aligned at 45 degrees. This becomes now a “solutions to the 8-rooks puzzle”.
Similarly, for MSAA4, the sample points can be selected as “solutions to the 4-rooks puzzle”.