CS 445 / 645 Introduction to Computer Graphics Lecture 18 Antialiasing Antialiasing.

Slides:



Advertisements
Similar presentations
Sampling, Aliasing.
Advertisements

Lecture 8 Transparency, Mirroring
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.
Virtual Realism TEXTURE MAPPING. The Quest for Visual Realism.
Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Computer Graphics Viewing, Rendering, Antialiasing گرد آوري و تاليف: دكتر احمد رضا نقش نيل چي دانشگاه اصفهان گروه مهندسي كامپيوتر.
MIT EECS 6.837, Durand and Cutler Sampling, Aliasing, & Mipmaps.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
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.
Sampling, Aliasing, & Mipmaps
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
IN4151 Introduction 3D graphics 1 Introduction 3D Computer Graphics part 1 Projective display Viewing pipeline Graphics hardware Image-based rendering.
Scan Conversion Week 6, Wed 8 Oct 2003
IAT 3551 Computer Graphics Overview Color Displays Drawing Pipeline.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Scan Conversion Week 6, Fri 10 Oct 2003 sampling.
Graphics Systems I-Chen Lin’s CG slides, Doug James’s CG slides Angel, Interactive Computer Graphics, Chap 1 Introduction to Graphics Pipeline.
A Novel 2D To 3D Image Technique Based On Object- Oriented Conversion.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
Computer Graphics Shadows
09/18/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Bump Mapping Multi-pass algorithms.
9/20/2001CS 638, Fall 2001 Today Finishing Up Reflections More Multi-Pass Algorithms Shadows.
Guilford County Sci Vis V204.01
Computer Graphics Mirror and Shadows
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.
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
1 Texture. 2 Overview Introduction Painted textures Bump mapping Environment mapping Three-dimensional textures Functional textures Antialiasing textures.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Antialiasing CAP4730: Computational Structures in Computer Graphics.
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Texture Mapping 고려대학교 컴퓨터 그래픽스 연구실.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
09/11/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Graphics Pipeline Texturing Overview Cubic Environment Mapping.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
CS 638, Fall 2001 Today Project Stage 0.5 Environment mapping Light Mapping.
10/26/04© University of Wisconsin, CS559 Fall 2004 Last Time Drawing lines Polygon fill rules Midterm Oct 28.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
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.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
Computer Graphics 2 Lecture 7: Texture Mapping Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Hardware-accelerated Rendering of Antialiased Shadows With Shadow Maps Stefan Brabec and Hans-Peter Seidel Max-Planck-Institut für Informatik Saarbrücken,
CS418 Computer Graphics John C. Hart
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
1 Perception and VR MONT 104S, Fall 2008 Lecture 20 Computer Graphics and VR.
CS559: Computer Graphics Lecture 12: Antialiasing & Visibility Li Zhang Spring 2008.
CS3241 C OMPUTER G RAPHICS Tutorial 8. Q UESTION #1 Given an object represented in polygons, how to find its bounding sphere?
CS 445 / 645: Introductory Computer Graphics Review.
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
CS552: Computer Graphics Lecture 17: Scan Conversion (Special Cases)
CSc4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Texture Mapping.
Texturing CMSC 435/ What is Texturing? 2 Texture Mapping Definition: mapping a function onto a surface; function can be: – 1, 2, or 3D – sampled.
Applications and Rendering pipeline
Antialiasing. What is alias? Alias - A false signal in telecommunication links from beats between signal frequency and sampling frequency (from dictionary.com)
Week 2 - Friday CS361.
Texture Mapping cgvr.korea.ac.kr.
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
The Graphics Rendering Pipeline
Interactive Graphics Algorithms Ying Zhu Georgia State University
UMBC Graphics for Games
Lecture 13 Clipping & Scan Conversion
Presentation transcript:

CS 445 / 645 Introduction to Computer Graphics Lecture 18 Antialiasing Antialiasing

Environment Mapping Used to model a object that reflects surrounding textures to the eye Polished sphere reflects walls and ceiling texturesPolished sphere reflects walls and ceiling textures Cyborg in Terminator 2 reflects flaming destructionCyborg in Terminator 2 reflects flaming destruction Texture is distorted fish-eye view of environment Spherical texture mapping creates texture coordinates that correctly index into this texture map Used to model a object that reflects surrounding textures to the eye Polished sphere reflects walls and ceiling texturesPolished sphere reflects walls and ceiling textures Cyborg in Terminator 2 reflects flaming destructionCyborg in Terminator 2 reflects flaming destruction Texture is distorted fish-eye view of environment Spherical texture mapping creates texture coordinates that correctly index into this texture map

Sphere Mapping

Blinn/Newell Lattitude Mapping

Cube Mapping

The q-coordinate Remember, texture coordinate interpolation is linear Texture coordinates can contain an optional q-parameter q scales texture coordinates by dividing each coordinate by q This captures perspective transformations Remember, texture coordinate interpolation is linear Texture coordinates can contain an optional q-parameter q scales texture coordinates by dividing each coordinate by q This captures perspective transformations Z – into the scene Image plane

Multitexturing Pipelining of multiple texture applications to one polygon The results of each texture unit application is passed to the next texture unit, which adds its effects More bookkeeping is required to pull this off Pipelining of multiple texture applications to one polygon The results of each texture unit application is passed to the next texture unit, which adds its effects More bookkeeping is required to pull this off

Antialiasing

