Hey there :)

Why exactly do you want to use a BSP tree ? These are quite oldfashioned these days…

Also, to me it sounds like you are building some kind of AB-Octree mixture if you are talking about dividing through the center of some boundary volume. With BSP trees, you use the planes your polygons are located on as subdivision hyperplanes.

For the spanning problem, this again depends on how you want to use your BSP tree:

If you intend to use the convex interior half-spaces formed by a true (see above!) bsp on a closed, polygonal surface, you need to split your triangles with the plane. Here, it becomes helpful if you use a data structure which allows for multi-point, convex polygons (i.e. quads, and so on). However, the splitting you described is the only solution there. With regards to additional data structures, depending on performance, it might be a good idea to issue a total rebuild after bsp tree generation.

However, if you are just using the bsp tree as a means to get a hierarchial representation of your polygon soup, you may very well get around splitting: Instead of splitting, just create two entries for the spanning element, one on each side of the node. This for instance works well with collision detection.

Hope this helps,

Cheers,

- Wernaeh

I’ve decided to use BSP tree for my object which has been converted

into triangular mesh. The subdivision plane that i use builds the BSP

tree by subdividing along the center of x, y, or z bounds But the

biggest problem I’m facing right now is how to deal with situations

where a triangle is spanning across the plane ?? In this case part of

traingle is in one bounding volume and the other part is in the

sibling bounding volume. How to deal with this ??

Also, what happens is that when you have calculated geometry

preprocessing data structures like half edge data structure, then you

have to constantly change things which makes it even more complicated.

For eg. when a plane interesects a triangle, then it is split into two

polygons, you have to subdivide these polygons into n-2 triangles and

then change the half edge structure again and again. If someone can provide a link to a good BSP tree code it will be even more helpful