OBB

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

OBB

Postby JoeJ » Wed Jun 03, 2015 2:45 am

Just for information - Someone seems to have found a solution to the find lowest volume oriented bounding box problem:

http://www.gamedev.net/topic/668868-an-exact-algorithm-for-finding-minimum-oriented-bounding-boxes/
User avatar
JoeJ
 
Posts: 1489
Joined: Tue Dec 21, 2010 6:18 pm

Re: OBB

Postby Julio Jerez » Wed Jun 03, 2015 9:41 am

that looks interesting, I thing there are few places with OBB are used in the engine.
I will take a look.

I use a naïve algorithm witch is get the convert hull, and the starting with the principal component axis, I do a series of fix sate rotations calculation a new set of axis using the a checking of the new
and selecting the set of axis wit the smaller rotation.
the algorithm is a directed search, because the axis volume are monotonic.

It does no yield top the smaller Obb, but is does lead to a very good one that is very close to the smaller and it is very fast. I believe is much faster that the N * sqrt(n) * log(n) that he stated
the function in Newton is this.

dgObb dgPolyhedra::CalculateSphere (const dgFloat64* const vertex, dgInt32 strideInBytes, const dgMatrix* const basis) const
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: OBB

Postby Julio Jerez » Wed Jun 03, 2015 9:52 am

Oh looking at my code I see that I remove the search, all I am doing is
principal axis of the convex hull of the vertex cloud.
and that for a fact is not the smallest obb. Is a very closet but is not the best.
maybe I should try that new algorithm.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 11 guests

cron