ArticleslgStudy

computer science

Hidden-surface determination

Hidden-surface determination is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Hidden-surface determination rather than just read about it. In short: In 3D computer graphics, hidden-surface determination (also known as shown-surface determination, hidden-surface removal (HSR), occlusion culling (OC) or visible-surface determination (VSD)) is the process of identifying what surfaces and parts of surfaces can be seen from a particular viewing angle. A hidden-surface determination algorithm is a solution to the visibility problem, which was one of the first major pr…

Hidden-surface determination — main illustration
Hidden-surface determination — illustration

Key takeaways

  • Hidden-surface determination belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Hidden-surface determination to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Hidden-surface determination from memory before moving on to harder problems.

Reference excerpt

In 3D computer graphics, hidden-surface determination (also known as shown-surface determination, hidden-surface removal (HSR), occlusion culling (OC) or visible-surface determination (VSD)) is the process of identifying what surfaces and parts of surfaces can be seen from a particular viewing angle. A hidden-surface determination algorithm is a solution to the visibility problem, which was one of the first major problems in the field of 3D computer graphics. The process of hidden-surface determination is sometimes called hiding, and such an algorithm is sometimes called a hider. When referring to line rendering it is known as hidden-line removal. Hidden-surface determination is necessary to render a scene correctly, so that one may not view features hidden behind the model itself, allowing only the naturally viewable portion of the graphic to be visible.

Background Hidden-surface determination is a process that identifies which surfaces are not visible to the user (for example, because they lie behind opaque objects such as walls). Despite advances in hardware capability, rendering algorithms require substantial computational resources. By deciding that certain surfaces do not need to be rendered because they are not visible, rendering engines can improve efficiency, allowing the rendering of large world spaces. There are many techniques for hidden-surface determination, but they generally rely on sorting the surfaces based on their distance from the viewer. Sorting large quantities of graphics primitives can be computationally-expensive and is usually done by divide and conquer. The different hidden-surface determination techniques differ, in part, through the way in which the space is partitioned prior to sorting.

Algorithms A rendering pipeline typically entails the following steps: projection, clipping, and rasterization. Some algorithms used in rendering include:

Z-buffering During rasterization, the depth (Z value) of each pixel (or sample in the case of anti-aliasing, but without loss of generality the term pixel is used) is checked against an existing depth value. If the current pixel is behind the pixel in the Z-buffer, the pixel is rejected, otherwise, it is shaded and its depth value replaces the one in the Z-buffer. Z-buffering supports dynamic scenes easily and is currently implemented efficiently in graphics hardware. This approach is the current standard. Z-buffering requires up to 4 bytes per pixel, and can have a substantial computational cost since the rasterization algorithm needs to check each rasterized sample against the Z-buffer. The Z-buffer algorithm can suffer from artifacts due to precision errors (also known as Z-fighting). Coverage buffers (C-buffer) and surface buffer (S-buffer) Faster than Z-buffering and commonly used in games such as Quake I, these approaches store information about already displayed segments for each line of the screen (in contrast of storing each pixel as is the case for Z-buffering). New polygons are then cut against already displayed segments that would hide them. An S-buffer can display unsorted polygons, while a C-buffer requires polygons to be displayed from the nearest to the furthest. Because the C-buffer technique does not require a pixel to be drawn more than once, the process is slightly faster. This approach was commonly used with binary space partitioning (BSP) trees. Sorted active edge list Used in Quake I, this technique stores a list of the edges of already displayed polygons (see scanline rendering). Polygons are displayed from the nearest to the furthest. New polygons are clipped against already displayed polygons' edges, creating new polygons to display, then storing the additional edges. Such an approach is harder to implement than S/C/Z-buffers, but it scales much better with increased image resolution. Painter's algorithm This algorithm sorts polygons by their barycenter and draws them back to front. This approach produces few artifacts when applied to scenes with polygons of similar size forming smooth meshes and back-face culling turned on. The drawbacks are the computational cost of the sorting step and the fact that visual artifacts can occur. This algorithm can fail for general scenes, as it cannot handle polygons in various common configurations, such as surfaces that intersect each other. Binary space partitioning (BSP) This technique divides a scene along planes corresponding to polygon boundaries. The subdivision is constructed in such a way as to provide an unambiguous depth ordering from any point in the scene when the BSP tree is traversed. The main disadvantage of the technique is the high computational cost of the construction of the BSP tree. As a result, this approach is less suitable for scenes consisting of dynamic geometry. The advantage of BSP is that the data is pre-sorted and error-free, and can be used as input for the previously mentioned algorithms. Note that the BSP is not a solution to hidden-surface removal, only an aid. Ray tracing Ray tracing attempts to model the path of light rays to a viewpoint by tracing rays from the viewpoint into the scene. Although not a hidden-surface removal algorithm as such, it implicitly solves the hidden-surface removal problem by finding the nearest surface along each view-ray. Effectively this approach is equivalent to sorting all the geometry on a per-pixel basis. The Warnock algorithm This algorithm divides the screen into smaller areas and sorts triangles within these. If there is ambiguity (i.e., polygons overlap in-depth extent within these areas), then further subdivision occurs. At the limit, the subdivision may occur down to the pixel level.

Culling and visible-surface determination A related area to visible-surface determination is culling, which usually happens before visible-surface determination in a rendering pipeline. Primitives or batches of primitives can be rejected in their entirety, which usually reduces the computational load in a rendering system. Types of culling algorithms include:

… excerpt ends here. Continue reading the full article.

Illustrations

Hidden-surface determination illustration

Worked examples

Example 1 — a first encounter with Hidden-surface determination

Start with the simplest possible case. Write down what Hidden-surface determination claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Hidden-surface determination before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Hidden-surface determination ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Hidden-surface determination

In research
Hidden-surface determination appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Hidden-surface determination in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Hidden-surface determination is common in secondary-school and first-year university syllabi. It links to neighbouring topics 3D rendering, Computer graphics algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Hidden-surface determination outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Hidden-surface determination” →

How to study Hidden-surface determination in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Hidden-surface determination means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Hidden-surface determination out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Hidden-surface determination in simple terms?

In 3D computer graphics, hidden-surface determination (also known as shown-surface determination, hidden-surface removal (HSR), occlusion culling (OC) or visible-surface determination (VSD)) is the process of identifying what surfaces and parts of surfaces can be seen from a particular viewing angl…

Why does Hidden-surface determination matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Hidden-surface determination?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Hidden-surface determination.

Tags

  • 3D rendering
  • Computer graphics algorithms

Keep exploring