
An Exact Algorithm for Finding Minimum Oriented Bounding Boxes [pdf] - vmorgulis
http://clb.demon.fi/minobb/minobb_jylanki_2015_06_01.pdf
======
Animats
That's neat. But the comparison time for oriented bounding boxes is no better
than that for convex polyhedra, if you use incremental GJK.[1] It does,
however, take less code, and the termination condition for GJK in the presence
of roundoff error is quite difficult. If you do implement GJK, be aware that
testing it with random polyhedra is not a good test. The hard cases appear
when two objects are coming into contact and their face planes are becoming
parallel. Since this is what usually happens whenever an object comes to rest
in a simulation, that edge case comes up in practice.

Axis-oriented bounding boxes are cheap to test, but bounding boxes oriented to
the object are really just convex polyhedra with 6 faces.

Lots of collision detection articles today.

[1]
[http://www.cs.ox.ac.uk/stephen.cameron/distances/](http://www.cs.ox.ac.uk/stephen.cameron/distances/)

~~~
forrestthewoods
I don't understand your comment. You say OBB isn't any better than GJK on
arbitary convex polyhedra. Followed by saying GJK has issues with roundoff.
And that testing it with random polyhedra is a bad test.

So, uh, what's your point? Because I don't know.

And none of these really has anything to do with the root post. OBBs are
always going to be used. Always. Different methods for finding OBBs is useful.
Fast ways to find "good" OBBs and slower ways to find "perfect" OBBs both have
value.

~~~
Animats
The point with GJK is that it's a good algorithm, but hard to implement right.
I struggled with this years ago, Steven Cameron at Oxford worked on it, and
it's a solved problem now. I'm tempted to open-source the collision code from
my old Falling Bodies product, but it's pre-STL C++ from the 1990s and I don't
want to overhaul it now.

On collision detection generally, the performance advantage of OBBs over
convex polyhedra is small and may be negative. If you use convex hulls, you
get better looking collisions and it doesn't cost you much, if anything.

~~~
sillysaurus3
_I 'm tempted to open-source the collision code from my old Falling Bodies
product, but it's pre-STL C++ from the 1990s and I don't want to overhaul it
now._

You should release it and put that in the description.

The lack of STL means it's more likely to be thoughtfully designed. It's a
merit, not a demerit. Or to put it a bit bluntly: Don't worry about that! I'd
love to see the code.

~~~
sillysaurus3
I try not to do this, but you might be interested to know that four people
upvoted me. So there are a bunch of people who want to see your code. I assure
you, no one minds whether it's STL or not. The solution is the interesting
bit.

------
leriksen
You did what ?

"The performance tests were run on a MacBook Pro laptop with a 2.7GHz Intel
Core i7 processor and 16GB of RAM running Windows 8.1."

~~~
hippo8
Honestly I don't know why, but that got me laughing more than I expected.

Oh also, [https://support.apple.com/en-
us/HT201468](https://support.apple.com/en-us/HT201468) (How to install Windows
using Boot Camp)

------
bitL
A question - statistically how much better is it than producing OBBs via
applying KLT/PCA on the (x,y,z) coordinates, obtaining major/minor covariance
axis? I used that one for my SW 3D engine and was quite happy about it - very
fast eigenvector computation and only orthogonal projections needed.

~~~
slazaro
I don't have any numbers, but I think they mentioned this in the article: It
depends on how well distributed your points are. There are a lot of cases
where a point cloud will yield an inefficient obbox using the PCA method,
while (if what you want is the minimum volume) their method guarantees
optimality. As always, it depends on your use case.

~~~
bitL
Sure, that issue was prevalent with low-poly models but I doubt it's an issue
with current model complexity. I basically wanted to understand how much of an
improvement can I reasonably expect shall I decide to implement their
algorithm.

------
caba1istik
nice PDF article!

