-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mesh joining for unstable Bullet collision compounds. #317
Conversation
…oggle in phyisics manager. Updated viewer with BB toggle function.
…om physics config file
…viewer.cpp to toggle all BBs with 'B' key.
…fine with wierd physics bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add some CI tests for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aclegg3 what's the status of this PR, is it good to land?
Waiting on C++ test coverage for new functions. Functionality is fine. I'll look into this soon. |
Codecov Report
@@ Coverage Diff @@
## master #317 +/- ##
==========================================
+ Coverage 56.89% 57.73% +0.83%
==========================================
Files 153 154 +1
Lines 7067 7143 +76
==========================================
+ Hits 4021 4124 +103
+ Misses 3046 3019 -27
Continue to review full report at Codecov.
|
… assets. Modified object asset loading pipeline to allow programmatic object template generation. Fixed some bugs.
…ch#317) * Building bullet compound collision object from hierarchies of convexified meshes. * Added join mesh default for stable collision behavior. * Added physics object parser option for collision mesh joining * Added physics C++ test for mesh joining. Added small test assets. Modified object asset loading pipeline to allow programmatic object template generation. * Fixed some bugs. * Added some docs.
Motivation and Context
Related to Issue #301
Blocked by: PRs #309, #310. (diff includes these)
This PR addresses remaining physics instabilities when loading hierarchal meshes as Bullet rigid object by introducing optional but default mesh joining for more stable simulation of compound objects.
Mesh joining:
Creating compound shapes as combinations of convex components can be an effective way of introducing macro concavities efficiently into simulation. PR #310 added this functionality by computing convex hulls for each mesh in a loaded collision mesh hierarchy and combining them into a single
btCompoundShape
object. However, when individual convex hulls overlap significantly, this treatment can result in unstable simulation artifacts.This is demonstrated by simulation of a compound box shape with 2 convex sub-boxes only slightly offset from one another:
To remedy this, meshes can be joined into one convex hull, losing any concavity for improved stability and efficiency:
The mesh join option is added to the physics object config with default true for stability.
How Has This Been Tested
Local testing.
Simulating random hierarchal objects after mesh joining and COM shift:
Types of changes
Checklist