Visible surface determination

Slides:



Advertisements
Similar presentations
Computer Graphics - Rasterization -
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.
Graphics Pipeline.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
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.
CHAPTER 12 Height Maps, Hidden Surface Removal, Clipping and Level of Detail Algorithms © 2008 Cengage Learning EMEA.
1 Computer Graphics Chapter 9 Rendering. [9]-2RM Rendering Three dimensional object rendering is the set of collective processes which make the object.
Computer Graphics Visible Surface Determination. Goal of Visible Surface Determination To draw only the surfaces (triangles) that are visible, given a.
Part I: Basics of Computer Graphics
Output Primitives 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.
CS 4731: Computer Graphics Lecture 18: Hidden Surface Removal Emmanuel Agu.
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
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
Zakrite ploskve. Problem outline Given a set of 3D objects and a viewing specification, we wish to determine which lines or surfaces are visible, so that.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Advanced Computer Graphics Depth & Stencil Buffers / Rendering to Textures CO2409 Computer Graphics Week 19.
1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the.
Hidden Surface Removal 1.  Suppose that we have the polyhedron which has 3 totally visible surfaces, 4 totally invisible/hidden surfaces, and 1 partially.
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.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Chris Mayer & Nic Shulver Hidden Surface Wire frame drawings Wire frame drawings are quick to produce but are often confusing It is difficult to determine.
Implementation II.
Basic Ray Tracing CMSC 435/634.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © Visible Surface Determination (VSD) To render or not to render, that is the question… 1 of.
Computer Graphics I, Fall 2010 Implementation II.
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.
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
COMPUTER GRAPHICS CS 482 – FALL 2015 NOVEMBER 10, 2015 VISIBILITY CULLING HIDDEN SURFACES ANTIALIASING HALFTONING.
Visible-Surface Detection Methods. To identify those parts of a scene that are visible from a chosen viewing position. Surfaces which are obscured by.
Lecture 30: Visible Surface Detection
Applications and Rendering pipeline
Visible Surface Detection
Computer Graphics Implementation II
Week 7 - Monday CS361.
Visible Surface Determination (VSD)
Computer Graphics Chapter 9 Rendering.
Week 2 - Friday CS361.
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.)
CSC461: Lecture 20 Parallel Projections in OpenGL
3D Graphics Rendering PPT By Ricardo Veguilla.
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
Implementation II Ed Angel Professor Emeritus of Computer Science
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
UMBC Graphics for Games
Visibility (hidden surface removal)
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
The Framebuffer 1 Lecture 37 Fri, Nov 30, 2007.
HSR & Scan conversion 신승영.
Implementation II Ed Angel Professor Emeritus of Computer Science
Visible-Surface Determination
Presentation transcript:

Visible surface determination

Problem outline Given a set of 3D objects and a viewing specification, we wish to determine which lines or surfaces are visible, so that we do not needlessly calculate and draw surfces, which will not ultimately be seen by the viewer, or which might confuse the viewer.

Simple example… With all lines drawn, it is not easy to determine the front and back of the box. Is this the front face of the cube or the rear?

Simple example… ?

Approaches There are 2 fundamental approaches to the problem. Object space Image space

Object space Object space algorithms do their work on the objects themselves before they are converted to pixels in the frame buffer. The resolution of the display device is irrelevant here as this calculation is done at the mathematical level of the objects Pseudo code… for each object a in the scene determine which parts of object a are visible draw these parts in the appropriate colour Involves comparing the polygons in object a to other polygons in a and to polygons in every other object in the scene.

Image space Image space algorithms do their work as the objects are being converted to pixels in the frame buffer. The resolution of the display device is important here as this is done on a pixel by pixel basis. Pseudo code… for each pixel in the frame buffer determine which polygon is closest to the viewer at that pixel location color the pixel with the color of that polygon at that location

Image Space Approach Look at each projector (nm for an n x m frame buffer) and find closest of k polygons Complexity O(nmk) Two techniques: Ray tracing Z-buffer

Algorithms Object space Image space Hybrid Back-face culling z-buffer algorithm Hybrid Depth-sort

z-Buffer Algorithm Use a buffer called the Z (or depth) buffer to store the depth of the closest object at each pixel found so far As we render each polygon, compare the depth of each pixel to depth in Z buffer If less, place shade of pixel in color buffer and update Z buffer

Z-buffer algorithm The z-buffer or depth-buffer is one of the simplest visible-surface algorithms. Z-buffering is an image-space algorithm, an involves the use of a (surprisingly) z-buffer, to store the depth, or z-value of each pixel. All of the elements of the z-buffer are initially set to be 'very far away.' Whenever a pixel colour is to be changed the depth of this new colour is compared to the current depth in the z-buffer. If this colour is 'closer' than the previous colour the pixel is given the new colour, and the z-buffer entry for that pixel is updated as well. Otherwise the pixel retains the old colour, and the z-buffer retains its old value.

Two buffer areas required: depth buffer – used to store depth values for each(x,y) position Refresh buffer - stores the intensity values for each position Algo: Initialize depth buffer & refresh buffer for positions (x,y), Depth(x,y)=0, refresh(x,y)=Ibackgnd 2. For each position on surface , compare depth values to previously stored values in the depth buffer to determine visibility. Calculate the depth z for each(x,y) position on the surface. If z >depth(x,y),then set depth(x,y)= z refresh(x,y)=Isurf (x,y) where Ibackgnd value for backgnd intensity Isurf (x,y) is the projected intensity value for surface @ pixel position (x,y).

Depth value for surface position (x,y) are calculated from the equation : Z= - Ax–By-D C

Z-buffer algorithm Pseudo code… for each polygon for each pixel p in the polygon's projection { pz = polygon's normalized z-value at (x, y); //z ranges from -1 to 0 if (pz > zBuffer[x, y]) // closer to the camera { zBuffer[x, y] = pz; framebuffer[x, y] = colour of pixel p; }