Lecture 30: Visible Surface Detection

Slides:



Advertisements
Similar presentations
Visible-Surface Detection(identification)
Advertisements

15.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 15 – Visible Surfaces and Shadows.
8.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 8 Polygon Rendering.
CSC418 Computer Graphics n Polygon normals n Back Faces n Visibility Algorithms.
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.
Hidden Surface Removal CSE 581. Visibility Assumption: All polygons are opaque What polygons are visible with respect to your view frustum?  Outside:
CAP4730: Computational Structures in Computer Graphics Visible Surface Determination.
CECS461 Computer Graphics II University of Missouri at Columbia Hidden Surface Removal.
Hidden Surface Removal Why make the effort?  Realistic models.  Wasted time drawing. OpenGL and HSR  OpenGL does handle HSR using the depth buffer.
Visibility in Computer Graphics Toni Sellarès Unversitat de Girona
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
May Visible Surface Detection Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty.
UBI 516 Advanced Computer Graphics
Course Website: Computer Graphics 15: More Surface Detection Methods.
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
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.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Other Rendering Techniques Types of rendering – Wireframe techniques – Scan-line conversion – Reyes.
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
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.
CS 450: COMPUTER GRAPHICS VISIBLE SURFACE DETECTION SPRING 2015 DR. MICHAEL J. REALE.
Modeling of worlds A complicated object be decomposed into simple objects and represented by hierarchical model A world scene usually contain many objects.
CS 325 Introduction to Computer Graphics 03 / 08 / 2010 Instructor: Michael Eckmann.
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.
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,
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.
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
Visible Surface Detection
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.
Computer Graphics Inf4/MSc 1 Computer Graphics Lecture 5 Hidden Surface Removal and Rasterization Taku Komura.
Visible surface determination. Problem outline Given a set of 3D objects and a viewing specification, we wish to determine which lines or surfaces are.
CS 325 Introduction to Computer Graphics 03 / 10 / 2010 Instructor: Michael Eckmann.
1 Computer Graphics Week11 : Hidden Surface Removal.
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.
Visible Surface Detection
Computer Graphics Implementation II
Solid Area Scan Conversion or Visible Surface Detection
Hidden Surface Removal
CSC418 Computer Graphics Back Faces Visibility Algorithms.
CSCE 441: Computer Graphics Hidden Surface Removal (Cont.)
Visible-Surface Detection Methods
Graphics Pipeline Hidden Surfaces
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.)
Lecture 32: Visible Surface Detection
CSCE 441: Computer Graphics Hidden Surface Removal (Cont.)
Introduction to Computer Graphics with WebGL
Lecture 31: Visible Surface Detection
Implementation II Ed Angel Professor Emeritus of Computer Science
Presentation transcript:

Lecture 30: Visible Surface Detection CS552: Computer Graphics Lecture 30: Visible Surface Detection

Recap Solid Modeling Represent the solid object in a 3D space B-Reps Subdividing algorithms

Objective After completing this lecture, students will be able to Explain the importance of VSDs Solve the problem of backface culling

Visible Surface Detection A surface normal vector N and the viewing-direction vector Vview. A polygon surface with plane parameter C< 0 in a right-handed viewing coordinate system is identified as a back face when the viewing direction is along the negative

Limitation of Back-face Culling Concave polyhedron with one face partially hidden by other faces of the object.

Depth-Buffer Method Image-space approach for detecting visible surfaces Compares surface depth values throughout a scene for each pixel position on the projection plane Each surface of a scene is processed separately\ The algorithm is usually applied to scenes containing only polygon surfaces Also frequently alluded to as the z-buffer method

Illustration Three surfaces overlapping pixel position ( 𝑥,𝑦 ) on the view plane. The visible surface, 𝑆 1 , has the smallest depth value.

Depth-Buffer Algorithm Initialize the depth buffer and frame buffer so that for all buffer positions (x, y), depthBuff (x, y) = 1.0, frameBuff (x, y) = backgndColor Process each polygon in a scene, one at a time, as follows: For each projected (x, y) pixel position of a polygon, calculate the depth z (if not already known). If z < depthBuff (x, y), compute the surface color at that position and set depthBuff (x, y) = z, frameBuff (x, y) = surfColor (x, y) After all surfaces have been processed, the depth buffer contains depth values for the visible surfaces and the frame buffer contains the corresponding color values for those surfaces

Calculation Given the depth values for the vertex positions of any polygon in a scene At surface position (x, y), the depth is calculated from the plane equation as: 𝑧= −𝐴𝑥−𝐵𝑦−𝐷 𝐶 The depth z’ of the next position (x+1, y) along the scan line is obtained 𝑧= −𝐴(𝑥+1)−𝐵𝑦−𝐷 𝐶

Illustration y-1 scan line

A-Buffer Method An extension of the depth-buffer ideas An antialiasing, area-averaging, visibility-detection method REYES (“Renders Everything You Ever Saw”) The buffer region - accumulation buffer Stores a variety of surface data, in addition to depth values

Advantage of A-Buffer Each position in the A-buffer has two fields Depth field: A real-number value (+ve, -ve, 0). Surface data field: Surface data or a pointer.

A buffer: Surface Information RGB intensity components Opacity parameter (percent of transparency) Depth Percent of area coverage Surface identifier Other surface-rendering parameters

Scan-Line Method Image-space method for identifying visible surface Compares depth values along the various scan lines for a scene Different tables used for VSD Edge table Surface-facet table Active list table Flag for each surface

Illustration

Depth-Sorting Method Uses both image-space and object-space operations Surfaces are sorted in order of decreasing depth Surfaces are scan converted in order, starting with the surface of greatest depth. Sorting operations are carried out in both image and object space The scan conversion of the polygon surfaces is performed in image space. Painter’s algorithm

Illustration No depth overlap

Depth test The bounding rectangles (coordinate extents) in the xy directions for the two surfaces do not overlap. Surface S is completely behind the overlapping surface relative to the viewing position. The overlapping surface is completely in front of S relative to the viewing position. The boundary-edge projections of the two surfaces onto the view plane do not overlap.

Test 1 Two surfaces with depth overlap but no overlap in the x direction.

Test 2 and 3 Surface S is completely behind the overlapping surface S’ Overlapping surface S’ is completely in front of surface S , but S is not completely behind S’

Test 4 Two polygon surfaces with overlapping bounding rectangles in the xy plane.

Use of Sorted List Three surfaces that have been entered into the sorted surface list in the order S, S’, S’’ should be reordered as S’,S’’, S. Surface S extends to a greater depth, but it obscures surface S’

BSP-Tree Method BSP tree representation

Thank you Next Lecture: Visible Surface Detection