Bsp generation question

Started by
2 comments, last by ga 19 years, 6 months ago
I'm writing a program to generate a bsp-tree from a set of geometry. I have a question about the splitting of polygons to divide them into the front and back polygons for a partition-plane. What do you do if a polygon is actually on the splitting-plane? Do you put it in the front or back for this plane? I've read some bsp-documents and none of them handles this case. I'm hoping someone can provide an answer to this simple question. Thanks in advance.
Advertisement
should depends which way the normal of the polygon is facing.

if it's facing towards the front the of splitting plane, then it's to the front, else, belongs to the back. If double sided, belongs to both :)

Everything is better with Metal.

Thanks, that's the information I needed.
If you put it into one of the sub-trees you're building a leaf-based bsp tree. Alternatively, you could save a list of polygons on the splitting plane for each node. A disadvantage of leaf-based trees is that you possibly have to split the polygons on the node's plane further (more polygons in total) which you don't need to do with the node-based tree.
It depends on your application which method is more appropriate.
Visit our homepage: www.rarebyte.de.stGA

This topic is closed to new replies.

Advertisement