On Thu, 14 Nov 2002 15:02:49 +0100
David Balazic <[EMAIL PROTECTED]> wrote:

David,

More smooth is not necessarily less "alias," as you put it. Smoothing filters work by spreading pixels values into surrounding pixels. The effect of this is to remove high frequencies from the image. But the goal of antialiasing is different. We don't want to make the resulting image smoother, per se, we want to make it more *accurate*. In other words, we want to consider pixel coverage on the sub-pixel level, and color pixels according to a more accurate scheme than "If the center of the pixel is covered, then the pixel is on."

There are two kinds of aliasing going on in your scheme. The first is the aliasing introduced by rendering: square pixel edges causing stairsteps. The second kind of aliasing is spatial aliasing, when you down-size the image to produce the final result (due to Nyquist's theorem). You can simultaneously remove both kinds of aliasing by coverage-averaging little chunks of the image into the final pixels.

By this I mean that if a rectangle partially covers a source pixel by X amount, then that pixel will contribute X amount to the final color of the destination pixel. If we're scaling from a 4x4 group of pixels to a 1x1 group (down-size 4x), then each square of 16 pixels in the source will be averaged to produce the final destination pixel.

You are suggesting using overlay with alpha to perform this task. Problem is, alpha works on a pixel-by-pixel basis. The color of the resulting pixel will only be affected by its color before. But to do filtering, you need to take into account the values of *other* pixels in the source. Alpha can't do that, you need a real filter.

The other big disadvantage to this scheme is that you have to render the source image at double the size, which means you have to render four times as many pixels. This is in fact how programs like raytracers do antialiasing, but raytracers are extremely slow. Like I said, there are much better antialiasing methods for different situations, like drawing lines, polygons, glyphs, etc. Supersampled antialiasing on the scale of entire images is sort of a luxury of non-realtime rendering systems.

Scott Long

Your other options would make the image "smoother," but only because
they would blur the image.
More smooth == less alias , or am I missing something ?

You can't resize an image to a larger size
and get more detail out of nothing.
And we don't want more detail, just less alias.

The only effect a filter would
have would be to smear the image.

>Examples of use :
>
> - text anti-alias :
> render the text at lower resolution, then scale it up
> to some higher resolution, and get AA filtering for "free"
>
> - 3D FSAA : render at higher resolution, scale down to get FSAA
> ( using the same resolution ( 1:1 scaling ) might give something
> useful too ? )
>
>Opinions ?

Unfortunately, that won't work at all. What you want to do is render
the text at a *higher* resolution and then scale the result *down* to
the display resolution using coverage-weighted averaging. You can't
get anything for free! If you tried what you suggest, what you'd end
up with would be a blocky character that shows stairstepping, except
the stairsteps would be blurry. Not only ugly, but a headache-inducer
:-)
I think proper filtering would remove the stairs ( the low res ones, the
high res ones ( the final image ) depend on the way the RAM-DAC operates
)

There are many (and *much* better) techniques for antialiasing fonts
in particular that don't resort to this brute-force supersampling
method.

Scott Long
SwiftView, Inc. http://www.swiftview.com
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to