dilevin / computer-graphics-bounding-volume-hierarchy

Computer Graphics Assignment about Bounding Volume Hierarchies
6 stars 5 forks source link

Midpoint Ties #50

Open amirhmk opened 4 years ago

amirhmk commented 4 years ago

What should the behaviour of the tree splitting be if the split that we end up doing keeps moving the objects to one sider over the other, how should we deal with this?

That is we find the biggest axis, then move the boxes to the left if < and right otherwise. But this can cause an infinite loop if all the objects lie on same side. Basically the image below:

Screen Shot 2020-02-06 at 11 00 59 PM
RajarupanSampanthan commented 4 years ago

There's different strategies. I did the laziest one and just randomly moved some from the other side so there wouldn't be a infinite loop.