
Jasper van de Gronde wrote:
Juan Vuletich wrote:
... I believe that existing rasterizers for 2d graphics use either pixel coverage or super sampling. Please point me to some reference if I'm wrong.
Applying a real filter to a continuous ("analog") function and then sampling is something quite different.
Not really. Pixel coverage is just applying a very simple filter. Super sampling is approximating such a simple filter.
Right. I also say that in my web page.
Admittedly they might not be the best filters possible, but for vector graphics it often doesn't make sense to use filters of very high orders, as that usually introduces ringing. Note that Inkscape could do with a slightly better filter though. It more or less uses a box filter now, using a tent function would probably be better (no ringing, smoother result).
A lot of experimenting showed me that the shape of the filter is not that important for most images. It does come into play for synthetic images created especially to show aliasing effects. (And as you say, ringing effects would be much worse than lack of smoothness). What is really important for vector graphics is the spatial size of the pixel, related to the "cutoff frequency" (even if step filters don't have a real cutoff frequency). Both pixel coverage and super sampling produce a filter that is one pixel in size. This is not low enough to avoid aliasing, as it doesn't take into account the Kell factor.
For most renderers the main problem is combining different layers in such a way that no seams appear. I've thought of some solutions that involve adding another channel that more explicitly records the shapes. And if you do super sampling all the way the problem is also reduced. But if you have a method that can eliminate the seams which has the following properties I'll be first in line to see it implemented in Inkscape:
- No seams!
- Allow compositing AFTER rasterizing, still without seams.
- Rasterization not much slower than normal rasterization.
- Compositing not much slower than normal compositing.
- No or very little additional memory usage.
My technique has most those properties. But it does need extra memory.
As for subpixel rendering with Inkscape, you could just export to an image with three times the width and apply some postprocessing. Not perfect, but it would allow a more or less fair comparison.
Indeed. You can also look at http://www.jvuletich.org/Morphic3/tigerWholePixel.png , as a said in another response 10 minutes ago.
Cheers, Juan Vuletich