David Luebke 3/17/2016 Advanced Computer Graphics Antialiasing David Luebke

Slides:



Advertisements
Similar presentations
Sampling, Aliasing.
Advertisements

Sampling and Reconstruction
Technische Universität München Fakultät für Informatik Computer Graphics SS 2014 Sampling Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung.
David Luebke 1 4/28/2015 Aliasing & Antialiasing.
Computer Graphics Viewing, Rendering, Antialiasing گرد آوري و تاليف: دكتر احمد رضا نقش نيل چي دانشگاه اصفهان گروه مهندسي كامپيوتر.
David Luebke1/19/99 CS 551/651: Antialiasing David Luebke
03/12/02 (c) 2002 University of Wisconsin, CS559 Last Time Some Visibility (Hidden Surface Removal) algorithms –Painter’s Draw in some order Things drawn.
CS 551 / CS 645 Antialiasing. What is a pixel? A pixel is not… –A box –A disk –A teeny tiny little light A pixel is a point –It has no dimension –It occupies.
Aliasing & Antialiasing
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
Immagini e filtri lineari. Image Filtering Modifying the pixels in an image based on some function of a local neighborhood of the pixels
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
CS5520 Image-Based Rendering © Chun-Fa Chang, Spring 2003 Sampling Theorem & Antialiasing April 15, 2003.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling.
1 Image filtering Images by Pawan SinhaPawan Sinha.
Matlab Tutorial Continued Files, functions and images.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
Linear Filtering About modifying pixels based on neighborhood. Local methods simplest. Linear means linear combination of neighbors. Linear methods simplest.
Most slides from Steve Seitz
9/20/2001CS 638, Fall 2001 Today Finishing Up Reflections More Multi-Pass Algorithms Shadows.
Sampling and Antialiasing CMSC 491/635. Abstract Vector Spaces Addition –C = A + B = B + A –(A + B) + C = A + (B + C) –given A, B, A + X = B for only.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 3 Ravi Ramamoorthi
Direct Illumination with Lazy Visibility Evaluation David Hart Philip Dutré Donald P. Greenberg Cornell University SIGGRAPH 99.
Filtering theory: Battling Aliasing with Antialiasing Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
CS 431/636 Advanced Rendering Techniques
© Chun-Fa Chang Sampling Theorem & Antialiasing. © Chun-Fa Chang Motivations “ My ray traced images have a lot more pixels than the TV screen. Why do.
Antialiasing CptS 548 Advanced Computer Graphics John C. Hart.
Attributes of Graphics Primitives Sang Il Park Sejong University.
David Luebke 1 9/4/2015 CS 551/651: Advanced Computer Graphics Antialiasing Continued: Prefiltering and Supersampling.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
01/28/05© 2005 University of Wisconsin Last Time Improving Monte Carlo Efficiency.
Antialiasing CAP4730: Computational Structures in Computer Graphics.
3/4/04© University of Wisconsin, CS559 Spring 2004 Last Time Clipping Lines –Cohen-Sutherland: The use of outcodes and early reject/accept tests –Liang-Barsky:
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Distribution Ray Tracing.
CSC418 Computer Graphics n BSP tree n Z-Buffer n A-buffer n Scanline.
10/26/04© University of Wisconsin, CS559 Fall 2004 Last Time Drawing lines Polygon fill rules Midterm Oct 28.
Filtering Robert Lin April 29, Outline Why filter? Filtering for Graphics Sampling and Reconstruction Convolution The Fourier Transform Overview.
CS 450: COMPUTER GRAPHICS ANTIALIASING SPRING 2015 DR. MICHAEL J. REALE.
Week 6 - Wednesday.  What did we talk about last time?  Light  Material  Sensors.
Stream Processing Main References: “Comparing Reyes and OpenGL on a Stream Architecture”, 2002 “Polygon Rendering on a Stream Architecture”, 2000 Department.
Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Visible-Surface Detection Methods
CMSC 635 Sampling and Antialiasing. Aliasing in images.
Digital Image Processing Lecture 10: Image Restoration
David Luebke 1 12/2/2015 CS 551/651: Advanced Computer Graphics Advanced Ray Tracing Radiosity.
Sang Il Park Sejong University
Duy & Piotr. How to reconstruct a high quality image with the least amount of samples per pixel the least amount of resources And preserving the image.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
Sampling Pixel is an area!! – Square, Rectangular, or Circular? How do we approximate the area? – Why bother? Color of one pixel Image Plane Areas represented.
Sampling Theorem & Antialiasing
CS559: Computer Graphics Lecture 12: Antialiasing & Visibility Li Zhang Spring 2008.
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
01/26/05© 2005 University of Wisconsin Last Time Raytracing and PBRT Structure Radiometric quantities.
David Luebke3/12/2016 Advanced Computer Graphics Lecture 3: More Ray Tracing David Luebke
COMPUTER GRAPHICS CS 482 – FALL 2015 NOVEMBER 10, 2015 VISIBILITY CULLING HIDDEN SURFACES ANTIALIASING HALFTONING.
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling.
Advanced Computer Graphics
Distributed Ray Tracing
Sampling Theorem & Antialiasing
Sampling and Antialiasing
Advanced Computer Graphics:
Sampling Theorem told us …
Joshua Barczak CMSC435 UMBC
Distributed Ray Tracing
Distributed Ray Tracing
Distributed Ray Tracing
Presentation transcript:

