Category: 

What Is an Octree?

Article Details
  • Written By: Alex Newth
  • Edited By: Angela B.
  • Last Modified Date: 26 September 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
Roughly one-fifth of the world's stock of gold - worth over $200 billion USD - is stored under the streets of London.  more...

September 30 ,  1949 :  The Berlin Air Lift ended.  more...

An octree is a digital tree structure used to create three-dimensional (3D) and polygonal creations, mostly for the gaming industry. In the octree structure, each internal node has either no children or eight children — nothing in between — and each child node is able to hold color information for the red-blue-green (RGB) color profile. The entire structure starts as one cube, and empty internal cubes are used for collision information. This structure is very memory efficient, because there is a relatively small amount of data held in each child and the tree can be limited in size.

When a model is made for a video game, it needs to have texture and color information and must be able to collide with other models. One of the structures used in this industry is the octree. Sometimes called an oct tree, this name signifies the importance of the number eight in this tree structure. Like make tree structures, the octree has parent and child nodes. Unlike other trees, there is very little variety in how many child nodes can be made from the parent.

Ad

Each parent can include either eight nodes or none. Both cube types are important in creating a fully rendered model. The most intensive cubes are the ones with eight nodes. Each internal node includes color and texture information, so the model can have an intricate appearance. For example, if the model is a tree, each of the internal nodes must include a brown color for the trunk, and shading information to create a realistic texture.

While the cubes with eight nodes are important to an octree, the empty cubes are just as important. The entire structure starts out as one large empty cube, which other smaller cubes can inhabit. This cube, along with other empty cubes, is used primarily for collision information. For example, if one model bumps into this model, the empty cubes will tell the model that it cannot advance, because it creates a collision.

Creating a proper model with an octree is intensive, and a lot of information goes into it, but the structure itself uses memory very efficiently. One reason for this is that, while there is a lot of coding, the information is just color and texture information and, thus, rather small. Another reason is that the tree has different levels that hold unneeded data and, if pruned, the memory can be scaled down even more.

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

exception 'Exception' with message 'error writing captcha: Duplicate entry '2147483647' for key 'PRIMARY'' in /ssd/www/wisegeek/public_html/_core/classes/public/Captcha.php:44
Stack trace:
#0 /ssd/www/wisegeek/public_html/_core/controls/public/ControlDiscussionPostBox.php(324): Captcha->createCaptcha()
#1 /ssd/www/wisegeek/public_html/framework/classes/Control.php(104): ControlDiscussionPostBox->preRender(false)
#2 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): Control->render()
#3 /ssd/www/wisegeek/public_html/tpl/default-nocustom-lu/pages/public/article/article.htm(526): Control->__toString()
#4 /ssd/www/wisegeek/public_html/framework/classes/Control.php(300): require('/ssd/www/wisege...')
#5 /ssd/www/wisegeek/public_html/framework/classes/Control.php(309): Control->requireTpl('pages/public/ar...', Object(PageArticleCom), true)
#6 /ssd/www/wisegeek/public_html/framework/classes/Control.php(131): Control->renderTpl('pages/public/ar...', Object(PageArticleCom))
#7 /ssd/www/wisegeek/public_html/framework/classes/FormDataControl.php(87): Control->renderTemplate()
#8 /ssd/www/wisegeek/public_html/framework/classes/Control.php(109): FormDataControl->renderTemplate()
#9 /ssd/www/wisegeek/public_html/framework/classes/ScriptPage.php(50): Control->render(false)
#10 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): ScriptPage->render()
#11 /ssd/www/wisegeek/public_html/framework/classes/Page.php(97): Control->__toString()
#12 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(443): Page->processRequest()
#13 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(7): PublicFrontController->renderPage()
#14 /ssd/www/wisegeek/public_html/index.php(11): PublicFrontController::run()
#15 {main}