Page 170 - DCAP504_Computer Graphics
P. 170
Unit 11: Hidden Surfaces
The traditional way of rendering in most of the 3-D programs and games is not ray
Did you know?
tracing, but rather rasterization that takes effort to do the same thing with a much
faster speed but with a little less perfection.
11.6 Determination
Determination is the process used to determine the surfaces and parts of an object’s surfaces that are not
visible from a definite viewpoint. The process of hidden surface determination is often referred to as
hiding and such an algorithm is sometimes called as a hider. Hidden surface determination is very
much essential to render an image properly so that it could not be possible to look through walls in
virtual reality. Under determination, it is important to learn about the Octree method to understand the
concept of hidden surfaces. Before, discussing Octree method, let us understand the meaning of Octree.
Octree is also called as Octagon tree. Octrees are efficient data structures which can store three-
dimensional data of any form. It provides the advantage to search and insert data at a very fast rate but
the process of deleting and moving a data entry is very slow.
Octrees are just like binary trees except for having eight sub-nodes instead of two. The data is stored in
a hierarchical manner which allows you to search an element at a faster rate. Every Octree has a root-
node to which all the sub-nodes are anchored. A root-node has pointers to all the eight sub-nodes. A
C++ structure of a root-node would look like:
struct octreeroot
{
void *data;
struct octreeroot subnodes[8];
};
Here, data points to some other data and the child-node points to other child-nodes. If there are no
child-nodes, it points to null. The sub-node having no child-nodes is called as a leaf. Now, let us discuss
about Octree method.
Octree Method
Octree method is the most practical method employed to eliminate the hidden surfaces of an image. In
an Octree method, the hidden- surface elimination is accomplished by projecting Octree nodes onto the
viewing surface in a front to back order. When we come across a color value in an Octree node, the pixel
area in the frame buffer corresponding to this node is provided the color value only if no values have
already been stored into the buffer. If an area is invalid then nothing is loaded. If a node is found to be
completely obscured then it is eliminated from further processing so that there is no access to its
subtrees.
To display an Octree, one should
1. Map the Octree onto an Ouadtree of visible areas by traversing Octree nodes from front to back in
a recursive procedure.
2. Load the Quadtree representation for the visible surfaces into the frame buffer.
Search web and find out why the Octrees offer up an easier implementation and better
structure than a BSP tree?
LOVELY PROFESSIONAL UNIVERSITY 163