130 likes | 154 Vues
Advanced Computer Graphics:. James Gain Department of Computer Science University of Cape Town jgain@cs.uct.ac.za. Objectives. To show the problems caused by sampling in computer graphics (aliasing). To describe a variety of methods designed to combat these effects (antialiasing).
E N D
Advanced Computer Graphics: James Gain Department of Computer ScienceUniversity of Cape Town jgain@cs.uct.ac.za Advanced Computer GraphicsCollaborative Visual Computing Laboratory
Objectives • To show the problems caused by sampling in computer graphics (aliasing). • To describe a variety of methods designed to combat these effects (antialiasing). • Slides taken from ACM SIGGRAPH Educator’s Slide Set. Advanced Computer Graphics
Aliasing • Occurs when the sampling inherent in rendering does not contain enough information for an accurate image. Sampling Pixel Centres Rendered Image Original Scene Scanline Luminosity Sampled Signal Luminosity Signal Advanced Computer Graphics
Effects of Aliasing • Common aliasing errors (called artefacts) are: jagged profiles, disappearing or improperfine detail, and disintegrating textures. Jagged Profiles Loss of Detail Advanced Computer Graphics
Disintegrating Texture • The checkers on a plane should become smaller with distance. • But aliasing causes them to become larger and/or irregular. • Increasing resolutiononly moves the artefact closer to the horizon. Advanced Computer Graphics
Antialiasing • Developed to combat aliasing. • Applies to all types of aliasing – PSC, RT and temporal. • Prefiltering: • Treat a pixel as an area. Calculate overlap of polygon with pixel. Costly • Postfiltering (supersampling): • Compute pixel colour by averaging multiple samples. Preferred Method. • Sample the scene at n times the display resolution. For example, suppose the display resolution is 512x512. Sampling at three times the width and three times the height of the display resolution would yield 1536x1536 samples. • A filter provides the weights used to compute the average. Advanced Computer Graphics
Prefiltering No Antialiasing Prefiltering Advanced Computer Graphics
Postfiltering • Sampling: take jittered, regular or random samples. • Averaging: use an filter to assign weights to each sample. Sum all the weighted samples to obtain a pixel. Jittered Regular Advanced Computer Graphics
Filtering Example Advanced Computer Graphics
Antialiasing Examples Advanced Computer Graphics