Jump to content

  • Log In with Google      Sign In   
  • Create Account


Is OBB always the minimum bounding box?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 larsson_frostbite   Members   -  Reputation: 117

Like
0Likes
Like

Posted 30 December 2013 - 10:06 AM

Hi,

 

I have asked this to a graphics programmer colleague but he didn't know. I couldn't find info online using MBB. Can someone make an assertion that OBB should always be the MBB? For example there can never be a bounding box smaller than OBB disregarding optimization?

 

If there is a significantly smaller bounding box than the OBB generated for a particular shape, can someone assert that the OBB implementation isn't very accurate?

 

 

 

Thanks in advance.



Sponsor:

#2 Moe   Crossbones+   -  Reputation: 1248

Like
0Likes
Like

Posted 30 December 2013 - 11:53 AM

It greatly depends on how the original bounding box is set up.  If  the original bounding box on the object isn't a minimal bounding box, then no, an OBB would not be a MBB.  I'm just guessing here, but I suspect that finding a MBB is not a trivial task. If the bounding box of an object is a minimal bounding box, then it doesn't matter which way the object is oriented, as it will still stay relative to the object, and will always be minimal.



#3 haegarr   Crossbones+   -  Reputation: 3780

Like
1Likes
Like

Posted 30 December 2013 - 12:12 PM

AFAIK:

 

An OBB is a cuboid that may be axis aligned but need not to be (to distinguish it from the special case AABB). As such any cuboid used as BB is an OBB. Assuming that the MBB is also a cuboid, the MBB is an OBB but an OBB is not necessarily also the MBB.

 

Looking at the methods to compute an OBB, e.g. the one by Eberly tries to iteratively approximate the MBB. Other methods, like the simple principal component analysis, may definitely produce sub-optimal results.



#4 Shannon Barber   Moderators   -  Reputation: 1356

Like
2Likes
Like

Posted 02 January 2014 - 12:45 AM

No it's not guaranteed to be minimal; it's only guaranteed to be "oriented".

You could force/guarantee yours are minimal ...

 

An AABB/MBB is easy because that's just projections (linear algebra). An OBB/MBB will be difficult as that's a partial-differential-calculus minimization problem.


Edited by Shannon Barber, 02 January 2014 - 12:46 AM.

- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

#5 larsson_frostbite   Members   -  Reputation: 117

Like
0Likes
Like

Posted 02 January 2014 - 03:03 PM

Thanks alot guys. I thought they were the same. But if you were to calculate MBB, then your MBB as an OBB would be much better quality than non-MBB-OBBs, right?

 

Also is that really a hard problem? I remember reading somewhere where they were saying, searching all degrees of rotation is much better than the mathematically accurate one. So basically searching all angles, and then adaptively narrowing down the range to minimize iterations.

 

I also heard that this is after calculating the convex hull of the geometry if I am not wrong. This way your transformations will potentially be faster.



#6 Shannon Barber   Moderators   -  Reputation: 1356

Like
0Likes
Like

Posted 05 January 2014 - 06:50 PM


But if you were to calculate MBB, then your MBB as an OBB would be much better quality than non-MBB-OBBs, right?

 

Yeah, sorta, kinda, not really. Close-enough is close-enough.

 

For example, you could use a sphere-tree for fast, gross, culling then resort to a "triangle perfect" collision detection.
What you really want for physics is a CSG representation of the model (constructive-solid-geometry) and perform the collision against that.

This allows you to describe curves, spheres, cylinders (i.e. wheels) accurately without requiring excessive tessellation.

 

It depends on what you are using the collision detection for.

You might have one collision mesh or geometry for movement collisions and a different one for detecting damage (to detect the location hit).


Edited by Shannon Barber, 05 January 2014 - 06:52 PM.

- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS