1 / 24

a lion in the desert

a lion in the desert. How do you find a lion in the desert? How about when you have a predicate that tells you if the lion is in front or behind a separating plane?. a lion in the desert. Cut the desert in two and ask in which part is the lion.

ardella
Download Presentation

a lion in the desert

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. a lion in the desert How do you find a lion in the desert? How about when you have a predicate that tells you if the lion is in front or behind a separating plane?

  2. a lion in the desert • Cut the desert in two and ask in which part is the lion. • Repeat the process for the part that the lion is in.

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

  4. Occlusion Objects “behind” the splitting plane cannothide objects “in front” of the plane, regardless the relative location of the observer.

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

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

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

  8. Creating the tree Chosen Splitting Plane

  9. Creating the tree Chosen Splitting Plane

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

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

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

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

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

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

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

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

  18. F2B Order 6 5 4 2 3 1

  19. F2B Order 4 3 6 1 5 2

  20. 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.

  21. 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

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

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

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

More Related