AntialiasingCSE167: Computer GraphicsInstructor: Steve RotenbergUCSD, Fall 2005Texture MinificationConsider a texture mapped triangleAssume that we point sample our texture so that we use the nearest texel to the center of the pixel to get our colorIf we are far enough away from the triangle so that individual texels in the texture end up being smaller than a single pixel in the framebuffer, we run into a potential problemIf the object (or camera) moves a tiny amount, we may see drastic changes in the pixel color, as different texels will rapidly pass in front of the pixel centerThis causes a flickering problem known as shimmering or buzzingTexture buzzing is an example of aliasingSmall TrianglesA similar problem happens with very small trianglesScan conversion is usually designed to point sample triangles by coloring the pixel according to the triangle that hits the center of the pixelThis has the potential to miss small trianglesIf we have small, moving triangles, they may cause pixels to flicker on and off as they cross the pixel centersA related problem can be seen when very thin triangles cause pixel gapsThese are more examples of aliasing problemsStairsteppingWhat about the jagged right angle patterns we see at the edges of triangles?This is known as the stairstepping problem, also affectionately known as “the jaggies”These can be visually distracting, especially for high contrast edges near horizontal or verticalStairstepping is another form of aliasingMoiré PatternsWhen we try to render high detail patterns with a lot of regularity (like a grid), we occasionally see strange concentric curve patterns formingThese are known as Moiré patterns and are another form of aliasingYou can actually seethese in real life if youhold two windowscreens in front ofeach otherThe Propeller ProblemConsider an animation of a spinning propeller, that is rendering at 30 frames per secondIf the propeller is spinning at 1 rotation per second, then each image shows the propeller rotated an additional 12 degrees, resulting in the appearance of correct motionIf the propeller is now spinning at 30 rotations per second, each image shows the propeller rotated an additional 360 degrees from the previous image, resulting in the appearance of the propeller sitting still!If it is spinning at 29 rotations per second, it will actually look like it is slowly turning backwardsThese are known as strobing problems and are another form of aliasingAliasingThese examples cover a wide range of problems, but they all result from essentially the same thingIn each situation, we are starting with a continuous signalWe then sample the signal at discreet pointsThose samples are then used to reconstruct a new signal, that is intended to represent the original signalHowever, the reconstructed signals are a false representation of the original signalsIn the English language, when a person uses a false name, that is known as an alias, and so it was adapted in signal analysis to apply to falsely represented signalsAliasing in computer graphics usually results in visually distracting artifacts, and a lot of effort goes into trying to stop it. This is known as antialiasingSignalsThe term signal is pretty abstract, and has been borrowed from the science of signal analysisSignal analysis is very important to several areas of engineering, especially electrical, audio, and communicationsSignal analysis includes a variety of mathematical methods for examining signals such as Fourier analysis, filters, sampling theory, digital signal processing (DSP), and moreIn electronics, a one dimensional signal can refer to a voltage changing over time. In audio, it can refer to the sound pressure changing over timeIn computer graphics, a one dimensional signal could refer to a horizontal or vertical line in our image. Notice that in this case, the signal doesn’t have to change over time, instead it varies over space (the x or y coordinate)Often signals are treated as functions of one variable and examples are given in the 1D case, however the concepts of signal analysis extend to multidimensional signals as well, and so we can think of our entire 2D image as a signalSamplingIf we think of our image as a bunch of perfect triangles in continuous (floating point) device space, then we are thinking of our image as a continuous signalThis continuous signal is can have essentially infinite resolution if necessary, as the edges of triangles are perfect straight linesTo render this image onto a regular grid of pixels, we must employ some sort of discreet sampling techniqueIn essence, we take our original continuous image and sample it onto a finite resolution grid of pixelsIf our signal represents the red intensity of our virtual scene along some horizontal line, then the sampled version consists of a row of discreet 8 bit red valuesThis is similar to what happens when a continuous analog sound signal is digitally sampled onto a CDReconstructionOnce we have our sampled signal, we then reconstruct itIn the case of computer graphics, this reconstruction takes place as a bunch of colored pixels on a monitorIn the case of CD audio, the reconstruction happens in a DAC (digital to analog converter) and then finally in the physical movements of the speaker itselfReconstruction FiltersNormally, there is some sort of additional filtration that happens at the reconstruction phaseIn other words, the actual pixels on the monitor are not perfect squares of uniform color. Instead they will have some sort of color distributionAdditional filtration happens in the human eye so that the grid of pixels appears to be a continuous imageIn audio, the perfect digital signal is filtered first by the analog electronic circuitry and then by the physical limitations of the speaker movementLow Frequency SignalsOriginal signalPoint sampled at relatively high frequencyReconstructed signalHigh Frequency SignalsOriginal signalPoint sampled at relatively low frequencyReconstructed signalRegular SignalsOriginal repeating signalPoint sampled at relatively low frequencyReconstructed signal repeating at incorrect frequencyNyquist FrequencyTheoretically, in order to adequately reconstruct a signal of frequency x, the original signal must be sampled with a frequency of greater than 2xThis is known as
View Full Document