Oriented bounding boxes not consistently oriented

   3194   3   1
User Avatar
Member
253 posts
Joined: July 2006
Offline
I've got 2 seemingly identical shapes, but when I get the oriented bounding boxes they are notably different. I looks like there's some hidden data I didn't know it existed.

Please check the file, can you tell what's going on ?

Attachments:
not_ori_b.hip (103.9 KB)

User Avatar
Member
333 posts
Joined: Oct. 2012
Offline
this is really weird. not sure what the current state is in finding the oriented bounding box but it seems there could be a better algorithm in houdini. i often saw cases where the orientation seems way off.

Not sure what is happening in your case as the geo seems pretty much identical. you should report it directly to sidefx support.
User Avatar
Staff
6169 posts
Joined: July 2005
Offline
Finding optimal bounding boxes is a very hard problem.

https://en.wikipedia.org/wiki/Minimum_bounding_box_algorithms [en.wikipedia.org]

Also note that “smallest bounding volume” isn't necessarily what we intuitively imagine when we want the smallest box. Usually we also prescribe some axis of symmetry to further constrain the results and find it odd when the result doesn't reflect this.

Anyways, in this case the objects are not equal. If you do an Attribute Wrangle and wire both in with
@P -= @opinput1_P;
and look at the geometry spreadsheet you will see lots of 1e-7 level differences between the models.

This model doesn't have a unique smallest bounding box, there is more than one way to skin this cat. In partciular, if I compute the volume of the two output bounding boxes I get pretty much the same result, suggesting this is just switching between two valid solutions.
User Avatar
Member
253 posts
Joined: July 2006
Offline
Thank you both. I was running into a problem where I was generating a bounding box with no volume ( no height ). And then the box wouldn't get well oriented, so your comment made me try adding some thickness and now it's looking better. Thanks.
  • Quick Links