0% found this document useful (0 votes)
54 views24 pages

A Lion in The Desert

The document discusses binary space partitioning (BSP) trees, which are data structures used to partition 3D space into convex regions for purposes like hidden surface removal and point location queries. A BSP tree is constructed by recursively splitting space into two halves with planes, resulting in a tree structure where internal nodes represent splitting planes and leaf nodes are convex spatial regions. Traversing the tree from back to front allows rendering polygons in the correct visibility order.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views24 pages

A Lion in The Desert

The document discusses binary space partitioning (BSP) trees, which are data structures used to partition 3D space into convex regions for purposes like hidden surface removal and point location queries. A BSP tree is constructed by recursively splitting space into two halves with planes, resulting in a tree structure where internal nodes represent splitting planes and leaf nodes are convex spatial regions. Traversing the tree from back to front allows rendering polygons in the correct visibility order.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

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. Repeat the process for the part that the lion is in.

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.

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

Splitting Planes
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.

Creating the tree


We choose a splitting plane a split the space in two.
Associated Splitting Plane

Chosen Splitting Plane

Root Node

L Node

R Node

Creating the tree


Associated Splitting Plane

Chosen Splitting Plane

L Node

R Node

Creating the tree


Chosen Splitting Plane

Creating the tree

Chosen Splitting Plane

Creating the tree

The leaves of the tree are convex regions.

Traversing the Tree


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

Traversing the Tree


Test against the splitting plane

Test against the splitting plane

Traverse the R subtree before the L subtree

Rendering order:

Creating the tree


Test against the splitting plane

Test against the splitting plane

Traverse the L subtree before the R subtree

Rendering order:

Creating the tree


Test against the splitting plane

Test against the splitting plane

Traverse the L subtree before the R subtree

Rendering order:

Creating the tree


Test against the splitting plane

Test against the splitting plane

Traverse the R subtree before the L subtree

Rendering order:

Creating the tree

Test against the splitting plane

Traverse the L subtree before the R subtree

Test against the splitting plane

Rendering order:

Convex Cells

The cells can be ordered back to front, or front to back.

F2B Order
6 5

4
2 3 1

F2B Order

4 3 1 6

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.

BSP Construction
1 3 4

1 3 6

1 3 7 4 6

3 6 5 4 5

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?

Point Location

Given p, in which cell it resides?

Ray Traversal

Given R, which cells, and in which order it traverses?

You might also like