What is a pixel? A pixel is not… A boxA box A diskA disk A teeny tiny little lightA teeny tiny little light A pixel is a point It has no dimensionIt has no dimension It occupies no areaIt occupies no area It cannot be seenIt cannot be seen It can have a coordinateIt can have a coordinate A pixel is not… A boxA box A diskA disk A teeny tiny little lightA teeny tiny little light A pixel is a point It has no dimensionIt has no dimension It occupies no areaIt occupies no area It cannot be seenIt cannot be seen It can have a coordinateIt can have a coordinate A pixel is more than a point, it is a sample

Samples Most things in the real world are continuous Everything in a computer is discrete The process of mapping a continuous function to a discrete one is called sampling The process of mapping a continuous variable to a discrete one is called quantization Rendering an image requires sampling and quantization Most things in the real world are continuous Everything in a computer is discrete The process of mapping a continuous function to a discrete one is called sampling The process of mapping a continuous variable to a discrete one is called quantization Rendering an image requires sampling and quantization

Samples

Line Segments We tried to sample a line segment so it would map to a 2D raster display We quantized the pixel values to 0 or 1 We saw stair steps, or jaggies We tried to sample a line segment so it would map to a 2D raster display We quantized the pixel values to 0 or 1 We saw stair steps, or jaggies

Line Segments Instead, quantize to many shades But what sampling algorithm is used? Instead, quantize to many shades But what sampling algorithm is used?

Area Sampling Shade pixels according to the area covered by thickened line This is unweighted area sampling A rough approximation formulated by dividing each pixel into a finer grid of pixels Shade pixels according to the area covered by thickened line This is unweighted area sampling A rough approximation formulated by dividing each pixel into a finer grid of pixels

Unweighted Area Sampling Primitive cannot affect intensity of pixel if it does not intersect the pixel Equal areas cause equal intensity, regardless of distance from pixel center to area Primitive cannot affect intensity of pixel if it does not intersect the pixel Equal areas cause equal intensity, regardless of distance from pixel center to area

Weighted Area Sampling Unweighted sampling colors two pixels identically when the primitive cuts the same area through the two pixels Intuitively, pixel cut through the center should be more heavily weighted than one cut along corner Unweighted sampling colors two pixels identically when the primitive cuts the same area through the two pixels Intuitively, pixel cut through the center should be more heavily weighted than one cut along corner

Weighted Area Sampling Weighting function, W(x,y) specifies the contribution of primitive passing through the point (x, y) from pixel centerspecifies the contribution of primitive passing through the point (x, y) from pixel center Weighting function, W(x,y) specifies the contribution of primitive passing through the point (x, y) from pixel centerspecifies the contribution of primitive passing through the point (x, y) from pixel center x Intensity W(x,y)

Images An image is a 2D function I (x, y) that specifies intensity for each point (x, y)

Sampling and Image Our goal is to convert the continuous image to a discrete set of samples The graphics system’s display hardware will attempt to reconvert the samples into a continuous image: reconstruction Our goal is to convert the continuous image to a discrete set of samples The graphics system’s display hardware will attempt to reconvert the samples into a continuous image: reconstruction

Point Sampling an Image Simplest sampling is on a grid Sample depends solely on value at grid points Simplest sampling is on a grid Sample depends solely on value at grid points

Point Sampling Multiply sample grid by image intensity to obtain a discrete set of points, or samples. Sampling Geometry

Some objects missed entirely, others poorly sampled Sampling Errors

Fixing Sampling Errors Supersampling Take more than one sample for each pixel and combine themTake more than one sample for each pixel and combine them –How many samples is enough? –How do we know no features are lost? Supersampling Take more than one sample for each pixel and combine themTake more than one sample for each pixel and combine them –How many samples is enough? –How do we know no features are lost? 150x15 to 100x10 200x20 to 100x10 300x30 to 100x10 400x40 to 100x10

Unweighted Area Sampling Average supersampled points All points are weighted equally Average supersampled points All points are weighted equally

Weighted Area Sampling Points in pixel are weighted differently Flickering occurs as object moves across displayFlickering occurs as object moves across display Overlapping regions eliminates flicker Points in pixel are weighted differently Flickering occurs as object moves across displayFlickering occurs as object moves across display Overlapping regions eliminates flicker

How is this done today? Full Screen Antialiasing Nvidia GeForce2 OpenGL: render image 400% larger and supersampleOpenGL: render image 400% larger and supersample Direct3D: render image 400% % largerDirect3D: render image 400% % larger Nvidia GeForce3 Multisampling but with fancy overlapsMultisampling but with fancy overlaps –Don’t render at higher resolution –Use one image, but combine values of neighboring pixels –Beware of recognizable combination artifacts  Human perception of patterns is too good Nvidia GeForce2 OpenGL: render image 400% larger and supersampleOpenGL: render image 400% larger and supersample Direct3D: render image 400% % largerDirect3D: render image 400% % larger Nvidia GeForce3 Multisampling but with fancy overlapsMultisampling but with fancy overlaps –Don’t render at higher resolution –Use one image, but combine values of neighboring pixels –Beware of recognizable combination artifacts  Human perception of patterns is too good

GeForce3 Multisampling After each pixel is rendered, write pixel value to two different places in frame bufferAfter each pixel is rendered, write pixel value to two different places in frame bufferMultisampling

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

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

GeForce3 - Multisampling No AA Multisampling

GeForce3 - Multisampling 4x Supersample Multisampling

ATI Smoothvision ATI SmoothVision Programmer selects samping patternProgrammer selects samping pattern ATI SmoothVision Programmer selects samping patternProgrammer selects samping pattern

3dfx 3dfx Multisampling 2- or 4-frame shift and average2- or 4-frame shift and averageTradeoffs? 3dfx Multisampling 2- or 4-frame shift and average2- or 4-frame shift and averageTradeoffs?