The Z-buffer algorithm is used for hidden surface removal of objects. The…

2012

The Z-buffer algorithm is used for hidden surface removal of objects. The maximum number of objects that can be handled by this algorithm shall

Answer: B. be arbitrary no. of objectsConceptThe Z-buffer (depth-buffer) method is an image-space visibility algorithm. Alongside the frame buffer, which holds one colour per pixel, it maintains a…

  1. A.

    Depend on the application

  2. B.

    be arbitrary no. of objects

  3. C.

    Depend on the memory availability

  4. D.

    Depend on the processor

Attempted by 15 students.

Show answer & explanation

Correct answer: B

Concept

The Z-buffer (depth-buffer) method is an image-space visibility algorithm. Alongside the frame buffer, which holds one colour per pixel, it maintains a depth buffer holding one depth value per pixel, initialised to the far plane.

Its visibility working storage is therefore (colour bits + depth bits) × width × height — a quantity fixed by the raster resolution alone. Nothing in this Z-buffer working-state expression refers to the scene, so this buffer footprint does not grow with the amount of geometry drawn.

Application

  1. Initialise every pixel: its depth entry is set to the far plane (maximum depth) and its colour entry to the background colour.

  2. Take one surface at a time and scan-convert it; the algorithm never needs to hold two surfaces simultaneously, and the surfaces need no particular order.

  3. For each pixel the surface covers, compute the fragment depth z and compare it with the depth already stored at that pixel.

  4. If z is nearer to the viewer, overwrite that pixel’s depth entry with z and its colour entry with the surface’s shade; otherwise discard the fragment.

  5. Once the surface is finished, no separate per-object or per-surface record is retained; its currently visible fragments remain represented through the one depth value and one colour held for each pixel.

  6. Submitting one more surface therefore adds scan-conversion work but does not enlarge the Z-buffer’s per-pixel allocation, so the Z-buffer method itself imposes no object-count cap.

Cross-check

Quantity

What it actually governs

Raster resolution

The size of the depth and frame buffers, fixed when they are allocated

Number of objects

Z-buffer work increases with submitted fragments; its per-pixel buffer size is unchanged

Processor speed

How fast a frame is rasterised, not what can be stored

Application domain

Which geometry is submitted, not the per-pixel depth test itself

Contrast this with object-space methods. Depth sorting (the painter’s algorithm) must hold and sort the entire surface list, costing O(n log n) time plus per-object storage, so its working set really does scale with n. The Z-buffer trades that for a fixed-size, resolution-determined buffer, which is exactly why it is the visibility method built into hardware rasterisers.

Practical hardware can still be limited by memory for geometry and model data, draw-call overhead, and rendering time. The conclusion is narrower: the Z-buffer’s own per-pixel allocation contains no object-count-dependent term.

Hence the number of objects the Z-buffer algorithm can handle is arbitrary.

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…