1 / 26

CS 445 / CS 645

CS 445 / CS 645. Antialiasing. Today. Final Exam Thursday, December 13 th at 7:00 Project 4-1 Out Movies. Samples. Sampling Errors. Some objects missed entirely, others poorly sampled. Supersampling. Take more than one sample for each pixel and combine them

agrata
Télécharger la présentation

CS 445 / CS 645

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 445 / CS 645 Antialiasing

  2. Today • Final Exam • Thursday, December 13th at 7:00 • Project 4-1 Out • Movies

  3. Samples

  4. Sampling Errors • Some objects missed entirely, others poorly sampled

  5. Supersampling • Take more than one sample for each pixel and combine them • Do you actually render more pixels? • Can you combine the few pixels you have? • How many samples is enough? • How do we know no features are lost?

  6. Unweighted Area Sampling • Average supersampled points • All points are weighted equally

  7. Weighted Area Sampling • Points in pixel are weighted differently • Flickering occurs as object movesacross display • Overlapping regions eliminates flicker

  8. How is this done today?Full Screen Antialiasing • Nvidia GeForce2 • OpenGL: scale image 400% and supersample • Direct3D: scale image 400% - 1600% • 3Dfx Multisampling • 2- or 4-frame shift and average • Nvidia GeForce3 • Multisampling but with fancy overlaps • ATI SmoothVision • Programmer selects samping pattern

  9. GeForce3 • Multisampling • After each pixel is rendered, write pixel value to two different places in frame buffer

  10. GeForce3 - Multisampling • After rendering two copies of entire frame • Shift pixels of Sample #2 left and up by ½ pixel • Imagine laying Sample #2 (red) over Sample #1 (black)

  11. GeForce3 - Multisampling • Resolve the two samples into one image by computing average between each pixel from Sample 1 (black) and the four pixels from Sample 2 (red) that are 1/ sqrt(2) pixels away

  12. GeForce3 - Multisampling • No AA Multisampling

  13. GeForce3 - Multisampling • 4x Supersample Multisampling

  14. Signal Theory • Convert spatial signal to frequency domain

  15. Signal Theory • Represent spatial signal as sum of sine waves (varying amplitude and phase shift)

  16. Fourier Analysis • Convert spatial domain to frequency domain • U is a complex number representing amplitude and phase shift • i = sqrt (-1)

  17. Fourier Transform • Examples of spatial and frequency domains

  18. Nyquist Rate • The lower bound on the sampling rate equals twice the highest frequency component in the image’s spectrum • This lower bound is the Nyquist Rate

  19. Flaws with Nyquist Rate • Samples may not align with peaks

  20. Flaws with Nyquist Rate • When sampling below Nyquist Rate, resulting signal looks like a lower-frequency one

  21. Sampling in the Frequency Domain • Remember, sampling was defined as multiplying a grid of delta functions by the continuous image • This is called a convolution in frequency domain The sampling grid The function beingsampled

  22. Convolution • This amounts to accumulating copies of the function’s spectrum sampled at the delta functions of the sampling grid

  23. Filtering • To lower Nyquist rate, remove high frequencies from image: low-pass filter • Only low frequencies remain • Sinc function is common filter: • sinc(x) = sin (px)/px Frequency Domain Spatial Domain

  24. Sinc Filter • Slide filter along spatial domain and compute new pixel value that results from convolution

  25. Bilinear Filter • Sometimes called a tent filter • Easy to compute • just linearly interpolate between samples • Finite extent and no negative values • Still has artifacts

  26. Sampling Pipeline

More Related