alecjacobson/computer-graphics-bounding-volume-hierarchy

Uneven Split generated from creating an AABBTree

Closed this issue · 1 comments

my ./rays output didn't look exactly like the one provided but I thought it was because of the random splitting of objects when all objects end up on one side of the splitting point
But now while debugging, I found that this uneven split happens for as many as 40 objects i.e. all 40 objects are classified to be on one side of the splitting point
I remember the professor said that this uneven splitting should occur near the leafs but it looks like mine occurs much higher in the tree
Did anyone experience something similar?

Thanks

When I built the tree, I noticed the depth was about 20 to 30; it is very likely that you are splitting on the wrong axis.