Prof. Neeraj Bhargava
Pooja Dixit
Department of Computer Science
School of Engineering & System Sciences
MDS, University Ajmer, Rajasthan, India
1
 When a picture that contains the non-transparent objects and
surfaces are viewed, the objects that are behind the objects that are
closer cannot be viewed. To obtain a realistic screen image, these
hidden surfaces need to be removed. This process of identification
and removal of these surfaces is known as Hidden-surface problem.
 The hidden surface problems can be solved by two method
◦ Object-Space method: In physical coordinate system, object-space method is
implemented. Where to find back face, 3-d objects and its parts are compared.
◦ Image-space method: image-space method is implemented in case of screen
coordinate system, in which after projection pixel by pixel position is used to identify
back face .
 When a 3D object need to be displayed on the 2D screen, the parts
of the screen that are visible from the chosen viewing position is
identified.
 Algorithms to detect visible objects are referred to as visible-surface
detection method.
2
 Object-space methods
◦ It is implemented in the physical co-ordinate system in
which objects are described.
◦ It Compares objects and parts of object to each other
within the scene definition to determine which surfaces
should be marked as visible
◦ object space methods are generally used in Line-display
algorithms.
 Image-space methods
◦ Image space method is implemented in the screen
coordinate system in which the objects are viewed.
◦ In an image space algorithm, Visibility is decided point
by point at each pixel position on the view plane.
◦ Most hidden line/surface algorithms use image-space
methods.
3
 z-buffering is an image-space algorithm.
 The basic idea is to test the Z-depth of each surface to
determine the closest(visible) surface.
 In this method each surface is processed separately one pixel
position at a time across the surface. The depth value for a
pixel are compared and the closest surface determines the
color to be displayed in the frame buffer.
 It is applied very efficiently on surfaces of polygon. Surfaces
can be processed in any order. To override the closer
polygons from the far ones, two buffers named frame buffer
and depth buffer, are used.
◦ Depth buffer is used to store depth values for (x, y) position, as surfaces
are processed (0 ≤ depth ≤ 1).
◦ The frame buffer is used to store the intensity value of color value at each
position (x, y).
 The z-coordinates are usually normalized to the range [0, 1].
The 0 value for z-coordinate indicates back clipping pane and
1 value for z-coordinates indicates front clipping pane.
4
 This algorithm applied very efficiently on
polygon surfaces, and surfaces are processed
in any order.
5
 Algorithm
 Step-1 − Initialize both the buffer initial value:
◦ Depthbuffer (x, y) = 0
◦ Framebuffer (x, y) = Intensity of background color(image
buffer is set to the background color)
 Step-2 − calculate Z value for each position in
the surface and then-
◦ If Z > depthbuffer (x, y)
 Compute surface color,
 set depthbuffer (x, y) = z,
 framebuffer (x, y) = surfacecolor (x, y)
 After processing all the surface we will get visible
surface in depth(x,y) and intensity value in
refresh buffer(x,y)
6
 Advantages
 It is easy to implement.
 It reduces the speed problem if implemented
in hardware.
 It processes one object at a time.
 Disadvantages
 It requires large memory.
 It is time consuming process.
7

Visible surface identification

  • 1.
    Prof. Neeraj Bhargava PoojaDixit Department of Computer Science School of Engineering & System Sciences MDS, University Ajmer, Rajasthan, India 1
  • 2.
     When apicture that contains the non-transparent objects and surfaces are viewed, the objects that are behind the objects that are closer cannot be viewed. To obtain a realistic screen image, these hidden surfaces need to be removed. This process of identification and removal of these surfaces is known as Hidden-surface problem.  The hidden surface problems can be solved by two method ◦ Object-Space method: In physical coordinate system, object-space method is implemented. Where to find back face, 3-d objects and its parts are compared. ◦ Image-space method: image-space method is implemented in case of screen coordinate system, in which after projection pixel by pixel position is used to identify back face .  When a 3D object need to be displayed on the 2D screen, the parts of the screen that are visible from the chosen viewing position is identified.  Algorithms to detect visible objects are referred to as visible-surface detection method. 2
  • 3.
     Object-space methods ◦It is implemented in the physical co-ordinate system in which objects are described. ◦ It Compares objects and parts of object to each other within the scene definition to determine which surfaces should be marked as visible ◦ object space methods are generally used in Line-display algorithms.  Image-space methods ◦ Image space method is implemented in the screen coordinate system in which the objects are viewed. ◦ In an image space algorithm, Visibility is decided point by point at each pixel position on the view plane. ◦ Most hidden line/surface algorithms use image-space methods. 3
  • 4.
     z-buffering isan image-space algorithm.  The basic idea is to test the Z-depth of each surface to determine the closest(visible) surface.  In this method each surface is processed separately one pixel position at a time across the surface. The depth value for a pixel are compared and the closest surface determines the color to be displayed in the frame buffer.  It is applied very efficiently on surfaces of polygon. Surfaces can be processed in any order. To override the closer polygons from the far ones, two buffers named frame buffer and depth buffer, are used. ◦ Depth buffer is used to store depth values for (x, y) position, as surfaces are processed (0 ≤ depth ≤ 1). ◦ The frame buffer is used to store the intensity value of color value at each position (x, y).  The z-coordinates are usually normalized to the range [0, 1]. The 0 value for z-coordinate indicates back clipping pane and 1 value for z-coordinates indicates front clipping pane. 4
  • 5.
     This algorithmapplied very efficiently on polygon surfaces, and surfaces are processed in any order. 5
  • 6.
     Algorithm  Step-1− Initialize both the buffer initial value: ◦ Depthbuffer (x, y) = 0 ◦ Framebuffer (x, y) = Intensity of background color(image buffer is set to the background color)  Step-2 − calculate Z value for each position in the surface and then- ◦ If Z > depthbuffer (x, y)  Compute surface color,  set depthbuffer (x, y) = z,  framebuffer (x, y) = surfacecolor (x, y)  After processing all the surface we will get visible surface in depth(x,y) and intensity value in refresh buffer(x,y) 6
  • 7.
     Advantages  Itis easy to implement.  It reduces the speed problem if implemented in hardware.  It processes one object at a time.  Disadvantages  It requires large memory.  It is time consuming process. 7