David Luebke 1 9/4/2015 CS 551/651: Advanced Computer Graphics Antialiasing Continued: Prefiltering and Supersampling.

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.
CSE 781 Anti-aliasing for Texture Mapping. Quality considerations So far we just mapped one point – results in bad aliasing (resampling problems) We really.
David Luebke 1 4/28/2015 Aliasing & Antialiasing.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Computer Graphics Viewing, Rendering, Antialiasing گرد آوري و تاليف: دكتر احمد رضا نقش نيل چي دانشگاه اصفهان گروه مهندسي كامپيوتر.
David Luebke1/19/99 CS 551/651: Antialiasing David Luebke
Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
MIT EECS 6.837, Durand and Cutler Sampling, Aliasing, & Mipmaps.
ATEC Procedural Animation Introduction to Procedural Methods in 3D Computer Animation Dr. Midori Kitagawa.
Week 7 - Wednesday.  What did we talk about last time?  Transparency  Gamma correction  Started texturing.
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
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi Some slides.
Sampling, Aliasing, & Mipmaps
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 5: Image Processing 2: Warping Ravi Ramamoorthi
Image Sampling Moire patterns
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.
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
Image Sampling Moire patterns -
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
CSC418 Computer Graphics n Aliasing n Texture mapping.
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.
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.
Dr Martin Hendry, Dept of Physics and Astronomy University of Glasgow, UK Astronomical Data Analysis I 11 lectures, beginning autumn 2008.
Antialiasing CptS 548 Advanced Computer Graphics John C. Hart.
Attributes of Graphics Primitives Sang Il Park Sejong University.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
Antialiasing CAP4730: Computational Structures in Computer Graphics.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
CSC418 Computer Graphics n BSP tree n Z-Buffer n A-buffer n Scanline.
CS 450: COMPUTER GRAPHICS ANTIALIASING SPRING 2015 DR. MICHAEL J. REALE.
Week 6 - Wednesday.  What did we talk about last time?  Light  Material  Sensors.
EECS 274 Computer Vision Segmentation by Clustering II.
Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
Lecture Fall 2001 From S. Zeki, Inner Vision.
CMSC 635 Sampling and Antialiasing. Aliasing in images.
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.
MIT EECS Sampling, Aliasing, & Mipmaps. MIT EECS Last Time? Global illumination “physically accurate light transport” The rendering equation.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
Sampling Theorem & Antialiasing
CS559: Computer Graphics Lecture 12: Antialiasing & Visibility Li Zhang Spring 2008.
1 Dr. Scott Schaefer Antialiasing. 2/70 What is aliasing?
Projects Project 1a due this Friday Project 1b will go out on Friday to be done in pairs start looking for a partner now.
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
David Luebke 3/17/2016 Advanced Computer Graphics Antialiasing 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.
Antialiasing. What is alias? Alias - A false signal in telecommunication links from beats between signal frequency and sampling frequency (from dictionary.com)
Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling.
Week 7 - Wednesday CS361.
Texture Mapping cgvr.korea.ac.kr.
Distributed Ray Tracing
Sampling Theorem & Antialiasing
Advanced Computer Graphics:
Anti-aliasing for Texture Mapping
Antialiasing Dr. Scott Schaefer.
Joshua Barczak CMSC435 UMBC
Distributed Ray Tracing
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Distributed Ray Tracing
Presentation transcript:

David Luebke 1 9/4/2015 CS 551/651: Advanced Computer Graphics Antialiasing Continued: Prefiltering and Supersampling

David Luebke 2 9/4/2015 Recap: Antialiasing Strategies l Prefiltering: low-pass filter the signal before sampling n Pros: u Guaranteed to eliminate aliasing u Preserves all desired frequencies n Cons: u Expensive u Can introduce “ringing” u Doesn’t fit most rendering algorithms

David Luebke 3 9/4/2015 Recap: Antialiasing Strategies l Supersampling: sample at higher resolution, then filter down n Pros: u Conceptually simple u Easy to retrofit existing renderers u Works well most of the time n Cons: u High storage costs u Doesn’t eliminate aliasing, just shifts Nyquist limit upwards

David Luebke 4 9/4/2015 Recap: Antialiasing Strategies l A-Buffer: approximate prefiltering of continuous signal by sampling n Pros: u Integrating with scan-line renderer keeps storage costs low u Can be efficiently implemented with clever bitwise operations n Cons: u Still basically a supersampling approach u Doesn’t integrate with ray-tracing

David Luebke 5 9/4/2015 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 6 9/4/2015 Stochastic Sampling l An intuitive argument: n In stochastic sampling, every region of the image has a finite probability of being sampled n Thus small features that fall between uniform sample points tend to be detected by non-uniform samples

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

David Luebke 8 9/4/2015 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 9 9/4/2015 Stochastic Sampling l Problem: given a pixel, how to distribute points (samples) within it?

David Luebke 10 9/4/2015 Stochastic Sampling l Poisson distribution: n Completely random n Add points at random until area is full. n Uniform distribution: some neighboring samples close together, some distant

