Computer Graphics Viewing, Rendering, Antialiasing گرد آوري و تاليف: دكتر احمد رضا نقش نيل چي دانشگاه اصفهان گروه مهندسي كامپيوتر.

Slides:



Advertisements
Similar presentations
Sampling and Reconstruction
Advertisements

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.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Graphics Pipeline.
David Luebke1/19/99 CS 551/651: Antialiasing David Luebke
MIT EECS 6.837, Durand and Cutler Sampling, Aliasing, & Mipmaps.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Realism in Computer Graphics K. H. Ko School of Mechatronics Gwangju.
Computer Graphics Visible Surface Determination. Goal of Visible Surface Determination To draw only the surfaces (triangles) that are visible, given a.
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.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Sampling, Aliasing, & Mipmaps
Part I: Basics of Computer Graphics Viewing Transformation and Coordinate Systems Chapter
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
CSCE 641 Computer Graphics: Fourier Transform Jinxiang Chai.
CPSC 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Aliasing and Anti-Aliasing Copyright Zachary Wartell, University of North Carolina at Charlotte, All Rights Reserved Revision: 10/24/2007 3:38:00 AM ©Zachary.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
9/20/2001CS 638, Fall 2001 Today Finishing Up Reflections More Multi-Pass Algorithms Shadows.
CSC418 Computer Graphics n Aliasing n Texture mapping.
Hidden Surface Removal
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 3 Ravi Ramamoorthi
© 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.
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Image Synthesis Rabie A. Ramadan, PhD 3. 2 Our Problem.
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:
Texture Mapping. Scope Buffers Buffers Various of graphics image Various of graphics image Texture mapping 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.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
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.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
INT 840E Computer graphics Introduction & Graphic’s Architecture.
CS-378: Game Technology Lecture #2.2: Clipping and Hidden Surfaces Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney,
Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
CS418 Computer Graphics John C. Hart
1 Aliasing & Anti-Aliasing. 2 What is aliasing? An artifact (loss of detail and false details) Caused by discretization (finite resolution) A rasterized.
Sang Il Park Sejong University
Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?
Attributes of Graphics Primitives Hearn & Baker Chapter 4 Some slides are taken from Robert Thomsons notes.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
Subject Name: Computer Graphics Subject Code: Textbook: “Computer Graphics”, C Version By Hearn and Baker Credits: 6 1.
Sampling Theorem & Antialiasing
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.
The Graphics Pipeline Revisited Real Time Rendering Instructor: David Luebke.
David Luebke 3/17/2016 Advanced Computer Graphics Antialiasing David Luebke
ITEC2110, Digital Media Chapter 2 Fundamentals of Digital Imaging 1 GGC -- ITEC Digital Media.
Applications and Rendering pipeline
ITEC2110, Digital Media Chapter 2 Fundamentals of Digital Imaging 1 GGC -- ITEC Digital Media.
Advanced Computer Graphics
Attributes of Graphics Primitives Hearn & Baker Chapter 4
- Introduction - Graphics Pipeline
Week 2 - Friday CS361.
Sampling and Antialiasing
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Advanced Computer Graphics:
Real-time Computer Graphics Overview
Joshua Barczak CMSC435 UMBC
The Graphics Pipeline Lecture 5 Mon, Sep 3, 2007.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
Adding Surface Detail 고려대학교 컴퓨터 그래픽스 연구실.
CSC418 Computer Graphics Aliasing Texture mapping.
Presentation transcript:

Computer Graphics Viewing, Rendering, Antialiasing گرد آوري و تاليف: دكتر احمد رضا نقش نيل چي دانشگاه اصفهان گروه مهندسي كامپيوتر

Right Handed Coordinate System +X +Y +Z +X +Y +Z

Viewing a 3D world We have a model in this world and would like to view it from a new position. We’ll call this new position the camera or eyepoint. Our job is to figure out what the model looks like on the display plane. +X +Y +Z

Parallel Projection +X +Y +Z

Perspective Projection +X +Y +Z

