If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
![]() |
|
|
#1 |
|
Registered
Join Date: Aug 2002
Posts: 4
|
I'm trying to build an adequate axis aligned BSP tree for my raytracer that
only uses triangles. Usually the stop criteria for the build is when the amount of triangles is less than a number (usually 2 or 3) or when the maximum depth is reached. The problem is with triangles that share verices the build will only stop when reached maximum depth which is very sub-optimal. Usually one vertex is shared by 5 or 6 triangles which is usually higher that you want in a node. The nodes that contains vertices seem impossible to decompose any further. I'm trying to solve this by with either when a node contains one or more vertices recursion stops. Or, if a node contains only one vertex, set split plane at the vertex and look at the other vertices to see what side the triangle is on. Do you have any better way to solve this? Because this is for a raytracer I don't have to care about splitting the triangles. |
|
|
|
|
|
#2 |
|
Senior Member
|
I don't know much about raytracing, but shared vertices, makes me thinkg of KD-trees.
__________________
Regards. |
|
|
|
|
|
#3 | |
|
Registered
Join Date: Aug 2002
Posts: 4
|
Quote:
|
|
|
|
|
|
|
#4 |
|
Senior Member
|
Out of curiosity, why is 5 to 6 polys considered too many?
__________________
Regards. |
|
|
|
|
|
#5 | |
|
Registered
Join Date: Aug 2002
Posts: 4
|
Quote:
|
|
|
|
|
|
|
#6 |
|
Senior Member
|
AFAICT, I don't think restricting the number of polygons per node is really necessary. One can only have so many polygons that have a common vertex divider.
__________________
Regards. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|