OCTREE METHODS






                                           When an octree representation is employed for the viewing volume, hidden surface elimination is accomplished by projecting octree nodes onto the viewing surface in an exceedingly front-to-back order. In picture, the front face of a part of space (the side toward the viewer) is created with octants 0, 1, 2, and 3. Surfaces within the front of those octants are visible to the viewer. Any surfaces toward the rear of the front octants or within the back octants (4, 5, 6, and 7) could also be hidden by the front surfaces.

Back surfaces are eliminated, for the viewing direction given in picture, by processing data elements within the octree nodes within the order 0, 1, 2, 3, 4, 5, 6, 7. This leads to a depth-first traversal of the octree, so nodes representing octants 0, 1.2, and three for the whole region are visited before the nodes representing octants 4, 5, 6, and 7. Similarly, the nodes for the front four sub octants of octant 0 are visited before the nodes for the four back sub octants. The traversal of the octree continues during this order for every octant subdivision.

When a color value is encountered in an octree node, the pixel area within the buffer store comparable to this node is assigned that color value on condition that no values have previously been stored during this area. during this way, only the font colors are loaded into the buffer. Nothing is loaded if a part is void. Any node that's found to be completely obscured is eliminated from further processing, so its sub trees aren't accessed.

Different views of objects represented as octrees will be obtained by applying transformations to the octree representation that reorient the item in step with the view selected. We assume that the octree representation is often founded so visible-Surface Detection Methods that octants O, 1, 2, and three of a part form the front faces.

A technique for displaying an octree is first to map the octree onto a quad tree 6 of visible areas by traversing octree nodes from front to back in an exceedingly recursive procedure. Then the quad tree representation for the visible surfaces is loaded into the buffer store. Contributions to quadrant 0 come from octants 0 and 4. Color values in quadrant 1 are obtained from surfaces in octants 1 and 5, and values in each of the opposite two quadrants are generated from the pair of octants aligned with each of those quadrants.

Recursive processing of octree nodes is demonstrated within the following procedure, which accepts an octree description and creates the quad tree representation for visible surfaces within the region. In most cases, both a front and a back octant must be considered in determining the right color values for a quadrant. But if the front octant is homogeneously stuffed with some color, we don't process the rear octant. For heterogeneous regions, is that the recursively called, passing as new arguments the kid of the heterogeneous octant and a newly created quad tree node? If the front is empty, the rear octant is processed. Otherwise, two recursive calls are made, one for the rear octant and one for the front octant.

Comments

POPULAR POSTS

POPULAR POSTS