Page 113 - DCAP313_LAB_ON_COMPUTER_GRAPHICS
P. 113
Unit 7: Implementation of Hidden Surface in 2D
One of the fundamental tasks of a renderer is to explain the visibility, or concealed surface, Notes
problem. That is, given a set of objects, say a list of polygons, objects that are in front of other
objects from the point of the view of the spectator will obscure the scene behind them. While we
normally think of this as a 3D problem, it applies to 2D animations as well which is sometimes
known as 2.5D drawing. Picture a 2D cartoon in which one character is moving in front of
another. If a computer is rendering the image, it needs to know which 2D object to draw in
front of another. Objects can be assigned a priority to specify the ordering of drawing, which is
essentially assigning a pseudo-depth to the objects. Different algorithms have been developed
over the years to accomplish the hidden surface task for 3D scenes. .
In displaying objects, there regularly occurs overlapping, meaning that the objects which are closer
are visible, and those behind them are non-visible, because they appear as hidden behind them.
There have been planed many, rather complex algorithms for solving this issue. Their goal is to
find out objects whose parts are visible only from the observer place. Sometimes it is necessary
to draw also edges of overlapped objects, most often by dash lines. The visibility algorithms
always depend on the fact of how the objects are represented in an area. The optimal variant is
to have objects described using their limits, best by surfaces. Most of these algorithms too are
prepared for this sort of representation of objects. The process used to determine which surfaces
and parts of surfaces are not visible from a certain viewpoint. 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. The analogue for line rendering is
hidden line removal. Hidden surface determination is necessary to render an image correctly,
so that one cannot look through walls in virtual reality.
Some Basic Point of Hidden Surfaces
• Construct a 3D hierarchical geometric model
• Define a virtual camera
• Map points in 3D space to points in an image
• Produce a wireframe drawing in 2D from 3D object Of course, there’s more work to be
done
• Not every part of every 3D object is visible to a particular viewer. We need an algorithm
to determine what parts of each object should get drawn
• Known as “hidden surface elimination” or “visible surface determination”
• Hidden surface elimination algorithms can be categorized in three major ways:
○ Object space vs. image space
○ Object order vs. image order
○ Sort first vs. sort last
Hidden surface (line) removal is the process of removing surfaces (lines) which are not visible
from the chosen viewing position. Hidden surface/line algorithms are often classified as one
of the following:
• Object space: algorithms which work on object definitions directly;
• Image space: algorithms which work on the projected image.
There is no one place in the viewing pipeline where these algorithms should be used the ideal
position in the pipeline is often specific to the particular algorithm. Some algorithms do not
perform hidden surface/line-removal completely, but are designed to do some of the work early
on in the pipeline, thereby reducing the amount of surfaces to be processed.
Object Space Algorithms
Operate on geometric primitives
• For each object in the scene, compute the part of it which is not obscured by any other
object, then draw
LOVELY PROFESSIONAL UNIVERSITY 107