David Luebke 3/17/2016 Advanced Computer Graphics Antialiasing David Luebke

David Luebke 3/17/2016 Administrivia l Assignment 1 sample scenes

David Luebke 3/17/2016 Recap l Prefiltering –Before sampling the image, use a low- pass filter to eliminate frequencies above the Nyquist limit –This blurs the image… –But ensures that no high frequencies will be misrepresented as low frequencies

David Luebke 3/17/2016 Recap l Supersampling –Sample image at higher resolution than final image, then “average down” –“Average down” means multiply by low- pass function in frequency domain –Which means convolving by that function’s FT in space domain –Which equates to a weighted average of nearby samples at each pixel

David Luebke 3/17/2016 Recap l Supersampling cons –Doesn’t eliminate aliasing, just shifts the Nyquist limit higher n Can’t fix some scenes (e.g., checkerboard) –Badly inflates storage requirements l Supersampling pros –Relatively easy –Often works all right in practice –Can be added to a standard renderer

David Luebke 3/17/2016 Antialiasing in the Continuous Domain l Problem with prefiltering: –Sampling and image generation inextricably linked in most renderers n Z-buffer algorithm n Ray tracing –Why? l Still, some approaches try to approximate effect of convolution in the continuous domain

David Luebke 3/17/2016 Antialiasing in the Continuous Domain Pixel Grid Polygons Filter kernel

David Luebke 3/17/2016 Antialiasing in the Continuous Domain l The good news –Exact polygon coverage of the filter kernel can be evaluated –What does this entail? n Clipping n Hidden surface determination

David Luebke 3/17/2016 Antialiasing in the Continuous Domain l The bad news –Evaluating coverage is very expensive –The intensity variation is too complex to integrate over the area of the filter n Q: Why does intensity make it harder? n A: Because polygons might not be flat- shaded n Q: How bad a problem is this? n A: Intensity varies slowly within a pixel, so shape changes are more important

David Luebke 3/17/2016 Catmull’s Algorithm ABAB A1A1 A2A2 A3A3 l Find fragment areas l Multiply by fragment colors l Sum for final pixel color

David Luebke 3/17/2016 Catmull’s Algorithm l First real attempt to filter in continuous domain l Very expensive –Clipping polygons to fragments –Sorting polygon fragments by depth (What’s wrong with this as a hidden surface algorithm?) l Equates to box filter (Is that good?)

David Luebke 3/17/2016 The A-Buffer l Idea: approximate continuous filtering by subpixel sampling l Summing areas now becomes simple

David Luebke 3/17/2016 The A-Buffer l Advantages: –Incorporating into scanline renderer reduces storage costs dramatically –Processing per pixel depends only on number of visible fragments –Can be implemented efficiently using bitwise logical ops on subpixel masks

David Luebke 3/17/2016 The A-Buffer l Disadvantages –Still basically a supersampling algorithm –Not a hardware-friendly algorithm n Lists of potentially visible polygons can grow without limit n Work per-pixel non-deterministic

David Luebke 3/17/2016 The A-Buffer l Comments –Book claims this is most common algorithm for high-quality rendering –I’m not so sure, anymore –Book gives much gory detail –I won’t test you on it

David Luebke 3/17/2016 Stochastic Sampling l Sampling theory tells us that with a regular sampling grid, frequencies higher than the Nyquist limit will alias l Q: What about irregular sampling? l A: High frequencies appear as noise, not aliases l This turns out to bother our visual system less!

David Luebke 3/17/2016 Stochastic Sampling l An intuitive argument: –In stochastic sampling, every region of the image has a finite probability of being sampled –Thus small features that fall between uniform sample points tend to be detected by non-uniform samples

David Luebke 3/17/2016 Stochastic Sampling l Integrating with different renderers: –Ray tracing: n It is just as easy to fire a ray one direction as another –Z-buffer: hard, but possible n Notable example: REYES system (?) n Using Image jittering is easier (more later) –A-buffer: nope n Totally built around square pixel filter and primitive-to-sample coherence

David Luebke 3/17/2016 Stochastic Sampling l Idea: randomizing distribution of samples scatters aliases into noise l Problem: what type of random distribution to adopt? l Reason: type of randomness used affects spectral characteristics of noise into which high frequencies are converted

David Luebke 3/17/2016 Stochastic Sampling l Problem: given a pixel, how to distribute points (samples) within it?

David Luebke 3/17/2016 Stochastic Sampling l Poisson distribution: –Completely random –Add points at random until area is full. –Uniform distribution: some neighboring samples close together, some distant

David Luebke 3/17/2016 Stochastic Sampling l Poisson disc distribution: –Poisson distribution, with minimum- distance constraint between samples –Add points at random, removing again if they are too close to any previous points –Very even-looking distribution

David Luebke 3/17/2016 Stochastic Sampling l Jittered distribution –Start with regular grid of samples –Perturb each sample slightly in a random direction –More “clumpy” or granular in appearance

David Luebke 3/17/2016 Stochastic Sampling l Spectral characteristics of these distributions: –Poisson: completely uniform (white noise). High and low frequencies equally present –Poisson disc: Pulse at origin (DC component of image), surrounded by empty ring (no low frequencies), surrounded by white noise –Jitter: Approximates Poisson disc spectrum, but with a smaller empty disc.

David Luebke 3/17/2016 Stochastic Sampling l Watt & Watt, p. 134

David Luebke 3/17/2016