David Luebke 11 9/4/2015 Stochastic Sampling l Poisson disc distribution: n Poisson distribution, with minimum-distance constraint between samples n Add points at random, removing again if they are too close to any previous points n Very even-looking distribution

David Luebke 12 9/4/2015 Stochastic Sampling l Jittered distribution n Start with regular grid of samples n Perturb each sample slightly in a random direction n More “clumpy” or granular in appearance

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

David Luebke 14 9/4/2015 Stochastic Sampling l Watt & Watt, p. 134 l See Foley & van Dam, p

David Luebke 15 9/4/2015 Nonuniform Supersampling l We’ve discussed two nonuniform sampling approaches n Adaptive supersampling: u Sample (say) once per pixel, then supersample if intensity changes a lot n Stochastic supersampling: u Use multiple samples per pixel, but not on a uniform grid l Can we filter nonuniform supersampled images?

David Luebke 16 9/4/2015 Nonuniform Supersampling l Recall: convolution I’ of filter h with image function I is given by: I’(x,y) =   I(i, j) h(x-i, y-j) l Can we use this equation for nonuniform sampling? l Implicit in this equation is a normalizing factor: we assume the filter weights sum to unity

David Luebke 17 9/4/2015 Nonuniform Supersampling Pixel

David Luebke 18 9/4/2015 Nonuniform Supersampling Sampling Grid

David Luebke 19 9/4/2015 Nonuniform Supersampling Polygon

David Luebke 20 9/4/2015 Nonuniform Supersampling Adaptive Sampling

David Luebke 21 9/4/2015 Nonuniform Supersampling Final Samples l Problem: n Many more purple samples than white samples n But final pixel actually more white than purple! n Simple filtering will not handle this correctly

David Luebke 22 9/4/2015 Nonuniform Supersampling l Approximate answer: weighted average filter n Divide total value of samples X filter by total value of filter at sample points:   I(i, j) h(x-i, y-j)   h(x-i, y-j) I’(x,y) =

David Luebke 23 9/4/2015 Nonuniform Supersampling l Correct answer: multistage filtering n Use weighted-average filters in cascade, sequentially applying filters with lower and lower cutoff frequencies

David Luebke 24 9/4/2015 Nonuniform Supersampling l Real-world answer: ignore the problem n Keep random components small compared to filter width n Use standard supersampling filter n Cook ‘87 (REYES) uses 4x4 jittered supersampling

David Luebke 25 9/4/2015 Antialiasing and Texture Mapping l We may want to apply antialiasing techniques to the texture mapping process separately from the rest of the rendering process l Why?

David Luebke 26 9/4/2015 Antialiasing and Texture Mapping l Texture mapping is uniquely harder n Coherent textures present pathological artifacts n Correct filter shape changes l Texture mapping is uniquely easier n Textures are known ahead of time n They can thus be prefiltered

David Luebke 27 9/4/2015 Antialiasing and Texture Mapping l More on texture problems n Coherent texture frequencies become infinitely high with increasing distance u Ex: checkerboard receding to horizon n Unfiltered textures lead to compression u Ex: pixel covers entire checkerboard u Unfiltered mapping: pixel is black or white u Moving checkerboard  flashing pixels

David Luebke 28 9/4/2015 Antialiasing and Texture Mapping l Problem: a square pixel on screen becomes a curvilinear quadrilateral in texture map (see W&W, p 140) l The coverage and area of this shape change as a function of the mapping l Most texture antialiasing algorithms approximate this shape somehow

David Luebke 29 9/4/2015 Recap: Antialiasing and Texture Mapping l Mip-mapping n MIP = Multim in Parvo (many things in a small place) n Ignores shape change of inverse pixel n But allows size to vary l Idea: store texture as a pyramid of progressively lower-resolution images, filtered down from original

David Luebke 30 9/4/2015 Antialiasing: Mip-Mapping Depth of Mip-Map

David Luebke 31 9/4/2015 G Antialiasing: Mip Mapping R B RG B RG B B GR

David Luebke 32 9/4/2015 Antialiasing: Mip Mapping l Distant textures use higher levels of the mipmap l Thus, the texture map is prefiltered l Thus, reduced aliasing!

David Luebke 33 9/4/2015 Antialiasing: Mip Mapping l Which level of mip-map to use? n Think of mip-map as 3-D pyramid n Index into mip-map with 3 coordinates: u, v, d (depth) l Q: What does d correspond to in the mip-map? l A: size of the filter

David Luebke 34 9/4/2015 Antialiasing: Mip Mapping l The size of the filter (i.e., d in the mip-map) depends on the pixel coverage area in the texture map n In general, treat d as a continuous value n Blend between nearest mip-map level using linear interpolation l Q: What is tri-linear interpolation?

David Luebke 35 9/4/2015 Antialiasing: Mip Mapping l Q: What’s wrong with the mip-map approach to prefiltering texture? l A: Assumes pixel maps to square in texture space l More sophisticated inverse pixel filters (see F&vD p 828): n Summed area tables n Elliptical weighted average filtering

David Luebke 36 9/4/2015 The End