Breaking News

BCA Semester 5: Computer Graphics - Hidden Surface Removal Method

Hidden Surface Removal Method

BCA Semester 5: Computer Graphics - Hidden Surface Removal Method

Question:  What is the hidden surface removal method? Why do we need to remove hidden surface? Discuss the depth buffer (Z buffer) algorithm for hidden surface removal.

Answer: Hidden surface removal method is a process to remove the surfaces that are blocked or hidden from view in order to construct a realistic view of the 3D scene.

We need to remove these hidden surfaces in order to get a realistic image. The hidden surface removal method provides a solution to the visibility problem, which was one of the first major problems in the 3D graphics field. Hidden surface determination is necessary to render an image correctly, so that one could not look through the walls in virtual reality.



The algorithms used for hidden surface removal method are:


  • Object Space Method: It is implemented in the World Coordinate System, relating the geometrical relationships of actual objects. It compares different parts of the objects, and are used in line-display algorithms.  They require less work than image space algorithms and saves time also. 
  • Image Space Method: It is implemented in the World Coordinate System, relating the relationships of images of the objects. Visibility is decided point-by-point on the view plane. They are used at pixel levels. They are more efficient and are widely used in practicality. 


Depth Buffer (Z buffer) Algorithm:

  1. Object depth is usually measured along the z-axis from the view plane.
  2. Applied to the scenes involving polygon surfaces.
  3. Each surface of the scene is processed separately, one point at a time on each surface.
  4. Each (x,y,z) coordinate positions correspond to (x,y) positions of the orthographic projection on the view plane.


  5. Two buffer areas are required:
    Depth Buffer
         
    It is used to store the depth values of each coordinate.
    Refresh Buffer
         
    It stores the intensity value for each position.

    Initially, Depth Buffer = 0(min depth)
    and Refresh Buffer = background intensity
  6. Each depth value of each point is then scanned, calculated and is compared to the previous value.
  7. If the new value is greater than the previous one, Depth Buffer saves the new value and the intensity at that position is saved in the refresh buffer.
  8. Depth Values are calculated from the plane equation ( Ax + By + Cz + D = 0) as

    where x,y,z are the points on the plane and A,B,C, and D are the coefficients describing properties of a plane.