0% found this document useful (0 votes)
355 views

Depth Buffer Method

The depth buffer method is a technique for hidden surface removal in 3D graphics. It works by testing the depth (z-coordinate) of each surface to determine the closest visible surface at each pixel position. A depth buffer stores the depth value and a frame buffer stores the color value. During rendering, the depth of each new polygon is compared to the depth buffer - if closer, it overwrites the depth and color buffers. This allows efficient processing of polygons in any order while correctly rendering visible surfaces in front.

Uploaded by

SUSHANT SINGH
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
355 views

Depth Buffer Method

The depth buffer method is a technique for hidden surface removal in 3D graphics. It works by testing the depth (z-coordinate) of each surface to determine the closest visible surface at each pixel position. A depth buffer stores the depth value and a frame buffer stores the color value. During rendering, the depth of each new polygon is compared to the depth buffer - if closer, it overwrites the depth and color buffers. This allows efficient processing of polygons in any order while correctly rendering visible surfaces in front.

Uploaded by

SUSHANT SINGH
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Depth Buffer Method

In computer graphics,z-buffering,also known as depth buffering,is


the management of image depth co-ordinates in 3D
graphics,usually done in hardware,sometimes in software.It is one
solution to the visibility problem,which is the problem of deciding
which elements of a rendered scene are visible,and which are
hidden.
 This method is developed by Cutmull.
 It is an image-space approach. 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 values for a pixel are compared and
the closest (smallest z) surface determines the colour 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 polygones from the far
ones, two buffers named frame buffer and depth buffer are used.
 Depth Values for a surface position(x,y) are calculated from the plane
equation for each surface by:

Z= (-Ax-By-D)/C
 Depth Values across the edge are calculated by:
Z’= (-A(x+1)-By-D)/C
 Depth Values down the edge are recursively calculated by:
Z’= Z + [(A/m)+B]/C
 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 colour 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.
ALGORITHM: -
 Step 1: - Set the buffer values –
Depthbuffer (x,y) = 0
Framebuffer (x,y) = background colour
 Step 2: - Process each polygon (One at a time) For each projected (x,y)
pixel position of a polygon, calculate depth z.
If Z > depthbuffer (x,y)
Compute surface color,
set depthbuffer (x,y) = z,
framebuffer (x,y) = surfacecolor (x,y)
Advantages: -
 It is easy to implement.

 It reduces the speed problem if implmented in hardware.

 It processes one object at a time.

 Accurate performance.

Disadvantages: -
 It requires large memory.

 It is time consuming process.


USES: -
 The Z-buffer is a technology used in almost all contemporary computers,
laptops and mobile phones for performing 3D graphics, for example for
computer games. The Z-buffer is implemented as hardware in the silicon
Ics(integreted circuits) within these computers. The Z-buffer is also used
(implemented as software as opposed to hardware) for producing
computer-generated special effects for films.
 Furthermore, Z-buffer data obtained from rendering a surface from a
light’s point-of-view permits the creation of shadows by the shadow
mapping technique.

You might also like