1 / 12

Octrees

Octrees. Purposes. Collision Detection Only need to check against objects within the node containing the object being calculated Occlusion Culling If a node has a visible object then all children nodes are also visible Ray Tracing. Purpose continued. Spatial Indexing

kristinaf
Télécharger la présentation

Octrees

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Octrees

  2. Purposes • Collision Detection • Only need to check against objects within the node containing the object being calculated • Occlusion Culling • If a node has a visible object then all children nodes are also visible • Ray Tracing

  3. Purpose continued • Spatial Indexing • Can split data into different nodes based on how similar the data is to the data within each node • Octree colour quantization • Can convert a 24bit RGB image to paletted 8bit by limiting the depth of each octant and averaging any colors that would go deeper than the limit with the deepest nodes color • Realtime Shadows

  4. BSP Trees • Binary Space Partitioning • Used for Occlusion Culling

  5. BSP continued (Teoh 116B slide)

  6. Quadtree • A node either has 4 children or none • For example, the below quadtree has a rule that no more than 3 dots can exist in a square.

  7. Quadtree • Landscape example:

  8. Quadtree continued struct quad { int x,y; // position of center node top_left,top_right; node bottom_left,bottom_right; // Other data here };

  9. Octree • Like a Quadtree except 3D • Splits into 8 subsections (octants)

  10. Octree continued struct node { int x,y,z; // position of center node nodeList[8]; // Other data here };

  11. Regular vs Loose • Each octant overlaps its’ siblings by a factor of .5 • Anything half the size of a parent node will fit completely inside a child node

  12. Ogre • Ogre uses Octree as one of the generic scene managers • mRoot->createSceneManager (ST_GENERIC); • Octree Scene Manager • Uses an octree to split the scene and performs well for most scenes, except those which are reliant on heavy occlusion. • Pros: • A simple and generic solution, works well for most scenes • Can use the StaticGeometry class to accelerate large chunks of immovable geometry • Cons: • No specific acceleration for particular scene structures • Heavily occluded scenes will need a more specialised solution

More Related