David Luebke1/19/99 CS 551/651: 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.
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 گرد آوري و تاليف: دكتر احمد رضا نقش نيل چي دانشگاه اصفهان گروه مهندسي كامپيوتر.
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.
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
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 5: Image Processing 2: Warping 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.
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
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.
1 Texturing. 2 What is Texturing? 3 Texture Mapping Definition: mapping a function onto a surface; function can be:  1, 2, or 3D  sampled (image) or.
Filtering theory: Battling Aliasing with Antialiasing Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Sampling theorem In order to accurately reconstruct a signal from a periodically sampled version of it, the sampling frequency must be at least twice the.
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.
Antialiasing with Line Samples Thouis R. Jones, Ronald N. Perry MERL - Mitsubishi Electric Research Laboratory.
David Luebke 1 9/13/2015 Texture Mapping. David Luebke 2 9/13/2015 Recap: Texture Map Rendering ● Rendering uses the mapping: ■ Find the visible surface.
Antialiasing CAP4730: Computational Structures in Computer Graphics.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
10/26/04© University of Wisconsin, CS559 Fall 2004 Last Time Drawing lines Polygon fill rules Midterm Oct 28.
CS 450: COMPUTER GRAPHICS ANTIALIASING SPRING 2015 DR. MICHAEL J. REALE.
Week 6 - Wednesday.  What did we talk about last time?  Light  Material  Sensors.
1 Texture Mapping. 2 Texture Aliasing MIPmaps Environment Mapping Bump Mapping Displacement Mapping Shadow Maps Solid Textures Antialiasing.
Real-Time rendering Chapter 4.Visual Appearance 4.4. Aliasing and antialiasing 4.5. Transparency,alpha,and compositing 4.6. Fog 4.7. Gamma correction
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.
Attributes of Graphics Primitives Hearn & Baker Chapter 4 Some slides are taken from Robert Thomsons notes.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
Sampling Theorem & Antialiasing
DPL2/10/2016 CS 551/651: Final Review David Luebke
CS559: Computer Graphics Lecture 12: Antialiasing & Visibility Li Zhang Spring 2008.
1 Dr. Scott Schaefer Antialiasing. 2/70 What is aliasing?
David Luebke 3/17/2016 Advanced Computer Graphics Antialiasing David Luebke
Greg Humphreys CS445: Intro Graphics University of Virginia, Fall 2003 Texture Mapping Greg Humphreys University of Virginia CS 445, Fall 2003.
COMPUTER GRAPHICS CS 482 – FALL 2015 NOVEMBER 10, 2015 VISIBILITY CULLING HIDDEN SURFACES ANTIALIASING HALFTONING.
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.
Attributes of Graphics Primitives Hearn & Baker Chapter 4
Week 7 - Wednesday CS361.
Texture Mapping cgvr.korea.ac.kr.
Sampling Theorem & Antialiasing
Advanced Computer Graphics:
Anti-aliasing for Texture Mapping
Antialiasing Dr. Scott Schaefer.
Joshua Barczak CMSC435 UMBC
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
CSC418 Computer Graphics Aliasing Texture mapping.
Presentation transcript:

David Luebke1/19/99 CS 551/651: Antialiasing David Luebke

David Luebke1/19/99 Administrivia Hand in Assignment 1 Hand in Assignment 1 Assignment 2: upcoming Assignment 2: upcoming –Sampling strategies in RSRT –Due Tuesday March 9

David Luebke1/19/99 Recap: Antialiasing Strategies Prefiltering: low-pass filter the signal before sampling Prefiltering: low-pass filter the signal before sampling –Pros: Guaranteed to eliminate aliasing Guaranteed to eliminate aliasing Preserves all desired frequencies Preserves all desired frequencies –Cons: Expensive Expensive Can introduce “ringing” Can introduce “ringing” Doesn’t fit most rendering algorithms Doesn’t fit most rendering algorithms

David Luebke1/19/99 Recap: Antialiasing Strategies Supersampling: sample at higher resolution, then filter down Supersampling: sample at higher resolution, then filter down –Pros: Conceptually simple Conceptually simple Easy to retrofit existing renderers Easy to retrofit existing renderers Works well most of the time Works well most of the time –Cons: High storage costs High storage costs Doesn’t eliminate aliasing, just shifts Nyquist limit upwards Doesn’t eliminate aliasing, just shifts Nyquist limit upwards

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

