Visible-Surface Detection(identification)

Slides:



Advertisements
Similar presentations
Computer Graphics - Rasterization -
Advertisements

Hidden Surface Removal - 12 a (Visible Surface determination)
Polygon Scan Conversion – 11b
15.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 15 – Visible Surfaces and Shadows.
GR2 Advanced Computer Graphics AGR
GR2 Advanced Computer Graphics AGR
8.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 8 Polygon Rendering.
13.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 13 An Introduction to Ray Tracing.
Computer Graphics- SCC 342
25 seconds left…...
Compositing and Blending Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics.
Collisions and Intersections When objects move, test for collision. When projecting surfaces, check for intersections. (Many slides adapted from Amitabh.
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.
CAP4730: Computational Structures in Computer Graphics Visible Surface Determination.
CECS461 Computer Graphics II University of Missouri at Columbia Hidden Surface Removal.
Computer Graphics Visible Surface Determination. Goal of Visible Surface Determination To draw only the surfaces (triangles) that are visible, given a.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Hidden Surface Removal 고려대학교 컴퓨터 그래픽스 연구실.
Part I: Basics of Computer Graphics
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
1 Dr. Scott Schaefer Hidden Surfaces. 2/62 Hidden Surfaces.
Computer Graphics 14: Surface Detection Methods
Hidden Surface Elimination Wen-Chieh (Steve) Lin Institute of Multimedia Engineering I-Chen Lin’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals.
1 CSCE 441: Computer Graphics Hidden Surface Removal (Cont.) Jinxiang Chai.
Visible-surface Detection Computer Graphics Seminar MUM
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Hidden Surface Removal
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.
10/29/02 (c) 2002 University of Wisconsin, CS559 Today Hidden Surface Removal Exact Visibility.
Visible-Surface Detection Methods
CSC418 Computer Graphics n BSP tree n Z-Buffer n A-buffer n Scanline.
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.
Hidden Surface Removal 1.  Suppose that we have the polyhedron which has 3 totally visible surfaces, 4 totally invisible/hidden surfaces, and 1 partially.
03/14/02 (c) 2002 University of Wisconsin, CS559 Last Time Some more visibility (Hidden Surface Removal) algorithms –A-buffer –Scanline –Depth sorting.
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,
3/23/04© University of Wisconsin, CS559 Spring 2004 Last Time Antialiasing –Area-weighted sampling Visibility –Painters algorithm –Depth buffer (Z-buffer)
1Computer Graphics Implementation II Lecture 16 John Shearer Culture Lab – space 2
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Visible-Surface Detection Methods
CS 325 Introduction to Computer Graphics 03 / 22 / 2010 Instructor: Michael Eckmann.
Hidden Surface Removal
Implementation II.
1 3D Hidden Surface Removal 김 성 남. 2 Contents Goal Motivation Approaches - back face detection - depth buffer - A-buffer - Scan line - Depth.
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.
Computer Graphics I, Fall 2010 Implementation II.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
01/28/09Dinesh Manocha, COMP770 Visibility Computations Visible Surface Determination Visibility Culling.
Learning Objectives Classification of Visible Surface Detection Algorithms Classification of Visible Surface Detection Algorithms Back-Face Detection Back-Face.
Visible-Surface Detection Methods. To identify those parts of a scene that are visible from a chosen viewing position. Surfaces which are obscured by.
Hidden Surface Removal. 2 Goal: Determine which surfaces are visible and which are not. Z-Buffer is just one of many hidden surface removal algorithms.
Lecture 30: Visible Surface Detection
Computer Graphics Implementation II
Solid Area Scan Conversion or Visible Surface Detection
CSCE 441: Computer Graphics Hidden Surface Removal (Cont.)
Visible-Surface Detection Methods
© University of Wisconsin, CS559 Fall 2004
Hidden Surfaces Dr. Scott Schaefer.
Graphics Pipeline Hidden Surfaces
CSCE 441: Computer Graphics Hidden Surface Removal
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
Implementation II Ed Angel Professor Emeritus of Computer Science
CSCE 441: Computer Graphics Hidden Surface Removal (Cont.)
Hidden Surface Removal
CSCE 441: Computer Graphics Hidden Surface Removal (Cont.)
Introduction to Computer Graphics with WebGL
Hidden Surface Removal
Lecture 31: Visible Surface Detection
Implementation II Ed Angel Professor Emeritus of Computer Science
Presentation transcript:

Visible-Surface Detection(identification) www.nskinfo.com & www.nsksofttech.com Computer Graphics CS2401 Visible-Surface Detection(identification) BY N.SATHISH KUMAR AP CSE

Visible-Surface Detection(identification) CS2401- Computer Graphics UNIT-2 LAST TOPIC Visible-Surface Detection(identification)

Visible-Surface Detection

Visible-Surface Detection Methods Determine what is visible within a scene from a chosen viewing position Two approaches Object-space methods: Decide which object, as a whole, is visible Image-space methods: The visibility is decided point-by-point Most visible-surface algorithms use image-space methods Sometimes, these methods are referred to as hidden-surface elimination

Approaches Back-Face Removal Depth Buffer A-Buffer Scanline Depth Sorting BSP Tree Area Subdivision Octree

Back-Face Removal (Culling) Used to remove unseen polygons from convex, closed polyhedron Does not completely solve hidden surface problem since one polyhedron may obscure another

Back-Face Removal (Culling) Compute the equation of the plane for each polygon A point (x,y,z) is behind a polygon surface if Determine back-face In projection coordinates, we need to consider only the z component of the normal vector N

Depth-Buffer (Z-Buffer) Z-Buffer has memory corresponding to each pixel location Usually, 16 to 20 bits/location.

Depth-Buffer (Z-Buffer) Initialize Each z-buffer location  Max z value Each frame buffer location  background color For each polygon: Compute z(x,y), polygon depth at the pixel (x,y) If z(x,y) < z-buffer value at pixel (x,y), then z buffer(x,y)  z(x,y) pixel(x,y)  color of polygon at (x,y)

Depth Calculation Calculate the z-value on the plane Incremental calculation

Depth-Buffer (Z-Buffer) Advantages/Disadvantages Lots of memory Linear performance Polygons may be processed in any order Modifications needed to implement antialiasing, transparency, translucency effects Commonly implemented in hardware  very fast

Depth-Buffer (Z-Buffer) Backface culling Z-buffer algorithm

Accumulation Buffer (A-Buffer) An extension of the depth-buffer for dealing with anti-aliasing, area-averaging, transparency, and translucency The depth-buffer method identifies only one visible surface at each pixel position Cannot accumulate color values for more than one transparent and translucent surfaces Even more memory intensive Widely used for high quality rendering

Accumulation Buffer (A-Buffer) Each position in the A-buffer has two fields Depth field: Stores a depth value Surface data field RGB intensity components Opacity parameter (percent of transparency) Depth Percent of area coverage Surface identifier

Scan Line Method Intersect each polygon with a particular scanline and solve hidden surface problem for just that scan line Requires a depth buffer equal to only one scan line Requires the entire scene data at the time of scan conversion Maintain an active polygon and active edge list Can implement antialiasing as part of the algorithm

Depth Sorting We need a partial ordering (not a total ordering) of polygons The ordering indicates which polygon obscures which polygon Some polygons may not obscure each other Simple cases

Depth Sorting We make the following tests for each polygon that has a depth overlap with S If any one of these tests is true, no reordering is necessary for S and the polygon being tested Polygon S is completely behind the overlapping surface relative to the viewing position The overlapping polygon is completely in front of S relative to the viewing position The boundary-edge projections of the two polygons onto the view plane do not overlap

Depth Sorting Example

Depth Sorting Cyclically overlapping surfaces that alternately obscure one another We can divide the surfaces to eliminate the cyclic overlaps

BSP Trees Binary space partitioning is an efficient method for determining object visibility Paint surfaces into the frame buffer from back to front Particularly useful when the view reference point changes, but the objects are at fixed positions

BSP Tree Construction Choose a polygon T and compute the equation of the plane it defines Test all the vertices of all the other polygons to determine if they are in front of, behind, or in the same plane as T. If the plane intersects a polygon, divide the polygon at the plane Polygons are placed into a binary search three with T as the root Call the procedure recursively on the left and right subtree

Area Subdivision Image-space method taking advantage of area coherence in a scene Recursively subdivide a square area into equal-sized quadrants if the area is too complex to analyze easily

Area Subdivision Four possible relationships between polygon surfaces and a rectangular section of the viewing plane Terminating criteria Case 1: An area has no inside, overlapping, or surrounding surfaces (all surfaces are ourside the area) Case 2: An area has only one inside, overlapping or surrounding surfaces Case 3: An area has one surrounding surface that obscures all other surfaces within the area boundaries

Octrees Visible-surface identification is accomplished by searching octree nodes in a front-to-back order