bsp trees
play

BSP Trees Binary Spatial Partitioning (BSP) means: Partition (or - PowerPoint PPT Presentation

BSP Trees Binary Spatial Partitioning (BSP) means: Partition (or split) a space into Binary (two) parts using a separating plane. Repeat the process for both resulting subspaces and you will get a BSP tree. Occlusion Objects


  1. BSP Trees • Binary Spatial Partitioning (BSP) means: – Partition (or split) a space into Binary (two) parts using a separating plane. – Repeat the process for both resulting subspaces and you will get a BSP tree.

  2. Occlusion Objects “behind” the splitting plane cannot hide objects “in front” of the plane, regardless the relative location of the observer.

  3. Splitting Planes • What we see in this example is a simple model with four polygons. • We choose the splitting planes so that they lay on a one of the polygon of the model.

  4. Creating the tree We choose a splitting Chosen Splitting Plane plane that splits the space in two. Root Node Associated Splitting Plane L Node R Node

  5. Creating the tree Associated Splitting Plane Chosen Splitting Plane L Node R Node

  6. Creating the tree Chosen Splitting Plane

  7. Creating the tree Chosen Splitting Plane

  8. Creating the tree The leaves of the tree are convex regions.

  9. Traversing the Tree We want to render the scene from this point of view. In what order should we render the regions?

  10. Traversing the Tree Test against the splitting plane Test against the splitting plane Traverse the R subtree before the L subtree Rendering order:

  11. Creating the tree Test against the splitting plane Test against the splitting plane Traverse the L subtree before the R subtree Rendering order:

  12. Creating the tree Test against the splitting plane Test against the splitting plane Traverse the L subtree before the R subtree Rendering order:

  13. Creating the tree Test against the splitting plane Test against the splitting plane Traverse the R subtree before the L subtree Rendering order:

  14. Creating the tree Test against the splitting plane Test against the Traverse the L subtree before splitting plane the R subtree Rendering order:

  15. Convex Cells The cells can be ordered back to front, or front to back.

  16. F2B Order 6 5 4 2 3 1

  17. F2B Order 4 3 6 1 5 2

  18. Hidden Surface Removal • Construct a BSP tree: – Pick a polygon, let its supporting plane be the root of the tree. – Create two lists of polygons: these in front, and those behind (splitting polygons as necessary). – Recurse on the two lists to create the two sub-trees. Display: – Traverse the BSP tree back to front, drawing polygons in the order they are encountered in the traversal.

  19. BSP Construction 2 2 1 1 3 3 6 5 5 4 4 2 2 1 1 3 3 6 6 5 7 5 4 4

  20. BSP Trees BSP-Trees are view-independent A good splitting plane minimize the number of polygon intersections, and aims at a balanced tree. How to choose the order of splitting planes during construction?

  21. Point Location Given p, in which cell it resides?

  22. Ray Traversal Given R, which cells, and in which order it traverses?

Recommend


More recommend