MrBajt Posted January 12, 2017 Share Posted January 12, 2017 (edited) 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 January 12, 2017 by MrBajt Quote Link to comment Share on other sites More sharing options...
cwhite Posted January 12, 2017 Share Posted January 12, 2017 The solver creates several point attributes that describe the size, orientation, etc of the autofitted collision shapes (see the Collision Shape Attributes section of http://www.sidefx.com/docs/houdini15.5/nodes/dop/rbdpackedobject) 1 Quote Link to comment Share on other sites More sharing options...
MrBajt Posted January 16, 2017 Author Share Posted January 16, 2017 Oh cool, I didn't think of looking in the point attributes, just in the DOP Subattributes. Good to know Thanks man Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.