Major Tasks of a Renderer Modelling: Produce sets of vertices that define geometric objects Geometric Processing: Determine which objects should appear and in what colour Normalization  Clipping  Hidden Surface Removal  Shading Vertex-based: floating point processing in 3-D Rasterization: Generate frame buffer pixels by Scan Conversion Pixel-based: integer processing in 2-D Display: Pixels are read from the frame buffer onto the CRT Must overcome display artefacts through Antialiasing

A Note about Hidden-Surface Removal Hidden Surface Removal (Visible Surface Determination) seeks to discover which objects are visible or obscured from the viewpoint Object Space Approach: Consider polygons A and B pair-wise and determine if: (a) B partially obscures A, (b) A partially obscures B, (c) A and B are completely visible, (d) B obscures A (or vice versa) Image Space Approach: Follows ray-casting approach

Aliasing Occurs when the sampling inherent in rendering does not contain enough information for an accurate image. Original Scene Scanline Luminosity Sampling Pixel Centres Sampled Signal Luminosity Signal Rendered Image

Antialiasing What is antialiasing? How do we see the affects of antialiasing? What can we do about it? Math behind antialiasing Antialiasing in modern day graphics cards Advanced stuff on AA

Let’s Revisit a pixel A pixel is which of these things (theoretically)? point circle/disk square/rectangle has area has a location sample

Samples Continuous - function with values at any input. Most things in the world. Ex. sine and cosine Discrete - function with values only at specific inputs. Computers are discrete. What is a 2D example? To convert from a continuous function to a discrete one, we discretize or sample To convert form a continuous variable to a discrete one, we quantize When we render an image (which is a continuous function), we sample and quantize

A New Thought about Images Images are really a 2D function Here’s an image plotted as a height field Now we store this image as an “array” of points. What does that mean?

We Sample the Image Function Here is the sampling function. It is called the delta function

Thus we are “sampling” a continuous image function We call these samples at this regular grid of points, pixels. Pixels are a sampling of the function that describes the image. We store these pixels into memory as an array of colors. How densely should we sample? What would govern this?

A quick footnote into frequency analysis A way to understand the sampling question is to convert the function into a different “space” or domain. We use the Fourier Transform to convert the function (in our case the image) into the frequency domain.

What does sampling mean? What happens if we don’t sample enough?

Aliasing in General If we sample at too low a rate, the high frequencies in the image appear as lower frequencies. How do we fix it? Increase sampling Remove high frequencies

Aliasing in Image Aliasing manifests itself as “jaggies” in graphics. Thus we don’t have enough pixels to accurately represent the underlying function. Check out what happens when we increase our sampling.

Effects of Aliasing in Image Common aliasing errors (called artefacts) are: jagged profiles, disappearing or improper fine detail, and disintegrating textures. Jagged Profiles Loss of Detail

Fixing Aliasing Increase Resolution What’s wrong with this approach? Filtering is another possibility We want to remove the high frequency areas How would we do that? Let’s re-examine what a pixel is in reality.

Prefiltering No AntialiasingPrefiltering

Postfiltering Sampling: take jittered, regular or random samples. Averaging: use an filter to assign weights to each sample. Sum all the weighted samples to obtain a pixel. Jittered Regular

Filtering Example

(0,0) (4,2) (4,0) Let’s recall

Filter Sampling This reduces the high frequencies (which cause aliasing) Interpolate between samples.

Filter Sampling Result (Example)

What are we doing? (0,0) (4,2) (4,0)

Two ways to Antialias Increase resolution (increase sampling) or Supersampling

Increase Rendering Resolution Render the image at a higher resolution and downsample. Really, you are letting your eye do some filtering for you.

Supersampling For each pixel, we would like to figure out what “percentage” is covered. (0,0) (4,0)

Line Antialiasing

Full Screen Antialiasing Another way to do the supersampling is to do full screen antialiasing We want to draw the image with several camera jitter positions and average the answers

Full Screen Antialiasing Example (Exaggerated)

Anti-aliasing in Summary Developed to combat aliasing Super-sampling (Post-filtering): Compute pixel color by averaging multiple samples. Sample the scene at n times the display resolution. For example, suppose the display resolution is 512x512. Sampling at three times the width and three times the height of the display resolution would yield 1536x1536 samples A filter provides the weights used to compute the average

Antialiasing Examples

پايان