Docsity

Antialiasing - Introduction to Computer Graphics - Lecture Slides, Slides of Computer Graphics

Partial preview of the text

Download Antialiasing - Introduction to Computer Graphics - Lecture Slides and more Slides Computer Graphics in PDF only on Docsity!

Antialiasing

Texture Minification^ „^ Consider a texture mapped triangle^ „^ Assume that we

point sample

our texture

so that we use the nearest texel to thecenter of the pixel to get our color „ If we are far enough away from thetriangle so that individual texels in thetexture end up being smaller than a singlepixel in the framebuffer, we run into apotential problem „ If the object (or camera) moves a tinyamount, we may see drastic changes inthe pixel color, as different texels willrapidly pass in front of the pixel center „ This causes a flickering problem known as shimmering

or^ buzzing

„^ Texture buzzing is an example of

aliasing

Stairstepping^ „^

What about the jagged right anglepatterns we see at the edges oftriangles? „ This is known as the

stairstepping

problem, also affectionately knownas “

the jaggies

„^ These can be visually distracting,especially for high contrast edgesnear horizontal or vertical „^ Stairstepping is another form of^ aliasing

Moiré Patterns „ When we try to render high detail patternswith a lot of regularity (like a grid), weoccasionally see strange concentric curvepatterns forming „ These are known as Moiré patterns and areanother form of aliasing „ You can actually seethese in real life if youhold two windowscreens in front ofeach other

Aliasing^ „^ These examples cover a wide range of problems, but they all resultfrom essentially the same thing^ „^ In each situation, we are starting with a

continuous signal

„^ We then

sample

the signal at

discreet points

„^ Those samples are then used to

reconstruct

a new signal, that is

intended to represent the original signal „ However, the reconstructed signals are a false representation of theoriginal signals „ In the English language, when a person uses a false name, that isknown as an

alias

, and so it was adapted in

signal analysis

to apply

to falsely represented signals „ Aliasing in computer graphics usually results in visually distracting artifacts

, and a lot of effort goes into trying to stop it. This is known as^ antialiasing

Signals^ „^ The term

signal

is pretty abstract, and has been borrowed from the science

of^ signal analysis „ Signal analysis is very important to several areas of engineering, especiallyelectrical, audio, and communications „ Signal analysis includes a variety of mathematical methods for examiningsignals such as Fourier analysis, filters, sampling theory, digital signalprocessing (DSP), and more „ In electronics, a one dimensional signal can refer to a voltage changingover time. In audio, it can refer to the sound pressure changing over time „ In computer graphics, a one dimensional signal could refer to a horizontalor vertical line in our image. Notice that in this case, the signal doesn’t haveto change over time, instead it varies over space (the x or y coordinate) „ Often signals are treated as functions of one variable and examples aregiven in the 1D case, however the concepts of signal analysis extend tomultidimensional signals as well, and so we can think of our entire 2Dimage as a signal

Reconstruction^ „^ Once we have our sampled signal, we then

reconstruct

it

„^ In the case of computer graphics, this reconstructiontakes place as a bunch of colored pixels on a monitor „^ In the case of CD audio, the reconstruction happens in aDAC (digital to analog converter) and then finally in thephysical movements of the speaker itself

Reconstruction Filters^ „^ Normally, there is some sort of additional

filtration

that happens at

the reconstruction phase „ In other words, the actual pixels on the monitor are not perfectsquares of uniform color. Instead they will have some sort of colordistribution „ Additional filtration happens in the human eye so that the grid ofpixels appears to be a continuous image „ In audio, the perfect digital signal is filtered first by the analogelectronic circuitry and then by the physical limitations of thespeaker movement

High Frequency Signals^ „^ Original signal^ „^ Point sampled atrelatively low frequency^ „^ Reconstructed signal

Regular

Signals

„^ Original repeating signal „^ Point sampled atrelatively low frequency „^ Reconstructed signalrepeating at incorrectfrequency

Aliasing Problems^ „^ Shimmering / Buzzing:

Rapid pixel color changes (flickering) caused by high detail textures orhigh detail geometry. Ultimately due to point sampling of high frequencycolor changes at low frequency pixel intervals „^ Stairstepping / Jaggies:

Noticeable stairstep edges on high contrast edges that are nearlyhorizontal or vertical. Due to point sampling of effectively infinitefrequency color changes (step gradient at edge of triangle) „^ Moiré patterns:

Strange concentric curve features that show up on regular patterns.Due to sampling of regular patterns on a regular pixel grid „^ Strobing:

Incorrect or discontinuous motion in fast moving animated objects. Dueto low frequency sampling of regular motion in regular time intervals

Spatial / Temporal Aliasing^ „^ Aliasing shows up in a variety of forms, but usually thosecan be separated into either

spatial

or^

temporal

aliasing

„^ Spatial aliasing refers to aliasing problems based onregular sampling in space. This usually implies devicespace, but we see other forms of spatial aliasing as well „^ Temporal aliasing refers to aliasing problems based onregular sampling in time „^ The antialiasing techniques used to fix these two thingstend to be very different, although they are based on thesame fundamental principles

Box Sampling^ „^ We could also do a hypothetical

box sampling

(or

box

filter

) of our image

„^ In this method, each triangle contributes to the pixelcolor based on the area of the triangle within the pixel „^ The area is equally weighted across the pixel

Pyramid Sampling^ „^ Alternately, we could use a weighted sampling filter suchas a pyramid filter^ „^ The pyramid filter considers the area of triangles in thepixel, but weights them according to how close they areto the center of the pixel