David Luebke1/19/99 Recap: Antialiasing Strategies Stochastic supersampling: convert high frequencies into noise Stochastic supersampling: convert high frequencies into noise –Pros: Retains advantages of supersampling Retains advantages of supersampling Noise is visually better than aliasing Noise is visually better than aliasing –Cons: Harder to retrofit Z-buffer Harder to retrofit Z-buffer Ideal sampling distribution (Poisson Disc) is expensive Ideal sampling distribution (Poisson Disc) is expensive

David Luebke1/19/99 Recap: Antialiasing Examples See Watt & Watt, p 120 See Watt & Watt, p 120 See Foley & van Dam, p See Foley & van Dam, p

David Luebke1/19/99 Nonuniform Supersampling We’ve discussed two nonuniform sampling approaches We’ve discussed two nonuniform sampling approaches –Adaptive supersampling: Sample (say) once per pixel, then supersample if intensity changes a lot Sample (say) once per pixel, then supersample if intensity changes a lot –Stochastic supersampling: Use multiple samples per pixel, but not on a uniform grid Use multiple samples per pixel, but not on a uniform grid Can we filter nonuniform supersampled images? Can we filter nonuniform supersampled images?

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

David Luebke1/19/99 Nonuniform Supersampling Pixel

David Luebke1/19/99 Nonuniform Supersampling Sampling Grid

David Luebke1/19/99 Nonuniform Supersampling Polygon

David Luebke1/19/99 Nonuniform Supersampling Adaptive Sampling

David Luebke1/19/99 Nonuniform Supersampling Final Samples Problem: Problem: –Many more red samples than blue samples –But final pixel actually more blue than red! –Simple filtering will not handle this correctly

David Luebke1/19/99 Nonuniform Supersampling Approximate answer: weighted average filter Approximate answer: weighted average filter –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 Luebke1/19/99 Nonuniform Supersampling Correct answer: multistage filtering Correct answer: multistage filtering –Use weighted-average filters in cascade, sequentially applying filters with lower and lower cutoff frequencies –What do such filters look like?

David Luebke1/19/99 Nonuniform Supersampling Real-world answer: ignore the problem Real-world answer: ignore the problem –Keep random components small compared to filter width –Use standard supersampling filter –Cook ‘87 (REYES) uses 4x4 jittered supersampling

David Luebke1/19/99 Antialiasing and Texture Mapping We may want to apply antialiasing techniques to the texture mapping process separately from the rest of the rendering process We may want to apply antialiasing techniques to the texture mapping process separately from the rest of the rendering process Why? Why?

David Luebke1/19/99 Antialiasing and Texture Mapping Texture mapping is uniquely harder Texture mapping is uniquely harder –Coherent textures present pathological artifacts –Correct filter shape changes Texture mapping is uniquely easier Texture mapping is uniquely easier –Textures are known ahead of time –They can thus be prefiltered

David Luebke1/19/99 Antialiasing and Texture Mapping More on texture problems More on texture problems –Coherent texture frequencies become infinitely high with increasing distance Ex: checkerboard receding to horizon Ex: checkerboard receding to horizon –Unfiltered textures lead to compression Ex: pixel covers entire checkerboard Ex: pixel covers entire checkerboard Unfiltered mapping: pixel is black or white Unfiltered mapping: pixel is black or white Moving checkerboard  flashing pixels Moving checkerboard  flashing pixels

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

David Luebke1/19/99 Antialiasing and Texture Mapping Mip-mapping Mip-mapping –MIP = Multim in Parvo (many things in a small place) –Ignores shape change of inverse pixel –But allows size to vary Idea: store texture as a pyramid of progressively lower-resolution images, filtered down from original Idea: store texture as a pyramid of progressively lower-resolution images, filtered down from original

David Luebke1/19/99 Antialiasing: Mip-Mapping Depth of Mip-Map

David Luebke1/19/99 G Antialiasing: Mip Mapping R B RG B RG B B GR

David Luebke1/19/99 Antialiasing: Mip Mapping Distant textures use higher levels of the mipmap Distant textures use higher levels of the mipmap Thus, the texture map is prefiltered Thus, the texture map is prefiltered Thus, reduced aliasing! Thus, reduced aliasing!

David Luebke1/19/99 Antialiasing: Mip Mapping Which level of mip-map to use? Which level of mip-map to use? –Think of mip-map as 3-D pyramid –Index into mip-map with 3 coordinates: u, v, d (depth) Q: What does d correspond to in the mip-map? Q: What does d correspond to in the mip-map? A: size of the filter A: size of the filter

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

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