3 ms·
I never said filter after rasterizing. Pixel-sized squares have the same issue if you filter before rasterizing. The only reason pixel-sized square survive su
by colanderman 10y ago
I never said filter after rasterizing. Pixel-sized squares have the same issue if you filter before rasterizing.
The only reason pixel-sized square survive supersampling intact is because supersampling uses an imperfect low-pass filter (block-based averaging). Here is a good example showing the shortcoming of straight supersampling: https://people.cs.clemson.edu/~tadavis/cs809/aa/aliasing5.png https://people.cs.clemson.edu/~tadavis/cs809/aa/aliasing5.pn...
You NEED to apply a true low-pass filter before rasterizing to completely eliminate Moiré patterns. Whether a round of supersampling occurs before this filtering is irrelevant. And pixel-sized squares don't survive low-pass filters intact, see https://en.wikipedia.org/wiki/Gibbs_phenomenon#Signal_processing_explanation https://en.wikipedia.org/wiki/Gibbs_phenomenon#Signal_proces...
- Dylan16807 10y agoYour goal is to take a pixel-sized square with sharp edges and render it on a screen composed of squares. If it displays wrong, you used the wrong method. You can't blame signal theory. In the case of your second link, the problem is inappropriately applying a low-pass filter. This makes the edge of the square non-sharp, and adds distortion effects multiple pixels away. This portion of signal theory only applies to a world made entirely out of frequencies. This causes problems when you try to apply it to realistic shapes. It's great for audio, not so great for rendering. The use of point samples does not automatically imply you should be using it. If you don't like supersampling, that's fine. But you need to pick an antialiasing method that's compatible with the concept of 'edges'. Edit: You added "You NEED to apply a true low-pass filter before rasterizing to completely eliminate Moiré patterns." I don't think that's right. It should look fine if you use brute force to calculate how much of every texel on every polygon shows up in every pixel. And it should look fine with much more efficient approximations of that. At no point should it be necessary to use filters that can cause ring effects multiple pixels away.
- smallnamespace 10y ago> This portion of signal theory only applies to a world made entirely out of frequencies. That's not precisely true: discrete blocks or edges can be approximated arbitrarily closely in Fourier frequency space -- you just need to admit higher-frequency components. 'Pixel-sized square' is properly an oxymoron if you view pixels purely as samples -- a 'true' square can only be represented by an infinitely dense set of pixel samples. But this is a feature, not a bug, because neither computer monitors, nor the human eye, can render nor see a 'true' square either, only successively better approximations to them.
- Dylan16807 10y ago> That's not precisely true: discrete blocks or edges can be approximated arbitrarily closely in Fourier frequency space -- you just need to admit higher-frequency components. You can approximate those shapes, but that's an approximation. It's not impossible to do the math that way, but there are stumbling blocks to dodge. Like weird artifacts when you low-pass. > 'Pixel-sized square' is properly an oxymoron if you view pixels purely as samples -- a 'true' square can only be represented by an infinitely dense set of pixel samples. It's a square equal in size to the square-grid pixel spacing. It's not wrong, it's just being non-pedantic. > But this is a feature, not a bug, because neither computer monitors, nor the human eye, can render nor see a 'true' square either, only successively better approximations to them. A monitor does not quite deliver perfect squares, but what it displays is a lot closer to a square than to this shape: https://upload.wikimedia.org/wikipedia/commons/f/f8/Gibbs_phenomenon_10.svg https://upload.wikimedia.org/wikipedia/commons/f/f8/Gibbs_ph... So calculating it more like that is not a feature.
- smallnamespace 10y ago> A monitor does not quite deliver perfect squares, Monitors don't display colored squares, period: https://upload.wikimedia.org/wikipedia/commons/4/4d/Pixel_geometry_01_Pengo.jpg https://upload.wikimedia.org/wikipedia/commons/4/4d/Pixel_ge... Our cone cells also don't see colored squares, and in fact each color's distribution is random: https://askabiologist.asu.edu/sites/default/files/resources/articles/seecolor/model-retina-rods-cones-200.jpg https://askabiologist.asu.edu/sites/default/files/resources/... In fact, CRTs phosphors didn't even correspond to logical computer pixels. If your CRT resolution was lower than the maximum phosphor grid resolution of the CRT mask, then a single pixel would indeed spread across more than one tri-color phosphor group. Signal theory points reminds us that 'square pixels' are just an arbitrary shortcut. We could equally well describe them as hexagons, ovals, or rectangles, or make the grid positions random, and monitors would work just as well. That's why when you blow up a and render it as a giant square with exact edges, it's a very misleading and arbitrary choice.
- lmm 10y ago
- makomk 10y agoYou can just design your game art to avoid Moiré patterns. This is also what all TV productions generally do.