Jump to content

Access Bullet AutoFit Orientation


MrBajt

Recommended Posts

Hello there,

 

For my current project, I have a subset of randomly oriented geometry (mostly box or capsule like shapes) in one .obj

I would like to orient all of them along their main axis. I remembered Bullet had a Autofit feature, that would fit specific geometry (Sphere, Box, Capsule, etc) to your geo. I tried looking up the source code for this, but I don't think the effort would be worth trying to understand the whole code (I'm a very beginner coder unfortunately), and secondly I think the bullet solver inside houdini does a pretty fast job as is.

My approach is now to import all the objects to bullet, calculate the AutoFit there, and then get the orientation for each object. But how exactly can I access the Bullet Collision Orientation? In my subdata it shows no orientation (obviously, because my parent node is not rotated or transformed), and in the bullet data tab i cant seem to find any orientation.

 

Is this even possible? Or can someone here share and explain the AutoFit code inside Bullet? (Just Kidding ;))

 

Best Regards

Bajt

 

*edit : I just remembered one more question, even though it's not directly related to this one: Is there a way to calculate the best fitting primitive for a shape? I read the paper https://www.cs.drexel.edu/~david/Classes/Papers/MeshlessDeformations_SIG05.pdf , but when i understand this correctly it only works if point numbers and number of point match in both point clouds. Maybe its possible with bullets autofit algorithm?

Edited by MrBajt
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...