Computer Graphics1 The A-buffer an Antialiased Hidden Surface Method.

Slides:



Advertisements
Similar presentations
Visible-Surface Detection(identification)
Advertisements

Compositing and Blending Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
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.
Occlusion Culling Fall 2003 Ref: GamasutraGamasutra.
Part I: Basics of Computer Graphics
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.
Compositing and Blending Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Compositing and Blending - Chapter 8 modified by Ray Wisman Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Image Compositing Angel 8.11 Angel: Interactive Computer Graphics5E © Addison-Wesley
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Computer Graphics 14: Surface Detection Methods
1Notes. 2Atop  The simplest (useful) and most common form of compositing: put one image “atop” another  Image 1 (RGB) on top of image 2 (RGB)  For.
1 Clipping and Hidden Surfaces CS-184: Computer Graphics Prof. James O’Brien.
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Hidden Surface Removal
Afrigraph 2004 Massive model visualization Tutorial A: Part I Rasterization Based Approaches Andreas Dietrich Computer Graphics Group, Saarland University.
Graphics Pipeline Hidden Surfaces CMSC 435/634. Visibility We can convert simple primitives to pixels Which primitives (or parts of primitives) should.
Graphics Pipeline Hidden Surface CMSC 435/634. Visibility We can convert simple primitives to pixels/fragments How do we know which primitives (or which.
Erdem Alpay Ala Nawaiseh. Why Shadows? Real world has shadows More control of the game’s feel  dramatic effects  spooky effects Without shadows the.
Computer Graphics Mirror and Shadows
Filtering theory: Battling Aliasing with Antialiasing Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
10/29/02 (c) 2002 University of Wisconsin, CS559 Today Hidden Surface Removal Exact Visibility.
CSC418 Computer Graphics n BSP tree n Z-Buffer n A-buffer n Scanline.
Introduction to Computer Graphics with WebGL
CS 480/680 Computer Graphics Implementation III Dr. Frederick C Harris, Jr. Fall 2011.
Advanced Computer Graphics Depth & Stencil Buffers / Rendering to Textures CO2409 Computer Graphics Week 19.
10/26/04© University of Wisconsin, CS559 Fall 2004 Last Time Drawing lines Polygon fill rules Midterm Oct 28.
Visible-Surface Detection Jehee Lee Seoul National University.
Quadratic Surfaces. SPLINE REPRESENTATIONS a spline is a flexible strip used to produce a smooth curve through a designated set of points. We.
CS 450: COMPUTER GRAPHICS ANTIALIASING SPRING 2015 DR. MICHAEL J. REALE.
3D Graphics for Game Programming Chapter IV Fragment Processing and Output Merging.
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,
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
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
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
3/23/04© University of Wisconsin, CS559 Spring 2004 Last Time Antialiasing –Area-weighted sampling Visibility –Painters algorithm –Depth buffer (Z-buffer)
Visible-Surface Detection Methods
CS 325 Introduction to Computer Graphics 03 / 22 / 2010 Instructor: Michael Eckmann.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Compositing and Blending
1 3D Hidden Surface Removal 김 성 남. 2 Contents Goal Motivation Approaches - back face detection - depth buffer - A-buffer - Scan line - Depth.
Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.
Where We Stand At this point we know how to: –Convert points from local to window coordinates –Clip polygons and lines to the view volume –Determine which.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
CS559: Computer Graphics Lecture 12: Antialiasing & Visibility Li Zhang Spring 2008.
01/28/09Dinesh Manocha, COMP770 Visibility Computations Visible Surface Determination Visibility Culling.
Computer Graphics Inf4/MSc 1 Computer Graphics Lecture 5 Hidden Surface Removal and Rasterization Taku Komura.
CS 325 Introduction to Computer Graphics 03 / 10 / 2010 Instructor: Michael Eckmann.
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
David Luebke 3/17/2016 Advanced Computer Graphics Antialiasing David Luebke
1cs426-winter-2008 Notes. 2 Atop operation  Image 1 “atop” image 2  Assume independence of sub-pixel structure So for each final pixel, a fraction alpha.
Compositing and Blending Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Visible-Surface Detection Methods. To identify those parts of a scene that are visible from a chosen viewing position. Surfaces which are obscured by.
Computer Graphics I, Fall 2008 Compositing and Blending.
Lecture 30: Visible Surface Detection
Computer Graphics I, Fall 2010 Scan conversion algorithms.
Introduction to Computer Graphics with WebGL
(c) 2002 University of Wisconsin, CS559
Visible-Surface Detection Methods
© University of Wisconsin, CS559 Fall 2004
© University of Wisconsin, CS559 Spring 2004
Jim X. Chen George Mason University
Graphics Pipeline Hidden Surfaces
Angel: Interactive Computer Graphics5E © Addison-Wesley 2009
Sweep Fill Details For row = min to row=max
Hidden Surface Removal
Presentation transcript:

Computer Graphics1 The A-buffer an Antialiased Hidden Surface Method

Computer Graphics2 Introduction n The A-buffer: u Anti-aliased, area-averaged, accumulation buffer u A general hidden surface mechanism suited to medium scale virtual memory computers u Resolves visibility among an arbitrary collection of opaque, transparent, and intersecting objects. u Uses an easy to compute Fourier window (box filter) to increase the effective image resolution many times over the Z-buffer, with a moderate increase in cost. u Is incorporated into the REYES 3-D rendering system at Lucasfilm. u Was used successfully in the “Genesis Demo” sequence in Star Trek II

Computer Graphics3 Weaknesses of the Z-buffer n Although extremely fast and simple, the Z-buffer: u Aliases too much. u Cannot render transparent objects correctly.

Computer Graphics4 A-buffer Basics n Works with two different data types: u “pixel-structs” (distinct from pixels). u “fragments” n Uses a 4x8 bit mask to represent the subpixel polygons.

Computer Graphics5 A-buffer Basics - Cont. n If a pixel is simple, i.e. completely covered, the Z value is positive and the pixelstruct contains a color. Otherwise, the Z value is negative and the pointer points to a list of fragements sorted front to back by frontmost Z.

Computer Graphics6 Pixelstruct definition floatz;// negative Z fragment_ptrflist// never null OR floatz// positive Z byter,g,b// color bytea;// coverage

Computer Graphics7 Fragment definition fragment_ptrnext; short_intr,g,b;// color, 12 bit short_intopacity;// 1-transparency short_intarea;// 12 bit precision short_intobject_tab;// from parent object pixelmaskm;// 4x8 bits floatzmax, zmin;// positive

Computer Graphics8 A-buffer Basics - Cont. n The object tag is augmented by a bit indicating whether the surface faces forward or backwards (to prevent improper merging on silhouettes) n The following symbols will be used later: u M4x8 bit mask u Aarea (0..1) u Ccolor(r,g,b) u Opacity1-transmission fraction   coverage, usually area times opacity

Computer Graphics9 A-buffer Basics - Cont. n Why sort in Z? u Proper calculation of transparency u fragments from the same geometric primitive tend to cluster together in the list and so can be merged.

Computer Graphics10 Merging fragment n Fragments are merged when they: u Have the same object tag. u Overlap in Z. n If the 2 fragments do not overlap on the screen ( ) u The bitmasks are or’ed u The colors are blended: u The areas are added

Computer Graphics11 Merging fragment n If they overlap (highly abnormal): u They are split into 3 parts: u The contribution of the front fragment is computed: u The colors are blended

Computer Graphics12 Merging fragment - Cont. u And the area is computed

Computer Graphics13 Pixel analysis n When no more fragments are to be sent to a pixelstruct, the pixelstruct’s color is determined and written into the picture. n Generally, the pixel will be fully covered by some object and a few pixel-sized fragments will remain. n If any fragments are present, a recursive packing process is invoked.

Computer Graphics14 Packing fragments n Area averaging means that the color of a pixel is computed by the area-weighted average of the colors of the visible surface containing the pixel. n How do we determine the visible parts of fragments? u We start the packing process with a full 32 bit mask to represent the entire pixel. u Fragments are considered only if they overlap the search mask.

Computer Graphics15 Packing fragments - Cont. u When all or part of a fragment is found within the search mask, the search mask part of the pixel is partitioned using the fragment mask u If we use a recursive call with as the search mask to find the color of the rest of the searched area. u If the fragment is transparent, a recursive call using as a search mask is used to find the color of the surfaces behind the fragment to be filtered by the color of the fragment.

Computer Graphics16 Packing fragments - Cont. F F The composite coverage is computed similarly u Otherwise, the color of the fragment suffices for u When we have the colors of the inside and outside regions, we blend them weighted by their coverage

Computer Graphics17 Intersections n Pixels where intersecting object are visible usually number in the dozens or hundreds in a typical 512x512 resolution picture. n Also, the aliasing along the line of intersection is not quite as critical as that on a silhouette, because the contrast is is often lower. n These observations suggest we can get by with simple approximations.

Computer Graphics18 Intersections - Cont. n We define an intersection to occur when the object tags differ and the fragments overlap in Z. n Since we don’t know exactly how much of the frontmost fragment is visible, we estimate it from the minimum and maximum Z values:

Computer Graphics19 Intersections - Cont. n Since part of the front fragment obscures the next fragment and vice versa, we need to estimate the weighting factor to be used to blend the two fragment’s colors. n We now blend the front fragment with the other fragment within the inside mask n Then we blend the inside and outside part